An alternative to .init

Brad Roberts braddr at puremagic.com
Wed Sep 10 19:21:51 PDT 2008


Manfred_Nowak wrote:
> Walter Bright wrote:
> 
>> But for many types, there is no such thing as an invalid value
> 
> Why can one then define
> 
> |   typedef int T=void; // T.init == void
> 
> -manfred

That just means don't initialize, leaving any instances with random
values until first assignment.  That doesn't mean that it contains an
invalid value.

Later,
Brad



More information about the Digitalmars-d-announce mailing list