implicit constructors
Trass3r
un at known.com
Tue Nov 29 16:59:04 PST 2011
> Wasn't there some discussion quite some time ago about introducing an
> implicit/@implicit tag similar to C++'s explicit, just the other way
> around?
>
> I know there's alias this, but what if you don't store the value
> directly?
> struct A
> {
> int store;
>
> this(int a)
> {
> store = a << 16;
> ...
> }
> }
>
> A a = 5;
http://d.puremagic.com/issues/show_bug.cgi?id=7019
More information about the Digitalmars-d
mailing list