public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31729]  New: Nonconforming std::map
@ 2007-04-27 16:04 leg0 at hot dot ee
  2007-04-27 16:26 ` [Bug libstdc++/31729] " pcarlini at suse dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: leg0 at hot dot ee @ 2007-04-27 16:04 UTC (permalink / raw)
  To: gcc-bugs

erase member functions of std::map class template do not conform to standard:

std::map<...>::erase(iterator) and std::map<...>::erase(iterator, iterator)
both return void when they should return iterator (23.3.1):

bits/stl_map.h:444

      void
      erase(iterator __position)
      { _M_t.erase(__position); }

bits/stl_map.h:474

      void
      erase(iterator __first, iterator __last)
      { _M_t.erase(__first, __last); }


The standard requires signature of these functions to be:

      iterator erase(iterator);
      iterator erase(iterator, iterator);


-- 
           Summary: Nonconforming std::map
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: leg0 at hot dot ee


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


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

* [Bug libstdc++/31729] Nonconforming std::map
  2007-04-27 16:04 [Bug c++/31729] New: Nonconforming std::map leg0 at hot dot ee
@ 2007-04-27 16:26 ` pcarlini at suse dot de
  2007-04-27 18:26 ` leg0 at hot dot ee
  2007-04-27 18:32 ` pcarlini at suse dot de
  2 siblings, 0 replies; 4+ messages in thread
From: pcarlini at suse dot de @ 2007-04-27 16:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pcarlini at suse dot de  2007-04-27 17:26 -------
I have the standard in front of me, both the printed version and the electronic
version, and certainly you are wrong, both overloads return void.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c++                         |libstdc++
         Resolution|                            |INVALID


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


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

* [Bug libstdc++/31729] Nonconforming std::map
  2007-04-27 16:04 [Bug c++/31729] New: Nonconforming std::map leg0 at hot dot ee
  2007-04-27 16:26 ` [Bug libstdc++/31729] " pcarlini at suse dot de
@ 2007-04-27 18:26 ` leg0 at hot dot ee
  2007-04-27 18:32 ` pcarlini at suse dot de
  2 siblings, 0 replies; 4+ messages in thread
From: leg0 at hot dot ee @ 2007-04-27 18:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from leg0 at hot dot ee  2007-04-27 19:26 -------
According to the working drafts
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf and 
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf I am right.
But since they are drafts I may still be wrong.


-- 


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


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

* [Bug libstdc++/31729] Nonconforming std::map
  2007-04-27 16:04 [Bug c++/31729] New: Nonconforming std::map leg0 at hot dot ee
  2007-04-27 16:26 ` [Bug libstdc++/31729] " pcarlini at suse dot de
  2007-04-27 18:26 ` leg0 at hot dot ee
@ 2007-04-27 18:32 ` pcarlini at suse dot de
  2 siblings, 0 replies; 4+ messages in thread
From: pcarlini at suse dot de @ 2007-04-27 18:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pcarlini at suse dot de  2007-04-27 19:31 -------
Working drafts are working drafts, and therefore are about the *next* standard,
not the current one, C++03. When the new standard will be out, and we'll
provide a conforming implementation, breaking the ABI, we'll provide different
overloads of erase and *a lot* of new / incompatible stuff.


-- 


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


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

end of thread, other threads:[~2007-04-27 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-27 16:04 [Bug c++/31729] New: Nonconforming std::map leg0 at hot dot ee
2007-04-27 16:26 ` [Bug libstdc++/31729] " pcarlini at suse dot de
2007-04-27 18:26 ` leg0 at hot dot ee
2007-04-27 18:32 ` pcarlini at suse dot de

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).