fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <set>
  4.  
  5. template <template <typename...> class C, typename... T>
  6. struct wrapper {
  7. typedef C<T...> type;
  8. };
  9.  
  10. int main() {
  11. wrapper<std::vector, int>::type foo { 1, 2, 3 };
  12. wrapper<std::set, int>::type bar { 4, 5, 6 };
  13.  
  14. for (auto i : foo)
  15. std::cout << i << ' ';
  16. for (auto i : bar)
  17. std::cout << i << ' ';
  18. return 0;
  19. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
1 2 3 4 5 6