This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/64096] std::list, set and map violate a rule about allocator::construct
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Nov 2014 01:12:57 +0000
- Subject: [Bug libstdc++/64096] std::list, set and map violate a rule about allocator::construct
- Auto-submitted: auto-generated
- References: <bug-64096-4 at http dot gcc dot gnu dot org/bugzilla/>
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