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

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

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. Peter Jansson
    Replies:
    5
    Views:
    6,914
    Ivan Vecerina
    Mar 17, 2005
  2. Replies:
    2
    Views:
    402
    Frank Birbacher
    May 23, 2008
  3. Replies:
    1
    Views:
    585
    red floyd
    Dec 21, 2008
  4. Thomas J. Gritzan
    Replies:
    6
    Views:
    1,209
    James Kanze
    Dec 22, 2008
  5. James Kanze
    Replies:
    0
    Views:
    2,229
    James Kanze
    Dec 21, 2008
Loading...