
Hello, new to this list... did not find anything similar on net. One of the annoyances with std::map is that if you work with const maps, then there is no "one line" code to get an element knowing the key. given the map const map<string, string> aStringMap; I cannot write const string &s = aStringMap["key"]; process(s); I should write: map<string, string>::const_iterator it=aStringMap.find("key") if( it != aStringMap.end() ) { process(it->second) } so would be nice to have a macro like BOOST_CONSTMAPFIND(aStringMap, "key", data) { processResult( data ); } the version if(BOOST_CONSTMAPFIND(l_map, l_key, l_data) ) { } Seems to be impossible to implement -- rgrds, mobi phil being mobile, but including technology http://mobiphil.com