Question on multiindex erase return value

As per the erase documentation http://www.boost.org/doc/libs/1_36_0/libs/multi_index/doc/reference/ord_indi... 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? Thanks Ramesh

AMDG Ramesh wrote:
As per the erase documentation
http://www.boost.org/doc/libs/1_36_0/libs/multi_index/doc/reference/ord_indi...
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
participants (2)
-
Ramesh
-
Steven Watanabe