Return value of std::map::erase()

Discussion in 'C++' started by Marcin Kaliciñski, Mar 10, 2005.

  1. Hi,

    map::erase(iterator) and map::erase(iterator, iterator). In STL shipped with
    MSVC return value of these functions is iterator. In gcc 3.3 it is void.
    Which one is conforming?

    cheers,
    Marcin
     
    Marcin Kaliciñski, Mar 10, 2005
    #1
    1. Advertising

  2. Marcin Kaliciñski wrote:
    > Hi,
    >
    > map::erase(iterator) and map::erase(iterator, iterator). In STL shipped with
    > MSVC return value of these functions is iterator. In gcc 3.3 it is void.
    > Which one is conforming?
    >

    The standard says gcc, however in
    http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html, point 130,
    it looks like this will be changed in the standard soon (assuming it
    passes a committee meeting), so perhaps MSVC is just deciding to
    implement the (quite reasonable) fix a bit early :)

    Chris
     
    Chris Jefferson, Mar 10, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Angus Leeming
    Replies:
    5
    Views:
    2,945
    Howard Hinnant
    Feb 4, 2004
  2. Pieter Thysebaert

    STL std::map erase

    Pieter Thysebaert, May 13, 2004, in forum: C++
    Replies:
    26
    Views:
    14,310
    Robbie Hatley
    May 14, 2004
  3. Gernot Frisch

    std::map - erase+continue

    Gernot Frisch, Mar 7, 2005, in forum: C++
    Replies:
    17
    Views:
    2,935
    Andre Kostur
    Mar 9, 2005
  4. erase vs. erase

    , Mar 25, 2006, in forum: C++
    Replies:
    7
    Views:
    381
    Pete Becker
    Mar 30, 2006
  5. Replies:
    2
    Views:
    345
    Frank Birbacher
    May 23, 2008
Loading...

Share This Page