struct NoCopyConstructible { NoCopyConstructible(const NoCopyConstructible& copy) = delete; NoCopyConstructible operator=(const NoCopyConstructible& copy) = delete; }; struct NoTriviallyConstructible { NoTriviallyConstructible() = delete; }; Test t; template <> struct Convert { int operator()(const int& a) { return a; } }; template <> struct Convert { int operator()(const int& a) { return a; } }; template static constexpr decltype(std::declval>().operator()(t), bool()) test(int a) { return true; } template static constexpr decltype(std::declval>().operator()(0), bool()) test(int a) { return true; } template static constexpr bool test(...) { return false; } template struct is_customly_convertible { static constexpr bool value = test(0); };