Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C++

Compiler

clang 7.0.0

Options
Warnings
Boost 1.70.0
C++17
no pedantic

Author

anonymous

over 5 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-7.0.0/include -std=c++17
prog.cc:11:5: error: function cannot return function type 'int (float)'
    R operator()(Args&&... args)
    ^
prog.cc:20:30: note: in instantiation of template class 'CallFunction<int (float)>' requested here
    CallFunction<int(float)> cf;
                             ^
prog.cc:21:38: error: type 'CallFunction<int (float)>' does not provide a call operator
    std::cout << "return value: " << cf(200.f) << "\n";
                                     ^~
2 errors generated.
Exit Code:
1