#include <iostream>
#include <string>
#include <vector>
namespace details
{
template <typename T>
struct f_caller
{
static void f() { std::cout << "generic" << std::endl; }
};
template<>
struct f_caller<std::string>
{
static void f() { std::cout << "string" << std::endl; }
};
template<typename T>
struct f_caller<std::vector<T>>
{
static void f() { std::cout << "vector" << std::endl; }
};
}
template<typename T>
void f()
{
details::f_caller<T>::f();
}
int main()
{
f<double>();
f<std::string>();
f<std::vector<int>>();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHZlY3Rvcj4KCm5hbWVzcGFjZSBkZXRhaWxzCnsKICAgIHRlbXBsYXRlIDx0eXBlbmFtZSBUPgogICAgc3RydWN0IGZfY2FsbGVyCiAgICB7CiAgICAgICAgc3RhdGljIHZvaWQgZigpIHsgc3RkOjpjb3V0IDw8ICJnZW5lcmljIiA8PCBzdGQ6OmVuZGw7IH0KICAgIH07CgogICAgdGVtcGxhdGU8PgogICAgc3RydWN0IGZfY2FsbGVyPHN0ZDo6c3RyaW5nPgogICAgewogICAgICAgIHN0YXRpYyB2b2lkIGYoKSB7IHN0ZDo6Y291dCA8PCAic3RyaW5nIiA8PCBzdGQ6OmVuZGw7IH0KICAgIH07CgogICAgdGVtcGxhdGU8dHlwZW5hbWUgVD4KICAgIHN0cnVjdCBmX2NhbGxlcjxzdGQ6OnZlY3RvcjxUPj4KICAgIHsKICAgICAgICBzdGF0aWMgdm9pZCBmKCkgeyBzdGQ6OmNvdXQgPDwgInZlY3RvciIgPDwgc3RkOjplbmRsOyB9CiAgICB9Owp9Cgp0ZW1wbGF0ZTx0eXBlbmFtZSBUPgp2b2lkIGYoKQp7CiAgICBkZXRhaWxzOjpmX2NhbGxlcjxUPjo6ZigpOwp9CgppbnQgbWFpbigpCnsKICAgIGY8ZG91YmxlPigpOwogICAgZjxzdGQ6OnN0cmluZz4oKTsKICAgIGY8c3RkOjp2ZWN0b3I8aW50Pj4oKTsKCiAgICByZXR1cm4gMDsKfQoK