From d2ea264db8a54f729be254b342ebbfc281963b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20J=C3=B8rgen=20Ottosen?= Date: Tue, 11 Apr 2006 18:58:50 +0000 Subject: [PATCH] fixed nasty metrowerks bug and disabled range overloads for sun compiler [SVN r33663] --- .../ptr_container/detail/reversible_ptr_container.hpp | 4 ++++ include/boost/ptr_container/ptr_map_adapter.hpp | 4 ++-- include/boost/ptr_container/ptr_sequence_adapter.hpp | 9 ++------- include/boost/ptr_container/ptr_set_adapter.hpp | 8 ++++---- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/boost/ptr_container/detail/reversible_ptr_container.hpp b/include/boost/ptr_container/detail/reversible_ptr_container.hpp index d2d56a3..84a8a1c 100755 --- a/include/boost/ptr_container/detail/reversible_ptr_container.hpp +++ b/include/boost/ptr_container/detail/reversible_ptr_container.hpp @@ -82,7 +82,11 @@ namespace ptr_container_detail class reversible_ptr_container { private: +#ifdef __MWERKS__ + enum { allow_null = Config::allow_null }; +#else BOOST_STATIC_CONSTANT( bool, allow_null = Config::allow_null ); +#endif typedef BOOST_DEDUCED_TYPENAME Config::value_type Ty_; diff --git a/include/boost/ptr_container/ptr_map_adapter.hpp b/include/boost/ptr_container/ptr_map_adapter.hpp index 765e115..1923e6e 100755 --- a/include/boost/ptr_container/ptr_map_adapter.hpp +++ b/include/boost/ptr_container/ptr_map_adapter.hpp @@ -452,7 +452,7 @@ namespace ptr_container_detail return this->single_transfer( first, last, from ); } -#ifdef BOOST_NO_SFINAE +#if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) #else template< class PtrMapAdapter, class Range > @@ -627,7 +627,7 @@ namespace ptr_container_detail return this->multi_transfer( first, last, from ); } -#ifdef BOOST_NO_SFINAE +#if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) #else template< class PtrMapAdapter, class Range > diff --git a/include/boost/ptr_container/ptr_sequence_adapter.hpp b/include/boost/ptr_container/ptr_sequence_adapter.hpp index 84b0596..4ddb7a9 100755 --- a/include/boost/ptr_container/ptr_sequence_adapter.hpp +++ b/include/boost/ptr_container/ptr_sequence_adapter.hpp @@ -312,11 +312,6 @@ namespace ptr_container_detail template< class InputIterator > void assign( InputIterator first, InputIterator last ) // strong { -//#ifdef BOOST_NO_SFINAE -//#else -// BOOST_STATIC_ASSERT(( boost::is_convertible< typename iterator_reference::type, -// reference_type >::value )); -//#endif base_type temp( first, last ); this->swap( temp ); } @@ -355,7 +350,7 @@ namespace ptr_container_detail iterator_category::type() ); } -#if defined(BOOST_NO_SFINAE) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) +#if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) #else template< class Range > BOOST_DEDUCED_TYPENAME @@ -397,7 +392,7 @@ namespace ptr_container_detail from.c_private().erase( object.base() ); // nothrow } -#ifdef BOOST_NO_SFINAE +#if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) #else template< class PtrSeqAdapter, class Range > diff --git a/include/boost/ptr_container/ptr_set_adapter.hpp b/include/boost/ptr_container/ptr_set_adapter.hpp index 27cd643..e6518e2 100755 --- a/include/boost/ptr_container/ptr_set_adapter.hpp +++ b/include/boost/ptr_container/ptr_set_adapter.hpp @@ -308,7 +308,7 @@ namespace ptr_container_detail set_basic_clone_and_insert( first, last ); } -#if defined(BOOST_NO_SFINAE) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) +#if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) #else template< class Range > @@ -337,7 +337,7 @@ namespace ptr_container_detail return this->single_transfer( first, last, from ); } -#ifdef BOOST_NO_SFINAE +#if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) #else template< class PtrSetAdapter, class Range > @@ -458,7 +458,7 @@ namespace ptr_container_detail set_basic_clone_and_insert( first, last ); } -#ifdef BOOST_NO_SFINAE +#if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) #else template< class Range > @@ -486,7 +486,7 @@ namespace ptr_container_detail return this->multi_transfer( first, last, from ); } -#ifdef BOOST_NO_SFINAE +#if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) #else template< class PtrSetAdapter, class Range >