fork(1) download
  1. #include <string>
  2. #include <list>
  3. #include <vector>
  4.  
  5. template <template <typename, typename> class Container,
  6. template <typename> class Alloc = std::allocator>
  7. struct ContainerTests
  8. {
  9. typedef Container<int, Alloc<int> > IntContainer;
  10. typedef Container<std::string, Alloc<int> > StringContainer;
  11. //
  12. void DoTests()
  13. {
  14. IntContainer ints;
  15. StringContainer strings;
  16. // ... etc
  17. }
  18. };
  19.  
  20. int main()
  21. {
  22. ContainerTests<std::vector> t1;
  23. ContainerTests<std::list> t2;
  24.  
  25. t1.DoTests();
  26. t2.DoTests();
  27. }
  28.  
Success #stdin #stdout 0s 2720KB
stdin
Standard input is empty
stdout
Standard output is empty