#include <iostream>
#include <type_traits>
using namespace std;

namespace detail
{
	template <typename T>
	auto has_to_string_helper (...) -> false_type;
	
	template <typename T>
	auto has_to_string_helper (int) -> decltype(std::to_string(std::declval<T>()), true_type{});
}

template <typename T>
using has_to_string = decltype(detail::has_to_string_helper<T>(0));

template<typename T> 
enable_if_t<has_to_string<T>::value, void> stringify(T t){
    cout << "has\n";
}
template<typename T> 
enable_if_t<!has_to_string<T>::value, void> stringify(T t){
    cout << "has not\n";
}

int main() {
	stringify(0);
	stringify("");
	return 0;
}