After declaring std::map<std::string, std::string> M
it's possible to:
- Write to the map:
M["Jack"] = "323 Union St";
- Read from the map:
std::cout << M["Jack"];
And yet after declaring boost::associative_property_map<std::map<std::string, std::string>> PM(M)
we are not able to do much more than:
- Write to the property map:
boost::put(PM, "Fred", "323 Union St");
- Read from the property map:
boost::get(PM, "Fred");
What can you do with a property map that you cannot already do with a map?
Context
Consider someone for whom
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
is distinctly false. IIUC, property maps were used so heavily throughout BGL from 1998 to 2002 to eliminate the need to write one library for MSVC and another for gcc. The idea apparently was that what MSVC will handle, gcc will happily also handle. Now that MSVC handles C++98, are property maps still necessary or are they just a relic? Why?