diff options
Diffstat (limited to '3rdParty/Boost/src/boost/range')
| -rw-r--r--[-rwxr-xr-x] | 3rdParty/Boost/src/boost/range/algorithm/equal.hpp | 20 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/range/as_literal.hpp | 2 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/range/detail/detail_str.hpp | 4 | ||||
| -rw-r--r--[-rwxr-xr-x] | 3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | 3rdParty/Boost/src/boost/range/detail/misc_concept.hpp | 0 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/range/detail/size_type.hpp | 33 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/range/detail/value_type.hpp | 72 | ||||
| -rw-r--r--[-rwxr-xr-x] | 3rdParty/Boost/src/boost/range/iterator_range_core.hpp | 102 | ||||
| -rw-r--r--[-rwxr-xr-x] | 3rdParty/Boost/src/boost/range/iterator_range_io.hpp | 0 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/range/size.hpp | 6 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/range/size_type.hpp | 56 | 
11 files changed, 234 insertions, 61 deletions
| diff --git a/3rdParty/Boost/src/boost/range/algorithm/equal.hpp b/3rdParty/Boost/src/boost/range/algorithm/equal.hpp index a3ebc29..4472bb1 100755..100644 --- a/3rdParty/Boost/src/boost/range/algorithm/equal.hpp +++ b/3rdParty/Boost/src/boost/range/algorithm/equal.hpp @@ -31,7 +31,7 @@ namespace boost                                  IteratorCategoryTag1,                                  IteratorCategoryTag2 )          { -            do +            while (true)              {                  // If we have reached the end of the left range then this is                  // the end of the loop. They are equal if and only if we have @@ -46,7 +46,12 @@ namespace boost                      return false;                  // continue looping if and only if the values are equal -            } while(*first1++ == *first2++); +                if (*first1 != *first2) +                    break; + +                ++first1; +                ++first2; +            }              // Reaching this line in the algorithm indicates that a value              // inequality has been detected. @@ -66,7 +71,7 @@ namespace boost                                  IteratorCategoryTag1,                                  IteratorCategoryTag2 )          { -            do +            while (true)              {                  // If we have reached the end of the left range then this is                  // the end of the loop. They are equal if and only if we have @@ -81,7 +86,12 @@ namespace boost                      return false;                  // continue looping if and only if the values are equal -            } while(pred(*first1++, *first2++)); +                if (!pred(*first1, *first2)) +                    break; + +                ++first1; +                ++first2; +            }              // Reaching this line in the algorithm indicates that a value              // inequality has been detected. @@ -182,7 +192,7 @@ namespace boost          }      } // namespace range -    using range::equal; +    using ::boost::range::equal;  } // namespace boost  #endif // include guard diff --git a/3rdParty/Boost/src/boost/range/as_literal.hpp b/3rdParty/Boost/src/boost/range/as_literal.hpp index f67ead7..9ea144d 100644 --- a/3rdParty/Boost/src/boost/range/as_literal.hpp +++ b/3rdParty/Boost/src/boost/range/as_literal.hpp @@ -74,7 +74,7 @@ namespace boost  #endif          template< class T > -        inline long is_char_ptr( T /* r */ ) +        inline long is_char_ptr( const T& /* r */ )          {              return 0L;          } diff --git a/3rdParty/Boost/src/boost/range/detail/detail_str.hpp b/3rdParty/Boost/src/boost/range/detail/detail_str.hpp index d5ad5b3..5ef7a34 100644 --- a/3rdParty/Boost/src/boost/range/detail/detail_str.hpp +++ b/3rdParty/Boost/src/boost/range/detail/detail_str.hpp @@ -134,8 +134,8 @@ namespace boost  #include <boost/range/detail/begin.hpp>  #include <boost/range/detail/end.hpp> -#include <boost/range/detail/size_type> -#include <boost/range/detail/value_type> +#include <boost/range/detail/size_type.hpp> +#include <boost/range/detail/value_type.hpp>  #include <boost/range/detail/common.hpp>  namespace boost  diff --git a/3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp b/3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp index 8292e34..8292e34 100755..100644 --- a/3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp +++ b/3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp diff --git a/3rdParty/Boost/src/boost/range/detail/misc_concept.hpp b/3rdParty/Boost/src/boost/range/detail/misc_concept.hpp index 74cb919..74cb919 100755..100644 --- a/3rdParty/Boost/src/boost/range/detail/misc_concept.hpp +++ b/3rdParty/Boost/src/boost/range/detail/misc_concept.hpp diff --git a/3rdParty/Boost/src/boost/range/detail/size_type.hpp b/3rdParty/Boost/src/boost/range/detail/size_type.hpp index ec49f4d..78a60a4 100644 --- a/3rdParty/Boost/src/boost/range/detail/size_type.hpp +++ b/3rdParty/Boost/src/boost/range/detail/size_type.hpp @@ -17,52 +17,37 @@  // missing partial specialization  workaround.  ////////////////////////////////////////////////////////////////////////////// -namespace boost  +namespace boost  { -    namespace range_detail  -    {         +    namespace range_detail +    {          template< typename T > -        struct range_size_type_; - -        template<> -        struct range_size_type_<std_container_> +        struct range_size_type_          {              template< typename C >              struct pts              { -                typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type; -            }; -        }; - -        template<> -        struct range_size_type_<std_pair_> -        { -            template< typename P > -            struct pts -            {                  typedef std::size_t type;              };          };          template<> -        struct range_size_type_<array_> +        struct range_size_type_<std_container_>          { -            template< typename A > +            template< typename C >              struct pts              { -                typedef std::size_t type; +                typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;              };          }; +    } -   -    }  -          template< typename C >      class range_size      {          typedef typename range_detail::range<C>::type c_type;      public: -        typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;  +        typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;      };  } diff --git a/3rdParty/Boost/src/boost/range/detail/value_type.hpp b/3rdParty/Boost/src/boost/range/detail/value_type.hpp new file mode 100644 index 0000000..2784514 --- /dev/null +++ b/3rdParty/Boost/src/boost/range/detail/value_type.hpp @@ -0,0 +1,72 @@ +// Boost.Range library +// +//  Copyright Thorsten Ottosen 2003-2004. Use, modification and +//  distribution is subject to the Boost Software License, Version +//  1.0. (See accompanying file LICENSE_1_0.txt or copy at +//  http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_VALUE_TYPE_HPP +#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP + +#include <boost/range/detail/common.hpp> +#include <boost/range/detail/remove_extent.hpp> +#include <boost/iterator/iterator_traits.hpp> + +////////////////////////////////////////////////////////////////////////////// +// missing partial specialization  workaround. +////////////////////////////////////////////////////////////////////////////// + +namespace boost  +{ +    namespace range_detail  +    {         +        template< typename T > +        struct range_value_type_; + +        template<> +        struct range_value_type_<std_container_> +        { +            template< typename C > +            struct pts +            { +                typedef BOOST_RANGE_DEDUCED_TYPENAME C::value_type type; +            }; +        }; + +        template<> +        struct range_value_type_<std_pair_> +        { +            template< typename P > +            struct pts +            { +                typedef BOOST_RANGE_DEDUCED_TYPENAME boost::iterator_value< BOOST_RANGE_DEDUCED_TYPENAME P::first_type >::type type; +            }; +        }; + +        template<> +        struct range_value_type_<array_> +        {  +            template< typename T > +            struct pts +            { +                typedef BOOST_DEDUCED_TYPENAME remove_extent<T>::type type; +            }; +        }; +         +    }  +     +    template< typename C > +    class range_value +    { +        typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type; +    public: +        typedef BOOST_DEDUCED_TYPENAME range_detail::range_value_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;  +    }; + +} + +#endif + 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 diff --git a/3rdParty/Boost/src/boost/range/iterator_range_io.hpp b/3rdParty/Boost/src/boost/range/iterator_range_io.hpp index 51e3a4f..51e3a4f 100755..100644 --- a/3rdParty/Boost/src/boost/range/iterator_range_io.hpp +++ b/3rdParty/Boost/src/boost/range/iterator_range_io.hpp diff --git a/3rdParty/Boost/src/boost/range/size.hpp b/3rdParty/Boost/src/boost/range/size.hpp index 4b4eebe..6ae74d1 100644 --- a/3rdParty/Boost/src/boost/range/size.hpp +++ b/3rdParty/Boost/src/boost/range/size.hpp @@ -18,7 +18,7 @@  #include <boost/range/config.hpp>  #include <boost/range/begin.hpp>  #include <boost/range/end.hpp> -#include <boost/range/difference_type.hpp> +#include <boost/range/size_type.hpp>  #include <boost/assert.hpp>  namespace boost @@ -26,7 +26,7 @@ namespace boost      namespace range_detail      {          template<class SinglePassRange> -        inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange>::type +        inline BOOST_DEDUCED_TYPENAME range_size<const SinglePassRange>::type          range_calculate_size(const SinglePassRange& rng)          {              BOOST_ASSERT( (boost::end(rng) - boost::begin(rng)) >= 0 && @@ -36,7 +36,7 @@ namespace boost      }      template<class SinglePassRange> -    inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange>::type +    inline BOOST_DEDUCED_TYPENAME range_size<const SinglePassRange>::type      size(const SinglePassRange& rng)      {  #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ diff --git a/3rdParty/Boost/src/boost/range/size_type.hpp b/3rdParty/Boost/src/boost/range/size_type.hpp index 8c184f8..c6fb54b 100644 --- a/3rdParty/Boost/src/boost/range/size_type.hpp +++ b/3rdParty/Boost/src/boost/range/size_type.hpp @@ -16,11 +16,13 @@  #endif  #include <boost/range/config.hpp> - +#include <boost/range/difference_type.hpp>  #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION  #include <boost/range/detail/size_type.hpp>  #else +#include <boost/utility/enable_if.hpp> +#include <boost/type_traits/make_unsigned.hpp>  #include <boost/type_traits/remove_const.hpp>  #include <cstddef>  #include <utility> @@ -33,36 +35,44 @@ namespace boost          //////////////////////////////////////////////////////////////////////////          // default          ////////////////////////////////////////////////////////////////////////// -     -        template< typename C > -        struct range_size + +        template<typename T> +        class has_size_type          { -            typedef BOOST_DEDUCED_TYPENAME C::size_type type; +            typedef char no_type; +            struct yes_type { char dummy[2]; }; + +            template<typename C> +            static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x); + +            template<typename C, typename Arg> +            static no_type test(Arg x); + +        public: +            static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);          }; -     -        ////////////////////////////////////////////////////////////////////////// -        // pair -        ////////////////////////////////////////////////////////////////////////// -     -        template< typename Iterator > -        struct range_size< std::pair<Iterator,Iterator> > + +        template<typename C, typename Enabler=void> +        struct range_size          { -            typedef std::size_t type; +            typedef BOOST_DEDUCED_TYPENAME make_unsigned< +                BOOST_DEDUCED_TYPENAME range_difference<C>::type +            >::type type;          }; -     -        ////////////////////////////////////////////////////////////////////////// -        // array -        ////////////////////////////////////////////////////////////////////////// -     -        template< typename T, std::size_t sz > -        struct range_size< T[sz] > + +        template<typename C> +        struct range_size< +            C, +            BOOST_DEDUCED_TYPENAME enable_if<has_size_type<C>, void>::type +        >          { -            typedef std::size_t type; +            typedef BOOST_DEDUCED_TYPENAME C::size_type type;          }; +      }      template< class T > -    struct range_size :  +    struct range_size :          detail::range_size<T>      { }; @@ -70,7 +80,7 @@ namespace boost      struct range_size<const T >          : detail::range_size<T>      { }; -     +  } // namespace boost  #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION | 
 Swift
 Swift