Language
C++
Compiler
clang 6.0.1
Options
Warnings
Boost 1.68.0
C++17
no pedantic
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-6.0.1/include -std=c++17 Exit Code:
1
Author
anonymous
over 7 years ago
C++
clang 6.0.1
Author
anonymous
over 7 years ago
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-6.0.1/include -std=c++17 prog.cc:28:5: error: no matching function for call to 'myfunc'
myfunc(x{});
^~~~~~
prog.cc:14:5: note: candidate template ignored: requirement 'std::is_convertible_v<x, std::function<int (int)> >' was not satisfied [with F = x]
int myfunc(F &&x) {
^
1 error generated.