Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <typename T, typename U> struct is_convertible_test {
- static std::true_type test(U);
- static std::false_type test(...);
- static T make_T();
- enum {
- value = std::is_same<decltype(test(make_T())), std::true_type>::value
- };
- };
- template <typename T, typename U> struct is_base_of_test {
- enum {
- value = is_convertible_test<U, T>::value && !(is_convertible_test<T, U>::value)
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement