http://d.puremagic.com/issues/show_bug.cgi?id=9426
bearophile_h...@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_h...@eml.cc --- Comment #3 from bearophile_h...@eml.cc 2013-07-31 05:49:42 PDT --- Now the D language supports enum and alias used as lambdas, so adding template function lambdas seems good: import std.typecons: Tuple; void main() { alias Pair(T) = Tuple!(T, T); // OK auto p = Pair!int(10, 20); enum isGood(T) = is(T == int) || is(T == long); // OK static assert(isGood!int); enum foo(T) = (T x) => x * x; // OK static assert(foo!int(5) == 25); alias bar = x => x * x; // Error } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------