prog.cpp: In lambda function:
prog.cpp:6:44: error: 'std::cout' cannot appear in a constant-expression
prog.cpp:6:52: error: 'this' cannot appear in a constant-expression
prog.cpp:6:58: error: '->' cannot appear in a constant-expression
prog.cpp:6:68: error: 'std::endl(std::basic_ostream<_CharT, _Traits>&)' cannot appear in a constant-expression
prog.cpp: At global scope:
prog.cpp:6:74: error: ISO C++ forbids initialization of member 'b'
prog.cpp:6:74: error: making 'b' static
prog.cpp:6:74: error: invalid in-class initialization of static data member of non-integral type 'std::function<void()>'
prog.cpp:7:13: error: ISO C++ forbids initialization of member 'i'
prog.cpp:7:13: error: making 'i' static
prog.cpp:7:13: error: ISO C++ forbids in-class initialization of non-const static member 'i'
prog.cpp: In function 'int main()':
prog.cpp:14:7: error: 'struct A' has no member named 'b'