"KennyTM~" <kenn...@gmail.com> wrote in message news:im0gtr$1o3q$1...@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 = ...; }