Multiple opCasts

Russell Lewis webmaster at villagersonline.com
Sun Aug 24 14:44:05 PDT 2008


Jarrett Billingsley wrote:
> "dsimcha" <dsimcha at yahoo.com> wrote in message 
> news:g8po0h$2hen$1 at digitalmars.com...

(snip)

>> On the calling side:
>>
>> Foo foo;
>> int i = cast(int) foo;  //equivalent to int i = foo.opCast!(int)().
>> float f = cast(float) foo;  //equivalent to float f = foo.opCast!(float)()
> 
> No offense meant, but this has been proposed multiple times. 

I was going to reply and say that this was an exciting and elegant idea, 
since I hadn't remembered seeing it before.  I guess I will offer 
congrats to dsimcha, and also to everybody had who suggested it before.

:)

Russ



More information about the Digitalmars-d mailing list