I have never used Boost.Bimap before, but looking through the documentation it seems like the types of the left
and right
views, and accordingly the member functions you can use, depend on the collections you use as template parameters. You can see here the methods you can use with a vector_of view. You could use:
mp.left.insert(mp.left.end(), bimap_t::left_value_type(2,2.0f));
mp.left.push_back(bimap_t::left_value_type(2,2.0f));
You could also use:
mp.left.push_front(bimap_t::left_value_type(2,2.0f));
but it is not recommended for performance reasons.
PS: If you use bimap<boost::bimaps::set_of<int>, boost::bimaps::vector_of<float> >
your insert
will work with the left view but it will fail with the right one.