diff --git a/include/boost/range/iterator_range.hpp b/include/boost/range/iterator_range.hpp index b24b4f1..44dd86f 100755 --- a/include/boost/range/iterator_range.hpp +++ b/include/boost/range/iterator_range.hpp @@ -133,7 +133,7 @@ namespace boost //! this type typedef iterator_range type; //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type); - + //! Encapsulated value type typedef BOOST_DEDUCED_TYPENAME iterator_value::type value_type; @@ -141,6 +141,7 @@ namespace boost //! Difference type typedef BOOST_DEDUCED_TYPENAME iterator_difference::type difference_type; + //! Size type typedef std::size_t size_type; // note: must be unsigned @@ -159,6 +160,19 @@ namespace boost iterator_range() : m_Begin( iterator() ), m_End( iterator() ), singular( true ) { } + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + iterator_range( this_type r ) : + : m_Begin(r.begin()), m_End(r.end()) + { } + + this_type& operator=( this_type r ) + { + m_Begin = r.begin(); + m_End = r.end(); + return *this; + } +#endif //! Constructor from a pair of iterators template< class Iterator > diff --git a/include/boost/range/sub_range.hpp b/include/boost/range/sub_range.hpp index dbc069d..8b4296c 100755 --- a/include/boost/range/sub_range.hpp +++ b/include/boost/range/sub_range.hpp @@ -39,7 +39,21 @@ 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 > sub_range( ForwardRange2& r ) :