From db9d9518a5289670f6248a44ce2796611f62dd00 Mon Sep 17 00:00:00 2001 From: Stefan Slapeta Date: Fri, 10 Feb 2006 13:51:09 +0000 Subject: [PATCH] changes for CW [SVN r32806] --- include/boost/type_traits/is_convertible.hpp | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index dd56636..eb836c0 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -23,6 +23,10 @@ #include #endif +#if defined(__MWERKS__) +#include +#include +#endif // should be always the last #include directive #include @@ -184,6 +188,47 @@ struct is_convertible_basic_impl }; }; +#elif defined(__MWERKS__) + +template +struct is_convertible_basic_impl_aux; + +struct any_conversion +{ + template any_conversion(const volatile T&); +}; + +template +struct is_convertible_basic_impl_aux +{ + 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); + static From _m_from; + + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + static From _m_from; + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +}; + +template +struct is_convertible_basic_impl: + is_convertible_basic_impl_aux< + From,To, + ::boost::is_function::type>::value + > +{}; + #else //