Hello,
I’m having difficulty figuring out how to access elements from a vector_of
view in a bimap. The following code does not compile in VS 2008.
#include <string>
#include <iostream>
#include
#include
using namespace std;
using namespace boost::bimaps;
int main()
{
typedef bimap< string, vector_of<int> > bimap_type;
bimap_type bm;
bm.insert(bimap_type::value_type("zero", 0));
bm.insert(bimap_type::value_type("one", 1));
const bimap_type::right_map& right = bm.right;
// Both of the lines below cause compilation failure with vc++ 9.0.
bm.right[0];
//bm.right.at(0);
return 0;
}
Can anyone see what I’m doing wrong or is there some other means of accessing
the elements of the map via the vector?
Thanks,
John