2 // { dg-do compile { target c++11 } }
9 : public virtual A { };
11 template<typename From, typename To>
12 class mini_is_convertible
15 typedef struct { char arr[2]; } two;
17 template<typename To1>
18 static void test_aux(To1);
20 template<typename To1, typename From1>
21 static decltype(test_aux<To1>(std::declval<From1>()), one())
24 template<typename, typename>
28 static const bool value = sizeof(test<To, From>(0)) == 1;
31 template<typename From, typename To>
32 const bool mini_is_convertible<From, To>::value;
34 static_assert (!mini_is_convertible<int (B::*) (int),
35 int (A::*) (int)>::value, "");
36 static_assert (!mini_is_convertible<int (B::*), int (A::*)>::value, "");
37 static_assert (!mini_is_convertible<int (A::*) (int),
38 int (B::*) (int)>::value, "");
39 static_assert (!mini_is_convertible<int (A::*), int (B::*)>::value, "");