Language
C++
Compiler
gcc 9.3.0
Options
Warnings
Don't Use Boost
C++17
-pedantic
$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic Exit Code:
1
Author
anonymous
over 4 years ago
C++
gcc 9.3.0
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);
| ^