intended borland fix

[SVN r29106]
This commit is contained in:
Thorsten Jørgen Ottosen
2005-05-21 00:17:33 +00:00
parent 0965a46d9c
commit d509beb073
2 changed files with 30 additions and 2 deletions

View File

@ -133,7 +133,7 @@ namespace boost
//! this type //! this type
typedef iterator_range<IteratorT> type; typedef iterator_range<IteratorT> type;
//BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type); //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
//! Encapsulated value type //! Encapsulated value type
typedef BOOST_DEDUCED_TYPENAME typedef BOOST_DEDUCED_TYPENAME
iterator_value<IteratorT>::type value_type; iterator_value<IteratorT>::type value_type;
@ -141,6 +141,7 @@ namespace boost
//! Difference type //! Difference type
typedef BOOST_DEDUCED_TYPENAME typedef BOOST_DEDUCED_TYPENAME
iterator_difference<IteratorT>::type difference_type; iterator_difference<IteratorT>::type difference_type;
//! Size type //! Size type
typedef std::size_t size_type; // note: must be unsigned typedef std::size_t size_type; // note: must be unsigned
@ -159,6 +160,19 @@ namespace boost
iterator_range() : m_Begin( iterator() ), m_End( iterator() ), iterator_range() : m_Begin( iterator() ), m_End( iterator() ),
singular( true ) 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 //! Constructor from a pair of iterators
template< class Iterator > template< class Iterator >

View File

@ -39,7 +39,21 @@ namespace boost
public: public:
sub_range() : base() sub_range() : base()
{ } { }
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
typedef sub_range<ForwardRange> 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( ForwardRange2& r ) : sub_range( ForwardRange2& r ) :