--- Comment #4 from Walter Bright <> 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"([0]);

works, and

    typeof(map!"a"([0])) a;


Note that you can do:

    typeof(map!"a"([0])) 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:
------- You are receiving this mail because: -------

Reply via email to