#define _CRT_SECURE_NO_DEPRECATE
#define _SCL_SECURE_NO_DEPRECATE
#include <boost/config.hpp>
#include <iostream>
#include <string>
#include <boost/bimap/bimap.hpp>
#include <boost/bimap/multiset_of.hpp>
#include <boost/bimap/property_map/set_support.hpp>
using namespace boost::bimaps;
template <typename AddressMap>
void foo(AddressMap & address_map)
{
typedef typename boost::property_traits<AddressMap>::value_type value_type;
typedef typename boost::property_traits<AddressMap>::key_type key_type;
value_type address;
key_type fred = "Fred";
std::cout << boost::get(address_map, fred);
}
int main()
{
typedef bimap<std::string, multiset_of<std::string> > Name2Address;
typedef Name2Address::value_type location;
Name2Address name2address;
name2address.insert( location("Fred", "710 West 13th Street") );
name2address.insert( location( "Joe", "710 West 13th Street") );
foo( name2address.left );
return 0;
}