I want to pass an overloaded operator to a function, which can\'t figure out which of the two overloads it should use.
// This works, not overloaded: chai.add(ch
The following may help you to choose one overload of map::operator[]
map::operator[]
static_cast< std::string& (std::map::*)(const std::string&)>( &std::map::operator []);
Or with a typedef:
typedef
using MyMap = std::map; static_cast(&MyMap::operator []); // ReturnType Class params