Boost logo

Boost-Commit :

From: nicola.musatti_at_[hidden]
Date: 2007-10-02 16:23:10


Author: nmusatti
Date: 2007-10-02 16:23:09 EDT (Tue, 02 Oct 2007)
New Revision: 39662
URL: http://svn.boost.org/trac/boost/changeset/39662

Log:
Updated to support C++Builder 2007 Update 3 (bcc32 5.9.2)
Text files modified:
   branches/bcbboost/boost/mpl/aux_/config/ctps.hpp | 2 +-
   branches/bcbboost/boost/mpl/aux_/config/overload_resolution.hpp | 2 +-
   branches/bcbboost/boost/mpl/aux_/config/ttp.hpp | 4 +++-
   branches/bcbboost/boost/mpl/has_xxx.hpp | 39 +++++++++++++++++++++++++++++++++++++++
   4 files changed, 44 insertions(+), 3 deletions(-)

Modified: branches/bcbboost/boost/mpl/aux_/config/ctps.hpp
==============================================================================
--- branches/bcbboost/boost/mpl/aux_/config/ctps.hpp (original)
+++ branches/bcbboost/boost/mpl/aux_/config/ctps.hpp 2007-10-02 16:23:09 EDT (Tue, 02 Oct 2007)
@@ -19,7 +19,7 @@
 
 #if !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \
     && !defined(BOOST_MPL_PREPROCESSING_MODE) \
- && BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+ && BOOST_WORKAROUND(__BORLANDC__, < 0x582)
 
 # define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC
 

Modified: branches/bcbboost/boost/mpl/aux_/config/overload_resolution.hpp
==============================================================================
--- branches/bcbboost/boost/mpl/aux_/config/overload_resolution.hpp (original)
+++ branches/bcbboost/boost/mpl/aux_/config/overload_resolution.hpp 2007-10-02 16:23:09 EDT (Tue, 02 Oct 2007)
@@ -18,7 +18,7 @@
 
 #if !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \
     && !defined(BOOST_MPL_PREPROCESSING_MODE) \
- && ( BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
+ && ( BOOST_WORKAROUND(__BORLANDC__, < 0x590) \
         || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \
         )
 

Modified: branches/bcbboost/boost/mpl/aux_/config/ttp.hpp
==============================================================================
--- branches/bcbboost/boost/mpl/aux_/config/ttp.hpp (original)
+++ branches/bcbboost/boost/mpl/aux_/config/ttp.hpp 2007-10-02 16:23:09 EDT (Tue, 02 Oct 2007)
@@ -19,7 +19,9 @@
 #include <boost/mpl/aux_/config/workaround.hpp>
 
 #if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
- && defined(BOOST_NO_TEMPLATE_TEMPLATES)
+ && ( defined(BOOST_NO_TEMPLATE_TEMPLATES) \
+ || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590) ) \
+ )
 
 # define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS
 

Modified: branches/bcbboost/boost/mpl/has_xxx.hpp
==============================================================================
--- branches/bcbboost/boost/mpl/has_xxx.hpp (original)
+++ branches/bcbboost/boost/mpl/has_xxx.hpp 2007-10-02 16:23:09 EDT (Tue, 02 Oct 2007)
@@ -26,6 +26,10 @@
 
 #include <boost/preprocessor/cat.hpp>
 
+#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
+# include <boost/type_traits/is_class.hpp>
+#endif
+
 #if !defined(BOOST_MPL_CFG_NO_HAS_XXX)
 
 # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
@@ -182,6 +186,41 @@
 }; \
 /**/
 
+# elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
+
+# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \
+template< typename T, bool IS_CLASS > \
+struct trait_tester \
+{ \
+ BOOST_STATIC_CONSTANT( bool, value = false ); \
+}; \
+template< typename T > \
+struct trait_tester< T, true > \
+{ \
+ struct trait_tester_impl \
+ { \
+ template < class U > \
+ static int resolve( boost::mpl::aux::type_wrapper<U> const volatile * \
+ , boost::mpl::aux::type_wrapper<typename U::name >* = 0 ); \
+ static char resolve( ... ); \
+ }; \
+ typedef boost::mpl::aux::type_wrapper<T> t_; \
+ BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \
+}; \
+template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
+struct trait \
+{ \
+ BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, boost::is_class< T >::value >::value) ); \
+ typedef boost::mpl::bool_< trait< T, fallback_ >::value > type; \
+};
+
+# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
+ BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \
+ , BOOST_PP_CAT(trait,_tester) \
+ , name \
+ , default_ ) \
+/**/
+
 # else // other SFINAE-capable compilers
 
 # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk