Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 4 years ago

Language

C++

Compiler

gcc 9.3.0

Options
Warnings
Don't Use Boost
C++17
-pedantic

Author

anonymous

over 4 years ago

$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic
prog.cc: In function 'int main()':
prog.cc:17:30: error: no matching function for call to 'getEnumFromObj(int)'
   17 |     auto v = getEnumFromObj(5);
      |                              ^
prog.cc:6:17: note: candidate: 'template<class Object, typename std::enable_if<std::is_same<Object, int>::value>::type* <anonymous> > unsigned int getEnumFromObj(Object)'
    6 | inline unsigned getEnumFromObj(Object){
      |                 ^~~~~~~~~~~~~~
prog.cc:6:17: note:   template argument deduction/substitution failed:
prog.cc:17:30: note:   couldn't deduce template parameter '<anonymous>'
   17 |     auto v = getEnumFromObj(5);
      |                              ^
Exit Code:
1