--- Comment #1 from Kenji Hara <> 2012-04-20 02:47:58 PDT ---
A lambda expression that needs parameter type inference is internally
translated to template function.

  x => x
  // auto __lambda(T1)(T1 x){ return x; }

So this:

  pragma(msg, typeof(x => x));

is same as:

  pragma(msg, typeof(__lambda));
  // template itself has no type, then typeof(template) always returns void

And, long years, typeof(template) returns void.
Therefore, typeof(x => x) == void is current implementation design.

I don't know why typeof(template) returns void, but changing the behavior will
break some existing meta-programming codes.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to