fork download
  1. #include <iostream>
  2. #include <tuple>
  3.  
  4.  
  5. struct point : std::tuple<int, int, int>
  6. {
  7. enum { x, y, z };
  8. };
  9.  
  10.  
  11. int main()
  12. {
  13. point p;
  14. std::cout << std::get<point::x>(p) << std::endl;
  15. std::cout << std::get<point::y>(p) << std::endl;
  16. std::cout << std::get<point::z>(p) << std::endl;
  17. }
Success #stdin #stdout 0s 2928KB
stdin
Standard input is empty
stdout
0
0
0