From a2b6c3f5ec8199dd8e301d700167d7a5082e6c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20J=C3=B8rgen=20Ottosen?= Date: Wed, 7 Dec 2005 01:26:57 +0000 Subject: [PATCH] fixed vc7.1 iterator conversion problems [SVN r31942] --- include/boost/range/sub_range.hpp | 36 ++++++++++++++++++------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/include/boost/range/sub_range.hpp b/include/boost/range/sub_range.hpp index a4caa78..1dc7d10 100755 --- a/include/boost/range/sub_range.hpp +++ b/include/boost/range/sub_range.hpp @@ -39,22 +39,18 @@ namespace boost public: sub_range() : base() { } -/* -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - typedef sub_range this_type; - - sub_range( this_type r ) : - : base( r ) - { } - this_type& operator=( this_type r ) - { - base::operator=( r ); - return *this; - } -#endif -*/ - template< class ForwardRange2 > +/* + template< class ForwardRange2 > + sub_range( sub_range r ) : + +#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 ) + base( impl::adl_begin( r ), impl::adl_end( r ) ) +#else + base( r ) +#endif */ + + template< class ForwardRange2 > sub_range( ForwardRange2& r ) : #if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 ) @@ -92,6 +88,16 @@ namespace boost base::operator=( r ); return *this; } + + sub_range& operator=( sub_range r ) + { + // + // argument passed by value to avoid + // const_iterator to iterator conversion + // + base::operator=( r ); + return *this; + } public: