Boost logo

Boost Users :

Subject: Re: [Boost-users] Container with insertion order
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2011-12-03 14:02:44


Igor R <boost.lists <at> gmail.com> writes:

>
> > Ok, now I want to make find() and erase() methods. In std::map, they return
> > an iterator. Should I wrap the methods find() and erase(), to pass a const
> > K& key, and return a container1:: const_iterator. is it right?
>
> std::map::find and std::map::erase have several overloads:
> http://www.cplusplus.com/reference/stl/map/find/
> http://www.cplusplus.com/reference/stl/map/erase/
> And none of erase() overloads returns iterator.

erase *does* return an iterator. The docs you're using are non-compliant,
take a look for instance at

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf

HTH,

Joaquín M López Muñoz
Telefónica Digital


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