#include <type_traits>
#include <string>
#include <iostream>
template<class T>
typename std::enable_if<!std::is_convertible<T, std::string>::value, void>::type
fn(T t)
{
std::cout << "base" << std::endl;
}
template<class T>
typename std::enable_if<std::is_convertible<T, std::string>::value, void>::type
fn(T t)
{
std::cout << "string" << std::endl;
}
int main()
{
fn("hello");
fn(std::string("new"));
fn(1);
}
I2luY2x1ZGUgPHR5cGVfdHJhaXRzPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8aW9zdHJlYW0+Cgp0ZW1wbGF0ZTxjbGFzcyBUPgp0eXBlbmFtZSBzdGQ6OmVuYWJsZV9pZjwhc3RkOjppc19jb252ZXJ0aWJsZTxULCBzdGQ6OnN0cmluZz46OnZhbHVlLCB2b2lkPjo6dHlwZQpmbihUIHQpCnsKICAgc3RkOjpjb3V0IDw8ICJiYXNlIiA8PCBzdGQ6OmVuZGw7Cn0KCnRlbXBsYXRlPGNsYXNzIFQ+CnR5cGVuYW1lIHN0ZDo6ZW5hYmxlX2lmPHN0ZDo6aXNfY29udmVydGlibGU8VCwgc3RkOjpzdHJpbmc+Ojp2YWx1ZSwgdm9pZD46OnR5cGUKZm4oVCB0KSAKewogICBzdGQ6OmNvdXQgPDwgInN0cmluZyIgPDwgc3RkOjplbmRsOwp9CgppbnQgbWFpbigpCnsKICAgZm4oImhlbGxvIik7CiAgIGZuKHN0ZDo6c3RyaW5nKCJuZXciKSk7CiAgIGZuKDEpOwp9