On alias a = b

Nick Sabalausky a at a.a
Sat Mar 19 14:30:48 PDT 2011


"KennyTM~" <kennytm at gmail.com> wrote in message 
news:im0gtr$1o3q$1 at digitalmars.com...
>
> enum addSize(int total, T) = total + T.sizeof;
>

The great thing about that would be decreased need for the terribly non-DRY 
emonymous template syntax:

template addSize(...)
{
    enum addSize = ...;
}

Ugh. Is there anything in the works to take care of that? It's like C++'s 
naming system for constructors. I'd even be happier with something like:

template addSize(...)
{
    alias _ this;
    enum _ = ...;
}

Or maybe if it's grammatically viable:

template addSize(...)
{
    enum template = ...;
}




More information about the Digitalmars-d mailing list