Coexistence of static and unstatic method

Jacob Carlborg doob at me.com
Sat Jun 30 03:44:43 PDT 2012


On 2012-06-30 10:56, Namespace wrote:
> I have this class: http://dpaste.dzfl.pl/95990b4e
> and would like that this call "Vector2s vec = Vector2s(42, 23);" returns
> a new object and that this call "vec(44, 26)" set the x and y coords
> from the existing object to 44 and 26.
> Is that possible?
> I try to check if the object is initialize with "if (is(this))" but it
> seems that this is true for static and unstatic methods.
>
> P.S.: Is the conversion with "to" accurate? Sometimes U or/and V are the
> same as T and then it isn't necessary to cast them. Checks "to" if
> that's the case, and then prevents an explicit cast?

http://d.puremagic.com/issues/show_bug.cgi?id=3345

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list