fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct A
  5. {
  6. A()
  7. : x([]{ int z = 3; return z + 8; }())
  8. {}
  9.  
  10. int x;
  11. };
  12.  
  13. int main() {
  14. A a;
  15. cout << a.x;
  16. return 0;
  17. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
11