fork download
  1. #include <tuple>
  2.  
  3. template<typename... T>
  4. struct foo;
  5.  
  6. template<typename... T>
  7. struct foo<std::tuple<T...>> : T... {};
  8.  
  9. struct a { int x; };
  10. struct b { int y; };
  11.  
  12. int main() {
  13. foo<std::tuple<a, b> > f;
  14. f.x = 5;
  15. f.y = 8;
  16. }
Success #stdin #stdout 0s 2924KB
stdin
Standard input is empty
stdout
Standard output is empty