Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 8 years ago

Language

Compiler

Options

Author

anonymous

about 8 years ago

$
prog.cc: In function 'int main()':
prog.cc:23:12: error: call of '(ob0) (int)' is ambiguous
     ob0{}(0); // Ambiguous because `a0::operator()(int)` appears multiple times in the base classes.
            ^
prog.cc:2:18: note: candidate: void a0<<anonymous> >::operator()(int) [with int <anonymous> = 0]
 struct a0 { void operator()(int){} };
                  ^~~~~~~~
prog.cc:5:18: note: candidate: void a1<<anonymous> >::operator()(char) [with int <anonymous> = 0]
 struct a1 { void operator()(char){} };
                  ^~~~~~~~
prog.cc:2:18: note: candidate: void a0<<anonymous> >::operator()(int) [with int <anonymous> = 1]
 struct a0 { void operator()(int){} };
                  ^~~~~~~~
prog.cc:38:14: error: call of '(ob1) (char)' is ambiguous
     ob1{}('a'); // Ambiguous because `a1::operator()(char)` appears multiple times in the base classes.
              ^
prog.cc:2:18: note: candidate: void a0<<anonymous> >::operator()(int) [with int <anonymous> = 0]
 struct a0 { void operator()(int){} };
                  ^~~~~~~~
prog.cc:5:18: note: candidate: void a1<<anonymous> >::operator()(char) [with int <anonymous> = 0]
 struct a1 { void operator()(char){} };
                  ^~~~~~~~
prog.cc:5:18: note: candidate: void a1<<anonymous> >::operator()(char) [with int <anonymous> = 1]
Exit Code:
1