Function literals can't be class members
JS
js.mdnq at gmail.com
Mon Jul 8 15:41:40 PDT 2013
trying to use a lambda inside a sub template gives an error.
mixin template a
{
template b()
{
enum b = { }();
}
mixin(b!());
}
gives the error in the subject, removing the nesting or using a
function instead of a lamda produces no error, yet all are
essentially semantically equivalent... just the lamda version
requires less typing. (in fact, it would be nice to have a
simplification of template b() = { ... }();)
More information about the Digitalmars-d
mailing list