diff options
Diffstat (limited to '3rdParty/Boost/src/boost/range/iterator_range_core.hpp')
-rw-r--r--[-rwxr-xr-x] | 3rdParty/Boost/src/boost/range/iterator_range_core.hpp | 102 |
1 files changed, 99 insertions, 3 deletions
diff --git a/3rdParty/Boost/src/boost/range/iterator_range_core.hpp b/3rdParty/Boost/src/boost/range/iterator_range_core.hpp index 7ef7523..60c7670 100755..100644 --- a/3rdParty/Boost/src/boost/range/iterator_range_core.hpp +++ b/3rdParty/Boost/src/boost/range/iterator_range_core.hpp @@ -53,13 +53,13 @@ namespace boost template< class ForwardRange > static IteratorT adl_begin( ForwardRange& r ) { - return IteratorT( boost::begin( r ) ); + return static_cast<IteratorT>( boost::begin( r ) ); } template< class ForwardRange > static IteratorT adl_end( ForwardRange& r ) { - return IteratorT( boost::end( r ) ); + return static_cast<IteratorT>( boost::end( r ) ); } }; @@ -71,6 +71,24 @@ namespace boost boost::begin(r), boost::end(r) ); } + + template< class Left, class Right > + inline bool greater_than( const Left& l, const Right& r ) + { + return less_than(r,l); + } + + template< class Left, class Right > + inline bool less_or_equal_than( const Left& l, const Right& r ) + { + return !iterator_range_detail::less_than(r,l); + } + + template< class Left, class Right > + inline bool greater_or_equal_than( const Left& l, const Right& r ) + { + return !iterator_range_detail::less_than(l,r); + } // This version is maintained since it is used in other boost libraries // such as Boost.Assign @@ -231,7 +249,7 @@ namespace boost difference_type size() const { - return m_End - m_Begin; + return m_End - m_Begin; } bool empty() const @@ -271,6 +289,21 @@ namespace boost { return iterator_range_detail::less_than( *this, r ); } + + bool operator>( const iterator_range& r ) const + { + return iterator_range_detail::greater_than( *this, r ); + } + + bool operator<=( const iterator_range& r ) const + { + return iterator_range_detail::less_or_equal_than( *this, r ); + } + + bool operator>=( const iterator_range& r ) const + { + return iterator_range_detail::greater_or_equal_than( *this, r ); + } #endif @@ -370,6 +403,27 @@ namespace boost { return iterator_range_detail::less_than( l, r ); } + + template< class IteratorT, class ForwardRange > + inline bool operator<=( const ForwardRange& l, + const iterator_range<IteratorT>& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator>( const ForwardRange& l, + const iterator_range<IteratorT>& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator>=( const ForwardRange& l, + const iterator_range<IteratorT>& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #else @@ -416,6 +470,48 @@ namespace boost { return iterator_range_detail::less_than( l, r ); } + + template< class Iterator1T, class Iterator2T > + inline bool operator<=( const iterator_range<Iterator1T>& l, + const iterator_range<Iterator2T>& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator<=( const iterator_range<IteratorT>& l, + const ForwardRange& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool operator>( const iterator_range<Iterator1T>& l, + const iterator_range<Iterator2T>& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator>( const iterator_range<IteratorT>& l, + const ForwardRange& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool operator>=( const iterator_range<Iterator1T>& l, + const iterator_range<Iterator2T>& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator>=( const iterator_range<IteratorT>& l, + const ForwardRange& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING |