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