2 template<typename T> struct takes_member_ptr;
3 template<typename T, typename Klasse> struct takes_member_ptr<T Klasse::*> {};
5 template<typename T, typename Klasse>
6 void fun_takes_member_ptr(T Klasse::*) {}
9 template<typename T> struct order_member_ptrs;
10 template<typename T, typename Klasse> struct order_member_ptrs<T Klasse::*> {};
11 template<typename R, typename T1, typename Klasse>
12 struct order_member_ptrs<R (Klasse::*)(T1)>
17 template<typename R, typename T1, typename Klasse>
18 struct order_member_ptrs<R (Klasse::*)(T1) const>
23 template<typename R, typename T1, typename Klasse>
24 struct order_member_ptrs<R (Klasse::*)(T1) volatile>
29 template<typename R, typename T1, typename Klasse>
30 struct order_member_ptrs<R (Klasse::*)(T1) const volatile>
38 void bar_c(float) const {}
39 void bar_v(float) volatile {}
40 void bar_cv(float) const volatile {}
45 sizeof(takes_member_ptr<void (X::*)(float)>);
46 sizeof(takes_member_ptr<void (X::*)(float) const>);
47 sizeof(takes_member_ptr<void (X::*)(float) volatile>);
48 sizeof(takes_member_ptr<void (X::*)(float) const volatile>);
49 sizeof(order_member_ptrs<void (X::*)(float)>::type);
50 sizeof(order_member_ptrs<void (X::*)(float) const>::c_type);
51 sizeof(order_member_ptrs<void (X::*)(float) volatile>::v_type);
52 sizeof(order_member_ptrs<void (X::*)(float) const volatile>::cv_type);
53 fun_takes_member_ptr(&X::bar);
54 fun_takes_member_ptr(&X::bar_c);
55 fun_takes_member_ptr(&X::bar_v);
56 fun_takes_member_ptr(&X::bar_cv);