fork download
  1. #include <cassert>
  2.  
  3. auto foo() {
  4. return []() {
  5. struct {
  6. int i;
  7. int j;
  8. } tmp = {1, 2};
  9. return tmp;
  10. };
  11. }
  12.  
  13. int main() {
  14. auto value = foo()();
  15. assert(value.i == 1 && value.j == 2);
  16. return 0;
  17. }
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty