[luabind-cvs] luabind/luabind/luabind value_wrapper.hpp,1.1.2.7,1.1.2.8
Brought to you by:
arvidn,
daniel_wallin
From: Daniel W. <dan...@us...> - 2005-10-19 12:02:21
|
Update of /cvsroot/luabind/luabind/luabind/luabind In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18613 Modified Files: Tag: beta7-devel2 value_wrapper.hpp Log Message: Fixed is_value_wrapper_arg for compilers that has LUABIND_USE_VALUE_WRAPPER_TAG defined. Index: value_wrapper.hpp =================================================================== RCS file: /cvsroot/luabind/luabind/luabind/luabind/Attic/value_wrapper.hpp,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -d -r1.1.2.7 -r1.1.2.8 --- value_wrapper.hpp 30 Sep 2005 11:19:41 -0000 1.1.2.7 +++ value_wrapper.hpp 19 Oct 2005 12:02:11 -0000 1.1.2.8 @@ -127,33 +127,25 @@ #else # include <luabind/detail/yes_no.hpp> +# include <boost/type_traits/add_reference.hpp> namespace luabind { namespace detail { template<class T> - typename is_value_wrapper<T>::type - is_value_wrapper_arg_check(void(*)(T), ...); - - template<class T> - typename is_value_wrapper<T>::type - is_value_wrapper_arg_check(void(*)(T&), int); - - template<class T> - typename is_value_wrapper<T>::type - is_value_wrapper_arg_check(void(*)(T const&), long); - - boost::mpl::false_ is_value_wrapper_arg_check(...); + typename is_value_wrapper<T>::type is_value_wrapper_arg_check(T const volatile*); yes_t to_yesno(boost::mpl::true_); no_t to_yesno(boost::mpl::false_); - + template<class T> struct is_value_wrapper_arg_aux { + static typename boost::add_reference<T>::type x; + BOOST_STATIC_CONSTANT(bool, value = - sizeof(to_yesno(is_value_wrapper_arg_check((void(*)(T))0, 0L))) + sizeof(to_yesno(is_value_wrapper_arg_check(&x))) == sizeof(yes_t) ); |