Language
C++
Compiler
gcc 9.1.0
Options
Warnings
Boost 1.70.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-9.1.0/include -std=gnu++2a Exit Code:
1
Author
anonymous
over 6 years ago
C++
gcc 9.1.0
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-9.1.0/include -std=gnu++2a prog.cc: In function 'int main()':
prog.cc:12:17: error: no matching function for call to 'foo(<unresolved overloaded function type>)'
12 | foo(bar<int>); // (1)
| ^
prog.cc:8:6: note: candidate: 'template<class F> void foo(F&&)'
8 | void foo(F&&) {
| ^~~
prog.cc:8:6: note: template argument deduction/substitution failed:
prog.cc:12:17: note: couldn't deduce template parameter 'F'
12 | foo(bar<int>); // (1)
| ^