--- Comment #4 from Walter Bright <bugzi...@digitalmars.com> 2011-05-08
22:37:58 PDT ---
I'm going to argue this is not a compiler bug.
The return type from map (call it T) is a private, opaque data type. The only
way to get an instance of T is by calling map(). T cannot be default
constructed - hence the error message.
This is why:
auto a = map!"a"();
Note that you can do:
typeof(map!"a"()) a = void;
because no default construction is attempted.
The default construction cannot happen outside of map() because it requires the
stack frame of map() to do it.
The error message, of course, is not so easy to decipher.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------