@@ -43,6 +43,13 @@ struct non_member_function_cast_impl
4343template <class T >
4444struct member_function_cast_impl
4545{
46+ # ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
47+ template <class U >
48+ static non_member_function_cast_impl stage1 (U)
49+ {
50+ return non_member_function_cast_impl ();
51+ }
52+ # endif
4653 template <class S , class R >
4754 static cast_helper<S,R(T::*)()> stage1 (R (S::*)())
4855 {
@@ -85,7 +92,6 @@ struct member_function_cast_impl
8592 return cast_helper<S,R (T::*)(A0,A1,A2,A3,A4,A5)>();
8693 }
8794
88- # if 1
8995 template <class S , class R >
9096 static cast_helper<S,R(T::*)()const > stage1 (R (S::*)()const )
9197 {
@@ -170,7 +176,6 @@ struct member_function_cast_impl
170176 return cast_helper<S,R (T::*)(A0,A1,A2,A3,A4,A5)volatile >();
171177 }
172178
173- // # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
174179 template <class S , class R >
175180 static cast_helper<S,R(T::*)()const volatile > stage1 (R (S::*)()const volatile)
176181 {
@@ -212,17 +217,20 @@ struct member_function_cast_impl
212217 {
213218 return cast_helper<S,R (T::*)(A0,A1,A2,A3,A4,A5)const volatile >();
214219 }
215- # endif
216220};
217221
218222
219223template <class T , class SF >
220224struct member_function_cast
225+ # ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
226+ : member_function_cast_impl<T>
227+ # else
221228 : mpl::select_type<
222229 is_member_function_pointer<SF>::value
223230 , member_function_cast_impl<T>
224231 , non_member_function_cast_impl
225232 >::type
233+ # endif
226234{
227235};
228236
0 commit comments