Index: boost/thread/locks.hpp =================================================================== --- boost/thread/locks.hpp (revision 50927) +++ boost/thread/locks.hpp (working copy) @@ -36,8 +36,10 @@ namespace boost true_type dummy[2]; }; + template struct sfinae_type { }; + template - static true_type has_member(U*,void (U::*dummy)()=&U::lock); + static true_type has_member(U*,void (U::*dummy)()=&U::lock,sfinae_type* = NULL); static false_type has_member(void*); BOOST_STATIC_CONSTANT(bool, value=sizeof(has_member_lock::has_member((T*)NULL))==sizeof(true_type)); @@ -52,8 +54,10 @@ namespace boost true_type dummy[2]; }; + template struct sfinae_type { }; + template - static true_type has_member(U*,void (U::*dummy)()=&U::unlock); + static true_type has_member(U*,void (U::*dummy)()=&U::unlock,sfinae_type* = NULL); static false_type has_member(void*); BOOST_STATIC_CONSTANT(bool, value=sizeof(has_member_unlock::has_member((T*)NULL))==sizeof(true_type)); @@ -68,8 +72,10 @@ namespace boost true_type dummy[2]; }; + template struct sfinae_type { }; + template - static true_type has_member(U*,bool (U::*dummy)()=&U::try_lock); + static true_type has_member(U*,sfinae_type* = NULL,sfinae_type* = NULL); static false_type has_member(void*); BOOST_STATIC_CONSTANT(bool, value=sizeof(has_member_try_lock::has_member((T*)NULL))==sizeof(true_type));