fork download
  1. #include <vector>
  2. struct Foo;
  3. std::vector<Foo> getFilteredFoos(bool (*filter)(const Foo &) = [](const Foo &){return true;});
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:79: error: type ‘__lambda0’ with no linkage used to declare function ‘auto __lambda0::operator()(const Foo&) const’ with linkage [-fpermissive]
  std::vector<Foo> getFilteredFoos(bool (*filter)(const Foo &) = [](const Foo &){return true;});
                                                                               ^
prog.cpp:3:93: warning: lambda expressions only available with -std=c++11 or -std=gnu++11 [enabled by default]
  std::vector<Foo> getFilteredFoos(bool (*filter)(const Foo &) = [](const Foo &){return true;});
                                                                                             ^
stdout
Standard output is empty