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(chaiscript::fun(&HttpRequest::operator+), "+");
// This does not, overloaded:
chai.add(chaiscript::fun(&(
std::map<std::string,std::string>::operator[]), "[]");
The chaiscript::fun expects a generic parameter, but it can't figure out which overload to use.
I need to specify the overload, but I don't know the syntax.
I tried things like:
chai.add(chaiscript::fun(&(
std::map<std::string,std::string>::operator[]<foo>), "[]");
but this doesn't work.
How is the syntax to specify the overload?