When do the following in gcc 4.8.2,
class A
{
public:
void operator()(int);
void operator()(const std::string&) {}
};
std::cout << typeid(&A::operator()).name() << std::endl;
It gives errors:
error: address of overloaded function with no contextual type information.
It works for other class member operators, such as operator==. Is that a syntactic error in the typeid() call for A::operator()?
EDITS: sorry, my bad. The problem occurs when there are multiple overloaded operator()'s.