Boost logo

Boost Users :

Subject: Re: [Boost-users] Question on multiindex erase return value
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-01-05 13:39:59


AMDG

Ramesh wrote:
> As per the erase documentation
>
> http://www.boost.org/doc/libs/1_36_0/libs/multi_index/doc/reference/ord_indices.html#modifiers
>
> erase method can take an iterator position as argument & if erase is
> successful, it returns an iterator pointing to the next item or end().
> Assuming i have only one item in the container, after a successful
> erase, the iterator would anyway point to end(). Supposing erase
> failed, will it still return me end()?
>
> How do I distinguish between a successful erase & failed erase
> involving iterator?
>

You don't. erase with an iterator always succeeds.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net