fork(4) download
  1. #include <iostream>
  2. #include <tuple>
  3.  
  4. int main()
  5. {
  6. std::tuple<int, std::string, bool> foo { 10, "Hello, world!", false };
  7.  
  8. auto foo_ext = std::tuple_cat(foo, std::make_tuple('a'));
  9.  
  10. std::cout << std::get<0>(foo_ext) << "\n"
  11. << std::get<1>(foo_ext) << "\n"
  12. << std::get<2>(foo_ext) << "\n"
  13. << std::get<3>(foo_ext) << "\n";
  14. }
  15.  
Success #stdin #stdout 0s 2984KB
stdin
Standard input is empty
stdout
10
Hello, world!
0
a