Add support implicit conversion between types

ilya-stromberg ilya-stromberg-2009 at yandex.ru
Fri Sep 6 06:57:16 PDT 2013


On Friday, 6 September 2013 at 13:39:20 UTC, deadalnix wrote:
> You don't want a keyword for that. Something obscure and ugly 
> is required.

C# have operator overloading for this.

We can use, for example, "opImplicitRightCast"

struct Foo
{
    Foo opImplicitRightCast(T)(T from);
}


More information about the Digitalmars-d mailing list