Thomas Krebs wrote:
> Ulrich Eckhardt schrieb:
> > Thomas Krebs <Thomas_Krebsatgmxdotde> wrote:
> >> trying to port some code to Fedora Core 5 with installed gcc 4.1.0 I
> >> found that std::set::erase(iterator) returns void.
> >> I don't have the standard document, but should this method return
> >> the position to the next element in the set?
> >
> > It's a piece that was not adopted from the STL, the standard says it
> > returns void. Workaround is typically to use the postincrement operator on
> > the passed iterator.
> >
> > Just wondering, what standardlibrary are you porting from?
> >
>
> VC 7.1, returns the incremented iterator...

I remember asking about this some time ago and received the answer from
DinkumWare (VC's std library supplier) that the return value from erase
is a "conforming extension".  As such, you cannot expect code that
relies upon it to be portable.

Regards,

Jon Trauntvein

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to