This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to rylai from comment #0)
> As we can see, std::list implementation tries to call construct for whole
> list node (U = std::_List_node<int>),

This is already fixed on the SVN trunk, which will be GCC 5.

> and std::set and map (and also
> multiset and multimap) call it for right type (int or std::pair<const int,
> int>), but from rebinded allocator (T = std::_Rb_tree_node<int>).

I've discussed this extensively with the main author of  the C++11 allocator
proposals and other members of the committee. The standard is supposed to allow
that, the fact it doesn't is a defect, see
http://cplusplus.github.io/LWG/lwg-active.html#2218


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]