fork download
  1. #include <iostream>
  2.  
  3. auto f() {
  4. struct {
  5. double d1;
  6. double d2;
  7. double d3;
  8. } x{ 1.0, 2.0, 3.0 };
  9.  
  10. return x;
  11. }
  12.  
  13. int main() {
  14. auto r = f();
  15. std::cout << r.d1 << " " << r.d2 << " " << r.d3 << std::endl;
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
1 2 3