http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55043



--- Comment #20 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-24 
20:03:52 UTC ---

It's conforming for unordered_map to have a possibly-throwing move ctor, but it

must be possible to insert it into a vector, because vector::emplace_back

doesn't require copyconstructible, and doesn't require nothrow

moveconstructible



The bug is that we "detect" the type is copyconstructible when it isn't really.



So I think specializing std::is_copy_constructible to depend on the allocator

and value type makes sense. I've implemented it and it works.



That said, I think a non-allocating default ctor and move ctor would also be

better. Allocation should happen on insertion, which could test whether there

are already buckets or not

Reply via email to