diff --git a/include/boost/assert.hpp b/include/boost/assert.hpp index 3428efb..5619f29 100644 --- a/include/boost/assert.hpp +++ b/include/boost/assert.hpp @@ -32,6 +32,6 @@ void assertion_failed(char const * expr, char const * function, char const * fil #define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #else -# include +# include // .h to support old libraries w/o - effect is the same # define BOOST_ASSERT(expr) assert(expr) #endif diff --git a/include/boost/detail/call_traits.hpp b/include/boost/detail/call_traits.hpp index a2c2ba3..0d9e99f 100644 --- a/include/boost/detail/call_traits.hpp +++ b/include/boost/detail/call_traits.hpp @@ -25,6 +25,7 @@ #include #include +#include namespace boost{ @@ -91,7 +92,7 @@ struct call_traits typedef T& param_type; // hh removed const }; -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x560) +#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x570 ) ) // 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 diff --git a/include/boost/detail/compressed_pair.hpp b/include/boost/detail/compressed_pair.hpp index af1e9bd..c45d20c 100644 --- a/include/boost/detail/compressed_pair.hpp +++ b/include/boost/detail/compressed_pair.hpp @@ -132,7 +132,7 @@ namespace details template class compressed_pair_imp - : private T1 + : private ::boost::remove_cv::type { public: typedef T1 first_type; @@ -174,7 +174,7 @@ namespace details template class compressed_pair_imp - : private T2 + : private ::boost::remove_cv::type { public: typedef T1 first_type; @@ -217,8 +217,8 @@ namespace details template class compressed_pair_imp - : private T1, - private T2 + : private ::boost::remove_cv::type, + private ::boost::remove_cv::type { public: typedef T1 first_type; @@ -257,7 +257,7 @@ namespace details // but reuses T1 base class for both first() and second(). template class compressed_pair_imp - : private T1 + : private ::boost::remove_cv::type { public: typedef T1 first_type; @@ -430,5 +430,3 @@ swap(compressed_pair& x, compressed_pair& y) #endif // BOOST_DETAIL_COMPRESSED_PAIR_HPP - - diff --git a/include/boost/utility/addressof.hpp b/include/boost/utility/addressof.hpp index 603ea60..7629488 100644 --- a/include/boost/utility/addressof.hpp +++ b/include/boost/utility/addressof.hpp @@ -13,9 +13,6 @@ # include # include -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -# include -# endif namespace boost { @@ -23,7 +20,14 @@ namespace boost { // VC7 strips const from nested classes unless we add indirection here # if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -template typename add_pointer::type + +template struct _addp +{ + typedef T * type; +}; + +template typename _addp::type + # else template T* # endif @@ -33,6 +37,22 @@ addressof(T& v) &const_cast(reinterpret_cast(v))); } +// Borland doesn't like casting an array reference to a char reference +// but these overloads work around the problem. +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template +T (*addressof(T (&t)[N]))[N] +{ + return reinterpret_cast(&t); +} + +template +const T (*addressof(const T (&t)[N]))[N] +{ + return reinterpret_cast(&t); +} +# endif + } #endif // BOOST_UTILITY_ADDRESSOF_HPP