template class is_customly_convertible { typedef char first; struct second { char x[2]; }; template static first test(decltype(&C::operator())); template static second test(...); public: enum { val = 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; } };