fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct A
  5. {
  6. A(int y) : x{y} {}
  7. A() : A(4) {}
  8. int x = 0;
  9. };
  10.  
  11. int main()
  12. {
  13. cout << A{}.x << '\n';
  14. return 0;
  15. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
4