Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 7 years ago

Language

Compiler

Options

Author

anonymous

over 7 years ago

$
prog.cc: In function 'int main()':
prog.cc:10:14: error: no matching function for call to 'foo(int)'
     foo(int{});
              ^
prog.cc:7:6: note: candidate: template<class T, std::enable_if_t<std::is_same<typename std::decay<_Tp>::type, int>::value>* <anonymous> > void foo(T&&)
 void foo(T&&) {}
      ^~~
prog.cc:7:6: note:   template argument deduction/substitution failed:
prog.cc:10:14: note:   couldn't deduce template parameter '<anonymous>'
     foo(int{});
              ^
Exit Code:
1