need clarification: will typedef, C struct initialization, etc.

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 31 14:39:13 PDT 2010


On 05/31/2010 04:11 PM, Adam Ruppe wrote:
> Doesn't
>
> struct T { R _payload; }
>
> accomplish the same thing as
>
> typedef R T;
>
> in the majority of useful cases?

Exactly. And with alias this and other mechanisms, you can define 
several well-defined typedef incarnations that achieve what you want to 
express.


Andrei


More information about the Digitalmars-d mailing list