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 { value = sizeof(test>(0)) == sizeof(char) }; }; class NoTriviallyConstructible { public: NoTriviallyConstructible() = delete; }; class NoCopyConstructible { public: NoCopyConstructible(const NoCopyConstructible&) = delete; NoCopyConstructible& operator=(const NoCopyConstructible&) = delete; }; template<> struct Convert { int operator()(const int &a) { return a; } }; template<> struct Convert { int operator()(const int &a) { return a; } };