Ambiguous definition of operator() with multiple inheritance
问题 I compile this code with GCC (4.2.1 Apple build 5664) #include <cstddef> using std::size_t; template <char I> struct index { }; struct a { void operator()(size_t const &) { } }; struct b { template <char I> void operator()(index<I> const &) { } }; struct c: public a, public b { }; int main (int argc, char const *argv[]) { c vc; vc(1); return 0; } and give me the following error: main.cpp: In function ‘int main(int, const char**)’: main.cpp:22: error: request for member ‘operator()’ is