Hello!
I have got a std::list< std::pair<std::string,double> >, which I know is sorted according to the std::string element.
Since I would like to do a lot of std::find_if based on the std::string element, I believe a std::map<string,double,MyOwnBinaryPredicate> with lower_bound and upper_bound would be more adequate.
The fact is that I want to insert elements in the std::map in an efficient way. So I want to use an additional iterator to make the insert faster.
I believe the easiest way would be to use a const_reverse_iterator to go through the std::list and to use the begin() of the std::map.
Would you do it this way, or is it a bad idea?
Thanks!