[range] Patch for BCB2006

Hallo, the enclosed patch works around a problem with BCB 2006. I tested it against bcc 5.8.2, bcc 5.6.4, VC++ 8.0 and g++ 3.4.2 . Cheers, Nicola Musatti ******Index: iterator_range.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/range/iterator_range.hpp,v retrieving revision 1.41 diff -d -u -r1.41 iterator_range.hpp --- iterator_range.hpp 20 Feb 2006 21:15:02 -0000 1.41 +++ iterator_range.hpp 7 Apr 2006 07:55:57 -0000 @@ -262,7 +262,7 @@ if( singular ) return 0; - return std::distance( m_Begin, m_End ); + return std::distance<IteratorT>( m_Begin, m_End ); } bool empty() const

Nicola Musatti wrote:
Hallo, the enclosed patch works around a problem with BCB 2006. I tested it against bcc 5.8.2, bcc 5.6.4, VC++ 8.0 and g++ 3.4.2 .
Cheers, Nicola Musatti
------------------------------------------------------------------------
******Index: iterator_range.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/range/iterator_range.hpp,v retrieving revision 1.41 diff -d -u -r1.41 iterator_range.hpp --- iterator_range.hpp 20 Feb 2006 21:15:02 -0000 1.41 +++ iterator_range.hpp 7 Apr 2006 07:55:57 -0000 @@ -262,7 +262,7 @@ if( singular ) return 0;
- return std::distance( m_Begin, m_End ); + return std::distance<IteratorT>( m_Begin, m_End );
Thanks. However, I'm not too happy to put this in without shielding other compilers for it. Would it be ok to enable it for all borland compilers? -Thorsten

Thorsten Ottosen wrote: [...]
******Index: iterator_range.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/range/iterator_range.hpp,v retrieving revision 1.41 diff -d -u -r1.41 iterator_range.hpp --- iterator_range.hpp 20 Feb 2006 21:15:02 -0000 1.41 +++ iterator_range.hpp 7 Apr 2006 07:55:57 -0000 @@ -262,7 +262,7 @@ if( singular ) return 0;
- return std::distance( m_Begin, m_End ); + return std::distance<IteratorT>( m_Begin, m_End );
Thanks.
However, I'm not too happy to put this in without shielding other compilers for it. Would it be ok to enable it for all borland compilers?
In that case I think the best option is to use #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) Cheers, Nicola Musatti

Nicola Musatti wrote:
Thorsten Ottosen wrote:
However, I'm not too happy to put this in without shielding other compilers for it. Would it be ok to enable it for all borland compilers?
In that case I think the best option is to use
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
Applied. Thanks -Thorsten
participants (2)
-
Nicola Musatti
-
Thorsten Ottosen