public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/47628] New: non-compliant C++0x erase methods on STL containers
@ 2011-02-07  1:00 blelbach at cct dot lsu.edu
  2011-02-07  1:14 ` [Bug libstdc++/47628] " blelbach at cct dot lsu.edu
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: blelbach at cct dot lsu.edu @ 2011-02-07  1:00 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: non-compliant C++0x erase methods on STL containers
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: blelbach@cct.lsu.edu


Apologizes if this has changed in the draft standard (my copy of n3092
indicates it hasn't):

As of r169874, std::set<>, std::map<>, std::multiset<>, std::multimap<>,
std::unordered_set<>, std::unordered_map<>, std::unordered_multiset<> and
std::unordered_multimap<> have C++0x erase methods; instead of taking an
`iterator' (or a range of `iterators' for some of the aforementioned
containers), the GNU implementation of these containers accept a
`const_iterator'. In ISO/IEC N3092, the specification of the erase() method is
in [associative.reqmts] (Section 23.2.4) table 99 and [unord.req] (Section
23.2.5) table 100.

I do not believe this problem affects the library in C++03/C++99 mode, as a
preprocessor macro selects the old C++99/C++03 version of erase(). This is
problematic in particular for std::map<>, where it can cause a call to erase()
to be ambigious. I noticed this problem when compiling the Boost.Signals
library (I'm a Boost developer) with a freshly built GCC 4.6.0.

Please find attached a patch against trunk that fixes this problem.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-02-23 13:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-07  1:00 [Bug libstdc++/47628] New: non-compliant C++0x erase methods on STL containers blelbach at cct dot lsu.edu
2011-02-07  1:14 ` [Bug libstdc++/47628] " blelbach at cct dot lsu.edu
2011-02-07  9:30 ` redi at gcc dot gnu.org
2011-02-07  9:44 ` redi at gcc dot gnu.org
2011-02-07 11:26 ` paolo.carlini at oracle dot com
2011-02-07 14:22 ` blelbach at cct dot lsu.edu
2011-02-07 17:18 ` redi at gcc dot gnu.org
2011-02-07 17:23 ` redi at gcc dot gnu.org
2011-02-07 17:56 ` paolo.carlini at oracle dot com
2011-02-07 17:57 ` paolo.carlini at oracle dot com
2011-02-07 18:01 ` paolo.carlini at oracle dot com
2011-02-07 18:05 ` redi at gcc dot gnu.org
2011-02-07 20:19 ` paolo at gcc dot gnu.org
2011-02-07 20:25 ` paolo.carlini at oracle dot com
2011-02-23 14:15 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).