Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Return value of std::map::erase()

Reply
Thread Tools

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

 
 
Marcin Kaliciński
Guest
Posts: n/a
 
      03-10-2005
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



 
Reply With Quote
 
 
 
 
Chris Jefferson
Guest
Posts: n/a
 
      03-10-2005
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/wg...wg-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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function take in value and return value CSINVA ASP .Net 6 11-07-2007 12:49 PM
Getting ID, calling url, search for value, return value Tim Fröglich ASP .Net Web Services 1 01-10-2006 09:18 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM
getting return value from function without return statement. Seong-Kook Shin C Programming 1 06-18-2004 08:19 AM
Return a return value from Perl to Javascript PvdK Perl 0 07-24-2003 09:20 AM



Advertisments