Language
C++
Compiler
gcc 11.1.0
Options
Warnings
Optimization
Don't Use Boost
C++2a
-pedantic-errors
$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=c++2a -pedantic-errors Exit Code:
1
Author
anonymous
over 4 years ago
C++
gcc 11.1.0
Author
anonymous
over 4 years ago
$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=c++2a -pedantic-errors prog.cc: In function 'int main()':
prog.cc:18:15: error: no matching function for call to 'frombulate(SmartPtr<int>&)'
18 | frombulate(spi);
| ~~~~~~~~~~^~~~~
prog.cc:14:6: note: candidate: 'template<class U> void frombulate(SmartPtr<const T>)'
14 | void frombulate(SmartPtr<const U>) {}
| ^~~~~~~~~~
prog.cc:14:6: note: template argument deduction/substitution failed:
prog.cc:18:15: note: types 'const T' and 'int' have incompatible cv-qualifiers
18 | frombulate(spi);
| ~~~~~~~~~~^~~~~