Subject: [Boost-users] Question on multiindex erase return value
From: Ramesh (rramesh1_at_[hidden])
Date: 2009-01-04 22:14:28


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?

Thanks
Ramesh