typedef redux
BLS
windevguy at hotmail.de
Thu Nov 12 08:47:08 PST 2009
On 12/11/2009 16:37, Andrei Alexandrescu wrote:
> My perception following the discussion around typedef is that we should
> eliminate it. What we offer is "alias", which is a generalization of C's
> "typedef", and the change of name is justified by the fact that "alias"
> defines aliases for more entities than just types.
>
> Does all that sound good?
>
>
> Andrei
IMO typedef should enable sub-types
typedef uint NON_CRITICAL_SPEED ( 200..350 )
sugar for :
template NON_CRITICAL_SPEED(T = uint) if( T > 199 && T < 351) { ... }
but well, just a quick 'n dirty idea
More information about the Digitalmars-d
mailing list