template class is_customly_convertible { typedef char one; struct two { char x[2]; }; template static one test(decltype(&C::operator())); template static two test(...); public: enum { val = sizeof(test>(0)) == sizeof(char) }; }; class NoTriviallyConstruct { public: NoTriviallyConstruct() = delete; }; class NoCopyConstruct { public: NoCopyConstruct(const NoCopyConstruct&) = delete; NoCopyConstruct& operator=(const NoCopyConstruct&) = delete; }; template<> struct Convert { int operator()(const int &a) { return a; } }; template<> struct Convert { int operator()(const int &a) { return a; } };