Language
C++
Compiler
gcc 9.2.0
Options
Boost 1.70.0
C++17
no pedantic
$ g++ prog.cc -I/opt/wandbox/boost-1.70.0/gcc-9.2.0/include -std=c++17 Exit Code:
1
Author
anonymous
almost 7 years ago
C++
gcc 9.2.0
Author
anonymous
almost 7 years ago
$ g++ prog.cc -I/opt/wandbox/boost-1.70.0/gcc-9.2.0/include -std=c++17 prog.cc: In function 'int run_old(int, Functor) [with Functor = SubOne]':
prog.cc:17:22: error: could not convert 'AddOne()' from 'AddOne' to 'SubOne'
17 | run_old<SubOne>(1);
| ^
| |
| AddOne
prog.cc:17:22: note: when instantiating default argument for call to 'int run_old(int, Functor) [with Functor = SubOne]'
prog.cc: In function 'int main()':
prog.cc:17:22: error: could not convert 'AddOne()' from 'AddOne' to 'SubOne'