#include <string>
#include <list>
#include <vector>
template <template <typename, typename> class Container,
template <typename> class Alloc = std::allocator>
struct ContainerTests
{
typedef Container<int, Alloc<int> > IntContainer;
typedef Container<std::string, Alloc<int> > StringContainer;
//
void DoTests()
{
IntContainer ints;
StringContainer strings;
// ... etc
}
};
int main()
{
ContainerTests<std::vector> t1;
ContainerTests<std::list> t2;
t1.DoTests();
t2.DoTests();
}
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGxpc3Q+CiNpbmNsdWRlIDx2ZWN0b3I+Cgp0ZW1wbGF0ZSA8dGVtcGxhdGUgPHR5cGVuYW1lLCB0eXBlbmFtZT4gY2xhc3MgQ29udGFpbmVyLAogICAgICAgICAgdGVtcGxhdGUgPHR5cGVuYW1lPiBjbGFzcyBBbGxvYyA9IHN0ZDo6YWxsb2NhdG9yPgpzdHJ1Y3QgQ29udGFpbmVyVGVzdHMgCnsKICAgIHR5cGVkZWYgQ29udGFpbmVyPGludCwgQWxsb2M8aW50PiA+IEludENvbnRhaW5lcjsKICAgIHR5cGVkZWYgQ29udGFpbmVyPHN0ZDo6c3RyaW5nLCBBbGxvYzxpbnQ+ID4gU3RyaW5nQ29udGFpbmVyOwogICAgLy8KICAgIHZvaWQgRG9UZXN0cygpCiAgICB7CiAgICAgICAgSW50Q29udGFpbmVyIGludHM7CiAgICAgICAgU3RyaW5nQ29udGFpbmVyIHN0cmluZ3M7CiAgICAgICAgLy8gLi4uIGV0YwogICAgfQp9OwoKaW50IG1haW4oKQp7CiAgICBDb250YWluZXJUZXN0czxzdGQ6OnZlY3Rvcj4gdDE7CiAgICBDb250YWluZXJUZXN0czxzdGQ6Omxpc3Q+ICAgdDI7CgogICAgdDEuRG9UZXN0cygpOwogICAgdDIuRG9UZXN0cygpOwp9Cg==