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 //