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

2014-12-02 Thread redi at gcc dot gnu.org
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_allocatorT::construct(U*, Args ...)
[with U = int; Args = {int}; T = std::_Rb_tree_nodeint]’:

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.

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

2014-11-28 Thread palpatin91 at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64096

rylai palpatin91 at mail dot ru changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from rylai palpatin91 at mail dot ru ---
Known issues


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

2014-11-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64096

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Resolution|WONTFIX |FIXED

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org ---
I'm going to mark it fixed, since std::list is fixed, and the other part of the
report is not a bug.


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

2014-11-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64096

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0


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

2014-11-27 Thread redi at gcc dot gnu.org
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_nodeint),

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::pairconst int,
 int), but from rebinded allocator (T = std::_Rb_tree_nodeint).

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