Index: add_pointer.hpp =================================================================== --- add_pointer.hpp (revision 48982) +++ add_pointer.hpp (working copy) @@ -18,7 +18,7 @@ namespace detail { -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x5A0) // // For some reason this implementation stops Borlands compiler // from dropping cv-qualifiers, it still fails with references Index: config.hpp =================================================================== --- config.hpp (revision 48982) +++ config.hpp (working copy) @@ -30,7 +30,7 @@ || BOOST_WORKAROUND(BOOST_MSVC, <= 1301) \ || !defined(__EDG_VERSION__) && BOOST_WORKAROUND(__GNUC__, < 3) \ || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \ || defined(__ghs) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) \ || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \ Index: extent.hpp =================================================================== --- extent.hpp (revision 48982) +++ extent.hpp (working copy) @@ -17,6 +17,15 @@ namespace detail{ +#if defined( __CODEGEARC__ ) + // wrap the impl as main trait provides additional MPL lambda support + template < typename T, std::size_t N > + struct extent_imp { + static const std::size_t value = __array_extent(T, N); + }; + +#else + template struct extent_imp { @@ -114,8 +123,10 @@ }; #endif #endif -} +#endif // non-CodeGear implementation +} // ::boost::detail + template struct extent : public ::boost::integral_constant::value> Index: intrinsics.hpp =================================================================== --- intrinsics.hpp (revision 48982) +++ intrinsics.hpp (working copy) @@ -153,6 +153,35 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif +# if defined(__CODEGEARC__) +# include +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T) || is_void::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile::value && !is_reference::value || is_void::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value || is_void::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || is_void::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T) || is_void::value) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value || is_void::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value || is_void::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void::value && !is_void::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void::value) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) alignof(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + #ifndef BOOST_IS_UNION # define BOOST_IS_UNION(T) false #endif Index: is_arithmetic.hpp =================================================================== --- is_arithmetic.hpp (revision 48982) +++ is_arithmetic.hpp (working copy) @@ -9,16 +9,19 @@ #ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED #define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED +#if !defined( __CODEGEARC__ ) #include #include #include #include +#endif // should be the last #include #include namespace boost { +#if !defined(__CODEGEARC__) namespace detail { template< typename T > @@ -32,9 +35,14 @@ }; } // namespace detail +#endif //* is a type T an arithmetic type described in the standard (3.9.1p8) +#if defined(__CODEGEARC__) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,__is_arithmetic(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::boost::detail::is_arithmetic_impl::value) +#endif } // namespace boost Index: is_array.hpp =================================================================== --- is_array.hpp (revision 48982) +++ is_array.hpp (working copy) @@ -28,8 +28,9 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,__is_array(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true) Index: is_base_and_derived.hpp =================================================================== --- is_base_and_derived.hpp (revision 48982) +++ is_base_and_derived.hpp (working copy) @@ -240,6 +240,10 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived&,false) #endif +#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename Base,is_base_and_derived,Base,Base,false) +#endif + } // namespace boost #include Index: is_compound.hpp =================================================================== --- is_compound.hpp (revision 48982) +++ is_compound.hpp (working copy) @@ -18,6 +18,7 @@ namespace boost { +#if !defined( __CODEGEARC__ ) namespace detail { template @@ -30,8 +31,13 @@ }; } // namespace detail +#endif // !defined( __CODEGEARC__ ) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,__is_compound(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,::boost::detail::is_compound_impl::value) +#endif } // namespace boost Index: is_const.hpp =================================================================== --- is_const.hpp (revision 48982) +++ is_const.hpp (working copy) @@ -44,8 +44,12 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T)) + +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + //* is a type T declared const - is_const #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp::type*>::is_const) @@ -54,7 +58,7 @@ #endif BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false) -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified Index: is_function.hpp =================================================================== --- is_function.hpp (revision 48982) +++ is_function.hpp (working copy) @@ -32,6 +32,9 @@ // function pointers to void*. namespace boost { + +#if !defined( __CODEGEARC__ ) + namespace detail { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) @@ -86,8 +89,13 @@ } // namespace detail +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,__is_function(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl::value) - +#endif } // namespace boost #include Index: is_fundamental.hpp =================================================================== --- is_fundamental.hpp (revision 48982) +++ is_fundamental.hpp (working copy) @@ -32,7 +32,11 @@ } // namespace detail //* is a type T a fundamental type described in the standard (3.9.1) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,__is_fundamental(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,::boost::detail::is_fundamental_impl::value) +#endif } // namespace boost Index: is_integral.hpp =================================================================== --- is_integral.hpp (revision 48982) +++ is_integral.hpp (working copy) @@ -19,6 +19,9 @@ //* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3) // as an extention we include long long, as this is likely to be added to the // standard at a later date +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,__is_integral(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true) @@ -66,6 +69,8 @@ BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true) #endif +#endif // non-CodeGear implementation + } // namespace boost #include Index: is_member_function_pointer.hpp =================================================================== --- is_member_function_pointer.hpp (revision 48982) +++ is_member_function_pointer.hpp (working copy) @@ -37,7 +37,9 @@ namespace boost { -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,__is_member_function_pointer( T )) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_member_function_pointer Index: is_member_pointer.hpp =================================================================== --- is_member_pointer.hpp (revision 48982) +++ is_member_pointer.hpp (working copy) @@ -40,7 +40,9 @@ namespace boost { -#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,__is_member_pointer(T)) +#elif BOOST_WORKAROUND(__BORLANDC__, < 0x600) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) Index: is_pointer.hpp =================================================================== --- is_pointer.hpp (revision 48982) +++ is_pointer.hpp (working copy) @@ -42,7 +42,9 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,__is_pointer(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace detail { Index: is_reference.hpp =================================================================== --- is_reference.hpp (revision 48982) +++ is_reference.hpp (working copy) @@ -33,12 +33,14 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,__is_reference(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T&,true) -#if defined(__BORLANDC__) && !defined(__COMO__) && (__BORLANDC__ < 0x600) +#if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified Index: is_signed.hpp =================================================================== --- is_signed.hpp (revision 48982) +++ is_signed.hpp (working copy) @@ -20,6 +20,8 @@ namespace boost { +#if !defined( __CODEGEARC__ ) + namespace detail{ #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) @@ -110,7 +112,13 @@ } +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_signed,T,__is_signed(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_signed,T,::boost::detail::is_signed_imp::value) +#endif } // namespace boost Index: is_unsigned.hpp =================================================================== --- is_unsigned.hpp (revision 48982) +++ is_unsigned.hpp (working copy) @@ -20,6 +20,8 @@ namespace boost { +#if !defined( __CODEGEARC__ ) + namespace detail{ #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) @@ -104,10 +106,15 @@ #endif - } +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_unsigned,T,__is_unsigned(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_unsigned,T,::boost::detail::is_unsigned_imp::value) +#endif } // namespace boost Index: is_void.hpp =================================================================== --- is_void.hpp (revision 48982) +++ is_void.hpp (working copy) @@ -17,6 +17,9 @@ namespace boost { //* is a type T void - is_void +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,__is_void(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void,true) @@ -26,6 +29,8 @@ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const volatile,true) #endif +#endif // non-CodeGear implementation + } // namespace boost #include Index: is_volatile.hpp =================================================================== --- is_volatile.hpp (revision 48982) +++ is_volatile.hpp (working copy) @@ -41,7 +41,9 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) //* is a type T declared volatile - is_volatile #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) @@ -51,7 +53,7 @@ #endif BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false) -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified Index: rank.hpp =================================================================== --- rank.hpp (revision 48982) +++ rank.hpp (working copy) @@ -15,6 +15,8 @@ namespace boost { +#if !defined( __CODEGEARC__ ) + namespace detail{ template @@ -72,7 +74,13 @@ #endif } +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(rank,T,__array_rank(T)) +#else BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(rank,T,(::boost::detail::rank_imp::value)) +#endif } // namespace boost Index: remove_all_extents.hpp =================================================================== --- remove_all_extents.hpp (revision 48982) +++ remove_all_extents.hpp (working copy) @@ -31,7 +31,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T const[N],typename boost::remove_all_extents::type type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T volatile[N],typename boost::remove_all_extents::type type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T const volatile[N],typename boost::remove_all_extents::type type) -#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_all_extents,T[],typename boost::remove_all_extents::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_all_extents,T const[],typename boost::remove_all_extents::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_all_extents,T volatile[],typename boost::remove_all_extents::type) Index: remove_bounds.hpp =================================================================== --- remove_bounds.hpp (revision 48982) +++ remove_bounds.hpp (working copy) @@ -31,7 +31,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const[N],T const type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T volatile[N],T volatile type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const volatile[N],T const volatile type) -#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T[],T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const[],T const) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T volatile[],T volatile) Index: remove_extent.hpp =================================================================== --- remove_extent.hpp (revision 48982) +++ remove_extent.hpp (working copy) @@ -31,7 +31,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T const[N],T const type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T volatile[N],T volatile type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T const volatile[N],T const volatile type) -#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_extent,T[],T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_extent,T const[],T const) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_extent,T volatile[],T volatile) Index: remove_reference.hpp =================================================================== --- remove_reference.hpp (revision 48982) +++ remove_reference.hpp (working copy) @@ -27,7 +27,7 @@ BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T) -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified Index: type_with_alignment.hpp =================================================================== --- type_with_alignment.hpp (revision 48982) +++ type_with_alignment.hpp (working copy) @@ -357,10 +357,12 @@ typedef ::boost::align::a16 max_align; +//#if ! BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) +//#endif } template struct type_with_alignment