#define _CRT_SECURE_NO_DEPRECATE
#define _SCL_SECURE_NO_DEPRECATE
#include <boost/config.hpp>
#include <string>
#include <iostream>
#include <cassert>
#include <boost/bimap/bimap.hpp>
#include <boost/bimap/unordered_set_of.hpp>
#include <boost/bimap/list_of.hpp>
#include <boost/bimap/multiset_of.hpp>
using namespace boost::bimaps;
void first_bimap()
{
typedef bimap< set_of< std::string >, list_of< int > > bm_type;
bm_type bm;
try
{
bm.left.at("one") = 1; }
catch( std::out_of_range & e ) {}
assert( bm.empty() );
bm.left["one"] = 1;
assert( bm.left.at("one") == 1 ); }
void second_bimap()
{
typedef bimap< multiset_of<std::string>, unordered_set_of<int> > bm_type;
bm_type bm;
bm.right.insert( bm_type::right_value_type(1,"one") );
assert( bm.right.at(1) == "one" );
try
{
std::cout << bm.right.at(2); }
catch( std::out_of_range & e ) {}
}
int main()
{
first_bimap();
second_bimap();
return 0;
}