Ticket #1292: mpl070930.diff

File mpl070930.diff, 4.5 KB (added by Nicola Musatti, 15 years ago)
  • D:/boost/svn/branches/bcbboost/boost/boost/mpl/aux_/config/overload_resolution.hpp

     
    1818
    1919#if    !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \
    2020    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
    21     && (   BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
     21    && (   BOOST_WORKAROUND(__BORLANDC__, < 0x590) \
    2222        || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \
    2323        )
    2424
  • D:/boost/svn/branches/bcbboost/boost/boost/mpl/aux_/config/ttp.hpp

     
    1919#include <boost/mpl/aux_/config/workaround.hpp>
    2020
    2121#if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
    22     && defined(BOOST_NO_TEMPLATE_TEMPLATES)
     22    && ( defined(BOOST_NO_TEMPLATE_TEMPLATES) \
     23      || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590) ) \
     24       )
    2325
    2426#   define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS
    2527
  • D:/boost/svn/branches/bcbboost/boost/boost/mpl/aux_/config/ctps.hpp

     
    1919
    2020#if    !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \
    2121    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
    22     && BOOST_WORKAROUND(__BORLANDC__, < 0x600)
     22    && BOOST_WORKAROUND(__BORLANDC__, < 0x582)
    2323
    2424#   define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC
    2525
  • D:/boost/svn/branches/bcbboost/boost/boost/mpl/has_xxx.hpp

     
    2626
    2727#include <boost/preprocessor/cat.hpp>
    2828
     29#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
     30# include <boost/type_traits/is_class.hpp>
     31#endif
     32
    2933#if !defined(BOOST_MPL_CFG_NO_HAS_XXX)
    3034
    3135#   if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
     
    182186}; \
    183187/**/
    184188
     189#   elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
     190
     191#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \
     192template< typename T, bool IS_CLASS > \
     193struct trait_tester \
     194{ \
     195    BOOST_STATIC_CONSTANT( bool,  value = false ); \
     196}; \
     197template< typename T > \
     198struct trait_tester< T, true > \
     199{ \
     200    struct trait_tester_impl \
     201    { \
     202        template < class U > \
     203        static int  resolve( boost::mpl::aux::type_wrapper<U> const volatile * \
     204                           , boost::mpl::aux::type_wrapper<typename U::name >* = 0 ); \
     205        static char resolve( ... ); \
     206    }; \
     207    typedef boost::mpl::aux::type_wrapper<T> t_; \
     208    BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \
     209}; \
     210template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
     211struct trait           \
     212{                      \
     213    BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, boost::is_class< T >::value >::value) );     \
     214    typedef boost::mpl::bool_< trait< T, fallback_ >::value > type; \
     215};
     216
     217#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
     218    BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \
     219                                         , BOOST_PP_CAT(trait,_tester)      \
     220                                         , name       \
     221                                         , default_ ) \
     222/**/
     223
    185224#   else // other SFINAE-capable compilers
    186225
    187226#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \