#include <iostream>
#include <type_traits>
template <typename T, typename std::enable_if< std::is_same<T, int>::value, int >::type = 0>
void foo(T t) {
std::cout << "int" << std::endl;
}
template <typename T, typename std::enable_if< !std::is_same<T, int>::value, int >::type = 0>
void foo(T t) {
std::cout << "not int" << std::endl;
}
int main(int argc, char* argv[])
{
foo(10);
foo(10.1);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHlwZV90cmFpdHM+Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVCwgdHlwZW5hbWUgc3RkOjplbmFibGVfaWY8IHN0ZDo6aXNfc2FtZTxULCBpbnQ+Ojp2YWx1ZSwgaW50ID46OnR5cGUgPSAwPgp2b2lkIGZvbyhUIHQpIHsKICBzdGQ6OmNvdXQgPDwgImludCIgPDwgc3RkOjplbmRsOwp9Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVCwgdHlwZW5hbWUgc3RkOjplbmFibGVfaWY8ICFzdGQ6OmlzX3NhbWU8VCwgaW50Pjo6dmFsdWUsIGludCA+Ojp0eXBlID0gMD4Kdm9pZCBmb28oVCB0KSB7CiAgc3RkOjpjb3V0IDw8ICJub3QgaW50IiA8PCBzdGQ6OmVuZGw7Cn0KCmludCBtYWluKGludCBhcmdjLCBjaGFyKiBhcmd2W10pCnsKICBmb28oMTApOwogIGZvbygxMC4xKTsKICByZXR1cm4gMDsKfQo=