[Bug c++/57684] [c++11] Lambda is not convertible to std::function
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jun 23 12:25:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57684
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, because std::unique_ptr has a special exception that says it can be
instantiated with incomplete types, so that should work OK (like your case
where the static member is a raw pointer, which prevents unordered_map being
instantiated when base<> is instantiated.
I hope for GCC 4.9 we can make unordered_map support incomplete types again, so
the original code would work, but it doesn't support them currently, which is
allowed by the standard.
More information about the Gcc-bugs
mailing list