In C++11, what you have works fine (assuming you add an identifier name to the variable declaration).
In versions prior, one approach would be to have a free function that builds the map:
typedef std::map<std::string, std::pair<some_enum, std::string> > map_type;
static map_type create_map()
{
map_type map;
map["1234a"] = std::make_pair(BOSS, "Alice");
map["5678b"] = std::make_pair(SLAVE, "Bob");
map["1111b"] = std::make_pair(IT_GUY, "Cathy");
return map;
}
map_type foo = create_map();
Or you can make use of Boost.Assign:
std::map<std::string, std::pair<some_enum, std::string> > foo =
boost::assign::map_list_of("1234a", std::make_pair(BOSS, "Alice"))
("5678b", std::make_pair(SLAVE, "Bob"))
("1111b", std::make_pair(IT_GUY, "Cathy"));