Index: boost/type_traits/intrinsics.hpp =================================================================== --- boost/type_traits/intrinsics.hpp (revision 80081) +++ boost/type_traits/intrinsics.hpp (working copy) @@ -222,11 +222,6 @@ # define BOOST_ALIGNMENT_OF(T) __alignof__(T) # endif -#ifdef __GXX_EXPERIMENTAL_CXX0X__ -# include -# define BOOST_IS_CONVERTIBLE(T,U) (std::is_convertible::value) -#endif - # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif Index: boost/type_traits/is_convertible.hpp =================================================================== --- boost/type_traits/is_convertible.hpp (revision 80081) +++ boost/type_traits/is_convertible.hpp (working copy) @@ -17,13 +17,13 @@ #include #include #include -#include #include #include #include #ifndef BOOST_NO_IS_ABSTRACT #include #endif +#include #include #include @@ -69,7 +69,7 @@ { static no_type BOOST_TT_DECL _m_check(...); static yes_type BOOST_TT_DECL _m_check(To); - static typename add_rvalue_reference::type _m_from; + static typename add_lvalue_reference::type _m_from; enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) }; }; }; @@ -107,7 +107,7 @@ static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); }; - static typename add_rvalue_reference::type _m_from; + static typename add_lvalue_reference::type _m_from; static bool const value = sizeof( checker::_m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type); #pragma option pop @@ -134,10 +134,17 @@ template struct is_convertible_basic_impl { + typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; - static From _m_from; - static bool const value = sizeof( boost::detail::checker::_m_check(static_cast(_m_from), 0) ) + static lvalue_type _m_from; + static bool const value = +#ifndef BOOST_NO_RVALUE_REFERENCES + sizeof( boost::detail::checker::_m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type); +#else + sizeof( boost::detail::checker::_m_check(_m_from, 0) ) + == sizeof(::boost::type_traits::yes_type); +#endif }; #elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \ @@ -167,11 +174,16 @@ { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; - static From _m_from; + static lvalue_type _m_from; BOOST_STATIC_CONSTANT(bool, value = +#ifndef BOOST_NO_RVALUE_REFERENCES sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) +#else + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) +#endif ); }; @@ -194,13 +206,18 @@ template static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); - typedef typename add_rvalue_reference::type rvalue_type; - static From _m_from; + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; // Static constants sometime cause the conversion of _m_from to To to be // called. This doesn't happen with an enum. enum { value = +#ifndef BOOST_NO_RVALUE_REFERENCES sizeof( _m_check(static_cast(_m_from), 0, 0) ) == sizeof(::boost::type_traits::yes_type) +#else + sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type) +#endif }; }; @@ -228,11 +245,16 @@ { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; - static From _m_from; + static lvalue_type _m_from; BOOST_STATIC_CONSTANT(bool, value = +#ifndef BOOST_NO_RVALUE_REFERENCES sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) +#else + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) +#endif ); }; @@ -241,10 +263,15 @@ { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); - typedef typename add_rvalue_reference::type rvalue_type; - static From _m_from; + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; BOOST_STATIC_CONSTANT(bool, value = +#ifndef BOOST_NO_RVALUE_REFERENCES sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) +#else + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) +#endif ); }; @@ -266,8 +293,9 @@ { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; - static From _m_from; + static lvalue_type _m_from; #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) @@ -276,7 +304,11 @@ #endif #endif BOOST_STATIC_CONSTANT(bool, value = +#ifndef BOOST_NO_RVALUE_REFERENCES sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) +#else + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) +#endif ); #ifdef BOOST_MSVC #pragma warning(pop) @@ -290,11 +322,10 @@ template struct is_convertible_impl { - typedef typename add_reference::type ref_type; enum { value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< - ::boost::detail::is_convertible_basic_impl::value, + ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not< @@ -309,11 +340,10 @@ template struct is_convertible_impl { - typedef typename add_reference::type ref_type; BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< - ::boost::detail::is_convertible_basic_impl::value, + ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not<