Consider the following minimal example:
struct T { void operator()() { } }; struct S { void operator()(int) { } }; struct U: T, S { U(): T{}, S{} { }
It compiles, as with clang 3.8 .
In any case, it did not compile with GCC 6.1 with an error:
12: error: the query for the member () operator is ambiguous
Note that GCC 6.1 works fine if using directives are uncommented.
As far as I know, there is no reason for such an error, and it seems that clang is the one that works as expected.
Before I open the error, I do not know who, I would like to ask if there is something that I missed.
In other words, to give an error, the correct behavior in this case, or is it an error for yourself?
source share