help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: std::set::erase(iterator) missing return value


From: Ulrich Eckhardt
Subject: Re: std::set::erase(iterator) missing return value
Date: Fri, 04 Aug 2006 18:16:21 +0200
User-agent: KNode/0.10.2

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?

Uli

-- 
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]