class Foo { public: const int n_; Foo(); }; Foo::Foo() : n_( []() -> int { return 42; } ) { } int main() { Foo f; }
Standard input is empty
prog.cpp: In constructor 'Foo::Foo()': prog.cpp:9:34: error: invalid conversion from 'int (*)()' to 'int'
Standard output is empty