Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 5 years ago

Language

Compiler

Options

Author

anonymous

about 5 years ago

$
prog.cc: In function 'int main()':
prog.cc:15:10: error: no matching function for call to 'foo(int)'
   15 |     foo(0); // << error!
      |          ^
prog.cc:8:26: note: candidate: 'template<class T> typename T::internalType foo(const T&)'
    8 | typename T::internalType foo(const T& t) {
      |                          ^~~
prog.cc:8:26: note:   template argument deduction/substitution failed:
prog.cc: In substitution of 'template<class T> typename T::internalType foo(const T&) [with T = int]':
prog.cc:15:10:   required from here
prog.cc:8:26: error: 'int' is not a class, struct, or union type
prog.cc: In instantiation of 'typename T::internalType foo(const T&) [with T = Bar; typename T::internalType = double]':
prog.cc:14:14:   required from here
prog.cc:8:39: warning: unused parameter 't' [-Wunused-parameter]
    8 | typename T::internalType foo(const T& t) {
      |                              ~~~~~~~~~^
Exit Code:
1