Language
C++
Compiler
gcc 8.2.0
Options
Warnings
Don't Use Boost
C++11
no pedantic
$ g++ prog.cc -Wall -Wextra  -std=c++11  Exit Code: 
1
Author
anonymous
over 6 years ago
C++
gcc 8.2.0
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra  -std=c++11  prog.cc: In function 'int main()':
prog.cc:22:59: error: cannot convert 'main()::<lambda(int)>' to 'void (*)(int)'
     callWith10([=](int x) { std::cout << x << std::endl; });
                                                           ^
prog.cc:3:24: note:   initializing argument 1 of 'void callWith10(void (*)(int))'
 void callWith10(void(* bar)(int))
                 ~~~~~~~^~~~~~~~~