fork download
  1.  
  2.  
  3. #include <iostream>
  4.  
  5. struct
  6. {
  7. double k1 = 0.123;
  8. } bar;
  9.  
  10. int foo(decltype(bar)& a)
  11. {
  12. return a.k1-1;
  13. };
  14.  
  15. int main()
  16. {
  17. std::cout << foo(bar) << std::endl;
  18. return(0);
  19. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
0