[Bug libstdc++/64096] std::list, set and map violate a rule about allocator::construct

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 2 13:34:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64096

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
For completeness, the error for std::list now shows:

a.cc: In instantiation of ‘void my_allocator<T>::construct(U*, Args&& ...)
[with U = int; Args = {int}; T = std::_Rb_tree_node<int>]’:

which is consistent with maps and sets now.

I actually consider it a bug that you don't get the assertion for other
containers too! The unordered containers and forward_list should not bother
constructing a rebound allocator to call construct/destroy.


More information about the Gcc-bugs mailing list