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

M

Marcin Kaliciñski

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
 
C

Chris Jefferson

Marcin said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top