diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-08-05 19:32:57 +0000 |
|---|---|---|
| committer | <> | 2014-10-07 10:01:33 +0000 |
| commit | 1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304 (patch) | |
| tree | 03de66686a262696ec2ac408e62250dc1f0c01aa /boost/algorithm | |
| parent | 8c4528713d907ee2cfd3bfcbbad272c749867f84 (diff) | |
| download | boost-tarball-1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304.tar.gz | |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_56_0.tar.bz2.boost_1_56_0
Diffstat (limited to 'boost/algorithm')
32 files changed, 171 insertions, 406 deletions
diff --git a/boost/algorithm/clamp.hpp b/boost/algorithm/clamp.hpp index ae98d15d2..7bfa47ec9 100644 --- a/boost/algorithm/clamp.hpp +++ b/boost/algorithm/clamp.hpp @@ -31,8 +31,8 @@ namespace boost { namespace algorithm { /// \fn clamp ( T const& val, -/// typename boost::mpl::identity<T>::type const& lo, -/// typename boost::mpl::identity<T>::type const& hi, Pred p ) +/// typename boost::mpl::identity<T>::type const & lo, +/// typename boost::mpl::identity<T>::type const & hi, Pred p ) /// \return the value "val" brought into the range [ lo, hi ] /// using the comparison predicate p. /// If p ( val, lo ) return lo. @@ -56,8 +56,8 @@ namespace boost { namespace algorithm { /// \fn clamp ( T const& val, -/// typename boost::mpl::identity<T>::type const& lo, -/// typename boost::mpl::identity<T>::type const& hi ) +/// typename boost::mpl::identity<T>::type const & lo, +/// typename boost::mpl::identity<T>::type const & hi ) /// \return the value "val" brought into the range [ lo, hi ]. /// If the value is less than lo, return lo. /// If the value is greater than "hi", return hi. @@ -76,8 +76,8 @@ namespace boost { namespace algorithm { } /// \fn clamp_range ( InputIterator first, InputIterator last, OutputIterator out, -/// std::iterator_traits<InputIterator>::value_type lo, -/// std::iterator_traits<InputIterator>::value_type hi ) +/// std::iterator_traits<InputIterator>::value_type const & lo, +/// std::iterator_traits<InputIterator>::value_type const & hi ) /// \return clamp the sequence of values [first, last) into [ lo, hi ] /// /// \param first The start of the range of values @@ -88,8 +88,8 @@ namespace boost { namespace algorithm { /// template<typename InputIterator, typename OutputIterator> OutputIterator clamp_range ( InputIterator first, InputIterator last, OutputIterator out, - typename std::iterator_traits<InputIterator>::value_type lo, - typename std::iterator_traits<InputIterator>::value_type hi ) + typename std::iterator_traits<InputIterator>::value_type const & lo, + typename std::iterator_traits<InputIterator>::value_type const & hi ) { // this could also be written with bind and std::transform while ( first != last ) @@ -98,8 +98,8 @@ namespace boost { namespace algorithm { } /// \fn clamp_range ( const Range &r, OutputIterator out, -/// typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type lo, -/// typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type hi ) +/// typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & lo, +/// typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & hi ) /// \return clamp the sequence of values [first, last) into [ lo, hi ] /// /// \param r The range of values to be clamped @@ -110,16 +110,16 @@ namespace boost { namespace algorithm { template<typename Range, typename OutputIterator> typename boost::disable_if_c<boost::is_same<Range, OutputIterator>::value, OutputIterator>::type clamp_range ( const Range &r, OutputIterator out, - typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type lo, - typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type hi ) + typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & lo, + typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & hi ) { return clamp_range ( boost::begin ( r ), boost::end ( r ), out, lo, hi ); } /// \fn clamp_range ( InputIterator first, InputIterator last, OutputIterator out, -/// std::iterator_traits<InputIterator>::value_type lo, -/// std::iterator_traits<InputIterator>::value_type hi, Pred p ) +/// std::iterator_traits<InputIterator>::value_type const & lo, +/// std::iterator_traits<InputIterator>::value_type const & hi, Pred p ) /// \return clamp the sequence of values [first, last) into [ lo, hi ] /// using the comparison predicate p. /// @@ -134,8 +134,8 @@ namespace boost { namespace algorithm { /// template<typename InputIterator, typename OutputIterator, typename Pred> OutputIterator clamp_range ( InputIterator first, InputIterator last, OutputIterator out, - typename std::iterator_traits<InputIterator>::value_type lo, - typename std::iterator_traits<InputIterator>::value_type hi, Pred p ) + typename std::iterator_traits<InputIterator>::value_type const & lo, + typename std::iterator_traits<InputIterator>::value_type const & hi, Pred p ) { // this could also be written with bind and std::transform while ( first != last ) @@ -144,8 +144,8 @@ namespace boost { namespace algorithm { } /// \fn clamp_range ( const Range &r, OutputIterator out, -/// typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type lo, -/// typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type hi, +/// typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & lo, +/// typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & hi, /// Pred p ) /// \return clamp the sequence of values [first, last) into [ lo, hi ] /// using the comparison predicate p. @@ -162,8 +162,8 @@ namespace boost { namespace algorithm { template<typename Range, typename OutputIterator, typename Pred> typename boost::disable_if_c<boost::is_same<Range, OutputIterator>::value, OutputIterator>::type clamp_range ( const Range &r, OutputIterator out, - typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type lo, - typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type hi, + typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & lo, + typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & hi, Pred p ) { return clamp_range ( boost::begin ( r ), boost::end ( r ), out, lo, hi, p ); diff --git a/boost/algorithm/cxx11/iota.hpp b/boost/algorithm/cxx11/iota.hpp index b4f0dafa6..eb32390b0 100644 --- a/boost/algorithm/cxx11/iota.hpp +++ b/boost/algorithm/cxx11/iota.hpp @@ -63,8 +63,8 @@ void iota ( Range &r, T value ) template <typename OutputIterator, typename T> OutputIterator iota_n ( OutputIterator out, T value, std::size_t n ) { - while ( n-- > 0 ) - *out++ = value++; + for ( ; n > 0; --n, ++value ) + *out++ = value; return out; } diff --git a/boost/algorithm/cxx11/is_permutation.hpp b/boost/algorithm/cxx11/is_permutation.hpp index e1273f1d8..9b3bc220f 100644 --- a/boost/algorithm/cxx11/is_permutation.hpp +++ b/boost/algorithm/cxx11/is_permutation.hpp @@ -9,8 +9,8 @@ /// \brief Is a sequence a permutation of another sequence /// \author Marshall Clow -#ifndef BOOST_ALGORITHM_IS_PERMUTATION_HPP -#define BOOST_ALGORITHM_IS_PERMUTATION_HPP +#ifndef BOOST_ALGORITHM_IS_PERMUTATION11_HPP +#define BOOST_ALGORITHM_IS_PERMUTATION11_HPP #include <algorithm> // for std::less, tie, mismatch and is_permutation (if available) #include <utility> // for std::make_pair @@ -21,7 +21,6 @@ #include <boost/range/end.hpp> #include <boost/utility/enable_if.hpp> #include <boost/type_traits/is_same.hpp> -#include <boost/tr1/tr1/tuple> // for tie namespace boost { namespace algorithm { @@ -121,7 +120,6 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, BinaryPredicate p ) { // Skip the common prefix (if any) -// std::tie (first1, first2) = std::mismatch (first1, last1, first2, p); std::pair<ForwardIterator1, ForwardIterator2> eq = std::mismatch (first1, last1, first2, p); first1 = eq.first; first2 = eq.second; @@ -165,56 +163,6 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, ForwardIt #endif -/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, -/// ForwardIterator2 first2, ForwardIterator2 last2 ) -/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 -/// -/// \param first1 The start of the input sequence -/// \param last2 One past the end of the input sequence -/// \param first2 The start of the second sequence -/// \param last1 One past the end of the second sequence -/// \note This function is part of the C++2011 standard library. -/// We will use the standard one if it is available, -/// otherwise we have our own implementation. -template< class ForwardIterator1, class ForwardIterator2 > -bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2 ) -{ -// How should I deal with the idea that ForwardIterator1::value_type -// and ForwardIterator2::value_type could be different? Define my own comparison predicate? - return boost::algorithm::detail::is_permutation_tag ( - first1, last1, first2, last2, - std::equal_to<typename std::iterator_traits<ForwardIterator1>::value_type> (), - typename std::iterator_traits<ForwardIterator1>::iterator_category (), - typename std::iterator_traits<ForwardIterator2>::iterator_category ()); -} - -/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, -/// ForwardIterator2 first2, ForwardIterator2 last2, -/// BinaryPredicate p ) -/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 -/// -/// \param first1 The start of the input sequence -/// \param last1 One past the end of the input sequence -/// \param first2 The start of the second sequence -/// \param last2 One past the end of the second sequence -/// \param pred The predicate to compare elements with -/// -/// \note This function is part of the C++2011 standard library. -/// We will use the standard one if it is available, -/// otherwise we have our own implementation. -template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate > -bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred ) -{ - return boost::algorithm::detail::is_permutation_tag ( - first1, last1, first2, last2, pred, - typename std::iterator_traits<ForwardIterator1>::iterator_category (), - typename std::iterator_traits<ForwardIterator2>::iterator_category ()); -} - - /// \fn is_permutation ( const Range &r, ForwardIterator first2 ) /// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 @@ -245,4 +193,4 @@ is_permutation ( const Range &r, ForwardIterator first2, BinaryPredicate pred ) }} -#endif // BOOST_ALGORITHM_IS_PERMUTATION_HPP +#endif // BOOST_ALGORITHM_IS_PERMUTATION11_HPP diff --git a/boost/algorithm/cxx14/equal.hpp b/boost/algorithm/cxx14/equal.hpp index d10c09604..cfc62d5f1 100644 --- a/boost/algorithm/cxx14/equal.hpp +++ b/boost/algorithm/cxx14/equal.hpp @@ -12,41 +12,41 @@ #ifndef BOOST_ALGORITHM_EQUAL_HPP #define BOOST_ALGORITHM_EQUAL_HPP -#include <algorithm> // for std::equal -#include <functional> // for std::equal_to +#include <algorithm> // for std::equal +#include <functional> // for std::equal_to namespace boost { namespace algorithm { namespace detail { - template <class T1, class T2> - struct eq : public std::binary_function<T1, T2, bool> { - bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;} - }; - - template <class RandomAccessIterator1, class RandomAccessIterator2, class BinaryPredicate> - bool equal ( RandomAccessIterator1 first1, RandomAccessIterator1 last1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred, - std::random_access_iterator_tag, std::random_access_iterator_tag ) - { - // Random-access iterators let is check the sizes in constant time - if ( std::distance ( first1, last1 ) != std::distance ( first2, last2 )) - return false; - // If we know that the sequences are the same size, the original version is fine - return std::equal ( first1, last1, first2, pred ); - } + template <class T1, class T2> + struct eq : public std::binary_function<T1, T2, bool> { + bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;} + }; + + template <class RandomAccessIterator1, class RandomAccessIterator2, class BinaryPredicate> + bool equal ( RandomAccessIterator1 first1, RandomAccessIterator1 last1, + RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred, + std::random_access_iterator_tag, std::random_access_iterator_tag ) + { + // Random-access iterators let is check the sizes in constant time + if ( std::distance ( first1, last1 ) != std::distance ( first2, last2 )) + return false; + // If we know that the sequences are the same size, the original version is fine + return std::equal ( first1, last1, first2, pred ); + } - template <class InputIterator1, class InputIterator2, class BinaryPredicate> - bool equal ( InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred, - std::input_iterator_tag, std::input_iterator_tag ) - { - for (; first1 != last1 && first2 != last2; ++first1, ++first2 ) - if ( !pred(*first1, *first2 )) - return false; + template <class InputIterator1, class InputIterator2, class BinaryPredicate> + bool equal ( InputIterator1 first1, InputIterator1 last1, + InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred, + std::input_iterator_tag, std::input_iterator_tag ) + { + for (; first1 != last1 && first2 != last2; ++first1, ++first2 ) + if ( !pred(*first1, *first2 )) + return false; - return first1 == last1 && first2 == last2; - } + return first1 == last1 && first2 == last2; + } } /// \fn equal ( InputIterator1 first1, InputIterator1 last1, @@ -63,10 +63,10 @@ template <class InputIterator1, class InputIterator2, class BinaryPredicate> bool equal ( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred ) { - return boost::algorithm::detail::equal ( - first1, last1, first2, last2, pred, - typename std::iterator_traits<InputIterator1>::iterator_category (), - typename std::iterator_traits<InputIterator2>::iterator_category ()); + return boost::algorithm::detail::equal ( + first1, last1, first2, last2, pred, + typename std::iterator_traits<InputIterator1>::iterator_category (), + typename std::iterator_traits<InputIterator2>::iterator_category ()); } /// \fn equal ( InputIterator1 first1, InputIterator1 last1, @@ -81,16 +81,16 @@ template <class InputIterator1, class InputIterator2> bool equal ( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2 ) { - return boost::algorithm::detail::equal ( - first1, last1, first2, last2, - boost::algorithm::detail::eq< - typename std::iterator_traits<InputIterator1>::value_type, - typename std::iterator_traits<InputIterator2>::value_type> (), - typename std::iterator_traits<InputIterator1>::iterator_category (), - typename std::iterator_traits<InputIterator2>::iterator_category ()); + return boost::algorithm::detail::equal ( + first1, last1, first2, last2, + boost::algorithm::detail::eq< + typename std::iterator_traits<InputIterator1>::value_type, + typename std::iterator_traits<InputIterator2>::value_type> (), + typename std::iterator_traits<InputIterator1>::iterator_category (), + typename std::iterator_traits<InputIterator2>::iterator_category ()); } -// There are already range-based versions of these. +// There are already range-based versions of these. }} // namespace boost and algorithm diff --git a/boost/algorithm/cxx14/is_permutation.hpp b/boost/algorithm/cxx14/is_permutation.hpp index 779acef2a..d8002cbce 100644 --- a/boost/algorithm/cxx14/is_permutation.hpp +++ b/boost/algorithm/cxx14/is_permutation.hpp @@ -1,130 +1,86 @@ -/* - Copyright (c) Marshall Clow 2013 +/* + Copyright (c) Marshall Clow 2014. Distributed under 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) */ -/// \file equal.hpp -/// \brief Determines if one +/// \file is_permutation.hpp +/// \brief Is a sequence a permutation of another sequence (four iterator versions) /// \author Marshall Clow -#ifndef BOOST_ALGORITHM_IS_PERMUTATION_HPP -#define BOOST_ALGORITHM_IS_PERMUTATION_HPP +#ifndef BOOST_ALGORITHM_IS_PERMUTATION14_HPP +#define BOOST_ALGORITHM_IS_PERMUTATION14_HPP -#include <algorithm> -#include <functional> // for std::equal_to +#include <algorithm> // for std::less, tie, mismatch and is_permutation (if available) +#include <utility> // for std::make_pair +#include <functional> // for std::equal_to +#include <iterator> -namespace boost { namespace algorithm { - -namespace detail { - - template <class T1, class T2> - struct is_perm_eq : public std::binary_function<T1, T2, bool> { - bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;} - }; - - - template <class RandomAccessIterator1, class RandomAccessIterator2, class BinaryPredicate> - bool is_permutation ( RandomAccessIterator1 first1, RandomAccessIterator1 last1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred, - std::random_access_iterator_tag, std::random_access_iterator_tag ) - { - // Random-access iterators let is check the sizes in constant time - if ( std::distance ( first1, last1 ) != std::distance ( first2, last2 )) - return false; - // If we know that the sequences are the same size, the original version is fine - return std::is_permutation ( first1, last1, first2, pred ); - } - - - template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> - bool is_permutation ( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred, - std::forward_iterator_tag, std::forward_iterator_tag ) - { - - // Look for common prefix - for (; first1 != last1 && first2 != last2; ++first1, ++first2) - if (!pred(*first1, *first2)) - goto not_done; - // We've reached the end of one of the sequences without a mismatch. - return first1 == last1 && first2 == last2; - not_done: - - // Check and make sure that we have the same # of elements left - typedef typename std::iterator_traits<ForwardIterator1>::difference_type diff1_t; - diff1_t len1 = _VSTD::distance(first1, last1); - typedef typename std::iterator_traits<ForwardIterator2>::difference_type diff2_t; - diff2_t len2 = _VSTD::distance(first2, last2); - if (len1 != len2) - return false; - - // For each element in [f1, l1) see if there are the - // same number of equal elements in [f2, l2) - for ( ForwardIterator1 i = first1; i != last1; ++i ) - { - // Have we already counted this value? - ForwardIterator1 j; - for ( j = first1; j != i; ++j ) - if (pred(*j, *i)) - break; - if ( j == i ) // didn't find it... - { - // Count number of *i in [f2, l2) - diff1_t c2 = 0; - for ( ForwardIterator2 iter2 = first2; iter2 != last2; ++iter2 ) - if (pred(*i, *iter2)) - ++c2; - if (c2 == 0) - return false; - - // Count number of *i in [i, l1) - diff1_t c1 = 0; - for (_ForwardIterator1 iter1 = i; iter1 != last1; ++iter1 ) - if (pred(*i, *iter1)) - ++c1; - if (c1 != c2) - return false; - } - } - return true; - } - -} +#include <boost/algorithm/cxx11/is_permutation.hpp> +#include <boost/algorithm/cxx14/mismatch.hpp> +namespace boost { namespace algorithm { -template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> -bool is_permutation ( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred ) +#if __cplusplus <= 201103L +/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, +/// ForwardIterator2 first2, ForwardIterator2 last2 ) +/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 +/// +/// \param first1 The start of the input sequence +/// \param last2 One past the end of the input sequence +/// \param first2 The start of the second sequence +/// \param last1 One past the end of the second sequence +/// \note This function is part of the C++2014 standard library. +/// We will use the standard one if it is available, +/// otherwise we have our own implementation. +template< class ForwardIterator1, class ForwardIterator2 > +bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, + ForwardIterator2 first2, ForwardIterator2 last2 ) { - return boost::algorithm::detail::is_permutation ( - first1, last1, first2, last2, pred, - typename std::iterator_traits<ForwardIterator1>::iterator_category (), - typename std::iterator_traits<ForwardIterator2>::iterator_category ()); +// How should I deal with the idea that ForwardIterator1::value_type +// and ForwardIterator2::value_type could be different? Define my own comparison predicate? + std::pair<ForwardIterator1, ForwardIterator2> eq = boost::algorithm::mismatch + ( first1, last1, first2, last2 ); + if ( eq.first == last1 && eq.second == last2) + return true; + return boost::algorithm::detail::is_permutation_tag ( + eq.first, last1, eq.second, last2, + std::equal_to<typename std::iterator_traits<ForwardIterator1>::value_type> (), + typename std::iterator_traits<ForwardIterator1>::iterator_category (), + typename std::iterator_traits<ForwardIterator2>::iterator_category ()); } -template<class ForwardIterator1, class ForwardIterator2> +/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, +/// ForwardIterator2 first2, ForwardIterator2 last2, +/// BinaryPredicate p ) +/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 +/// +/// \param first1 The start of the input sequence +/// \param last1 One past the end of the input sequence +/// \param first2 The start of the second sequence +/// \param last2 One past the end of the second sequence +/// \param pred The predicate to compare elements with +/// +/// \note This function is part of the C++2014 standard library. +/// We will use the standard one if it is available, +/// otherwise we have our own implementation. +template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate > bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2 ) + ForwardIterator2 first2, ForwardIterator2 last2, + BinaryPredicate pred ) { - typedef typename iterator_traits<_ForwardIterator1>::value_type value1_t; - typedef typename iterator_traits<_ForwardIterator2>::value_type value2_t; - return boost::algorithm::detail::is_permutation ( - first1, last1, first2, last2, - boost::algorithm::detail::is_perm_eq< - typename std::iterator_traits<InputIterator1>::value_type, - typename std::iterator_traits<InputIterator2>::value_type> (), - typename std::iterator_traits<ForwardIterator1>::iterator_category (), - typename std::iterator_traits<ForwardIterator2>::iterator_category ()); + std::pair<ForwardIterator1, ForwardIterator2> eq = boost::algorithm::mismatch + ( first1, last1, first2, last2, pred ); + if ( eq.first == last1 && eq.second == last2) + return true; + return boost::algorithm::detail::is_permutation_tag ( + first1, last1, first2, last2, pred, + typename std::iterator_traits<ForwardIterator1>::iterator_category (), + typename std::iterator_traits<ForwardIterator2>::iterator_category ()); } +#endif -// There are already range-based versions of these. - -}} // namespace boost and algorithm +}} -#endif // BOOST_ALGORITHM_IS_PERMUTATION_HPP +#endif // BOOST_ALGORITHM_IS_PERMUTATION14_HPP diff --git a/boost/algorithm/cxx14/mismatch.hpp b/boost/algorithm/cxx14/mismatch.hpp index 5229e3bda..926ab1944 100644 --- a/boost/algorithm/cxx14/mismatch.hpp +++ b/boost/algorithm/cxx14/mismatch.hpp @@ -12,13 +12,11 @@ #ifndef BOOST_ALGORITHM_MISMATCH_HPP #define BOOST_ALGORITHM_MISMATCH_HPP -#include <algorithm> // for std::mismatch -#include <utility> // for std::pair +#include <algorithm> // for std::mismatch +#include <utility> // for std::pair namespace boost { namespace algorithm { -template <class InputIterator1, class InputIterator2, class BinaryPredicate> - /// \fn mismatch ( InputIterator1 first1, InputIterator1 last1, /// InputIterator2 first2, InputIterator2 last2, /// BinaryPredicate pred ) @@ -29,10 +27,11 @@ template <class InputIterator1, class InputIterator2, class BinaryPredicate> /// \param first2 The start of the second range. /// \param last2 One past the end of the second range. /// \param pred A predicate for comparing the elements of the ranges +template <class InputIterator1, class InputIterator2, class BinaryPredicate> std::pair<InputIterator1, InputIterator2> mismatch ( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - BinaryPredicate pred ) + InputIterator1 first1, InputIterator1 last1, + InputIterator2 first2, InputIterator2 last2, + BinaryPredicate pred ) { for (; first1 != last1 && first2 != last2; ++first1, ++first2) if ( !pred ( *first1, *first2 )) @@ -50,8 +49,8 @@ std::pair<InputIterator1, InputIterator2> mismatch ( /// \param last2 One past the end of the second range. template <class InputIterator1, class InputIterator2> std::pair<InputIterator1, InputIterator2> mismatch ( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 ) + InputIterator1 first1, InputIterator1 last1, + InputIterator2 first2, InputIterator2 last2 ) { for (; first1 != last1 && first2 != last2; ++first1, ++first2) if ( *first1 != *first2 ) @@ -59,7 +58,7 @@ std::pair<InputIterator1, InputIterator2> mismatch ( return std::pair<InputIterator1, InputIterator2>(first1, first2); } -// There are already range-based versions of these. +// There are already range-based versions of these. }} // namespace boost and algorithm diff --git a/boost/algorithm/searching/detail/bm_traits.hpp b/boost/algorithm/searching/detail/bm_traits.hpp index ea150c302..9c255404c 100644 --- a/boost/algorithm/searching/detail/bm_traits.hpp +++ b/boost/algorithm/searching/detail/bm_traits.hpp @@ -20,7 +20,11 @@ #include <boost/type_traits/remove_const.hpp> #include <boost/array.hpp> +#ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP #include <boost/tr1/tr1/unordered_map> +#else +#include <unordered_map> +#endif #include <boost/algorithm/searching/detail/debugging.hpp> @@ -35,7 +39,11 @@ namespace boost { namespace algorithm { namespace detail { template<typename key_type, typename value_type> class skip_table<key_type, value_type, false> { private: +#ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP typedef std::tr1::unordered_map<key_type, value_type> skip_map; +#else + typedef std::unordered_map<key_type, value_type> skip_map; +#endif const value_type k_default_value; skip_map skip_; diff --git a/boost/algorithm/string/concept.hpp b/boost/algorithm/string/concept.hpp index 9876e98d5..17e834959 100644 --- a/boost/algorithm/string/concept.hpp +++ b/boost/algorithm/string/concept.hpp @@ -12,7 +12,7 @@ #define BOOST_STRING_CONCEPT_HPP #include <boost/concept_check.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> diff --git a/boost/algorithm/string/detail/find_format.hpp b/boost/algorithm/string/detail/find_format.hpp index 1612b9378..b39875024 100644 --- a/boost/algorithm/string/detail/find_format.hpp +++ b/boost/algorithm/string/detail/find_format.hpp @@ -12,7 +12,7 @@ #define BOOST_STRING_FIND_FORMAT_DETAIL_HPP #include <boost/algorithm/string/config.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/const_iterator.hpp> #include <boost/range/iterator.hpp> #include <boost/algorithm/string/detail/find_format_store.hpp> diff --git a/boost/algorithm/string/detail/find_format_all.hpp b/boost/algorithm/string/detail/find_format_all.hpp index 51ad56678..52930c83a 100644 --- a/boost/algorithm/string/detail/find_format_all.hpp +++ b/boost/algorithm/string/detail/find_format_all.hpp @@ -12,7 +12,7 @@ #define BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP #include <boost/algorithm/string/config.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/const_iterator.hpp> #include <boost/range/value_type.hpp> #include <boost/algorithm/string/detail/find_format_store.hpp> diff --git a/boost/algorithm/string/detail/find_format_store.hpp b/boost/algorithm/string/detail/find_format_store.hpp index e8bd84a6f..b9f4a88d9 100644 --- a/boost/algorithm/string/detail/find_format_store.hpp +++ b/boost/algorithm/string/detail/find_format_store.hpp @@ -12,7 +12,7 @@ #define BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP #include <boost/algorithm/string/config.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> namespace boost { namespace algorithm { diff --git a/boost/algorithm/string/detail/find_iterator.hpp b/boost/algorithm/string/detail/find_iterator.hpp index c76993a11..9b78a0f7e 100644 --- a/boost/algorithm/string/detail/find_iterator.hpp +++ b/boost/algorithm/string/detail/find_iterator.hpp @@ -12,7 +12,7 @@ #define BOOST_STRING_FIND_ITERATOR_DETAIL_HPP #include <boost/algorithm/string/config.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_categories.hpp> #include <boost/function.hpp> diff --git a/boost/algorithm/string/detail/finder.hpp b/boost/algorithm/string/detail/finder.hpp index 93310d053..a2a958212 100644 --- a/boost/algorithm/string/detail/finder.hpp +++ b/boost/algorithm/string/detail/finder.hpp @@ -15,7 +15,7 @@ #include <boost/algorithm/string/constants.hpp> #include <boost/detail/iterator.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/empty.hpp> @@ -142,7 +142,6 @@ namespace boost { ForwardIteratorT End, std::forward_iterator_tag ) const { - typedef ForwardIteratorT input_iterator_type; typedef iterator_range<ForwardIteratorT> result_type; first_finder_type first_finder( @@ -263,7 +262,6 @@ namespace boost { ForwardIteratorT End, unsigned int N) const { - typedef ForwardIteratorT input_iterator_type; typedef iterator_range<ForwardIteratorT> result_type; // Sanity check @@ -298,7 +296,6 @@ namespace boost { ForwardIteratorT End, unsigned int N) const { - typedef ForwardIteratorT input_iterator_type; typedef iterator_range<ForwardIteratorT> result_type; // Sanity check @@ -362,7 +359,6 @@ namespace boost { unsigned int N, std::random_access_iterator_tag ) { - typedef ForwardIteratorT input_iterator_type; typedef iterator_range<ForwardIteratorT> result_type; if ( (End<=Begin) || ( static_cast<unsigned int>(End-Begin) < N ) ) @@ -436,7 +432,6 @@ namespace boost { unsigned int N, std::random_access_iterator_tag ) { - typedef ForwardIteratorT input_iterator_type; typedef iterator_range<ForwardIteratorT> result_type; if ( (End<=Begin) || ( static_cast<unsigned int>(End-Begin) < N ) ) @@ -627,8 +622,6 @@ namespace boost { { #if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) return iterator_range<const ForwardIterator2T>(this->m_Range); -#elif BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - return iterator_range<ForwardIterator2T>(m_Range.begin(), m_Range.end()); #else return m_Range; #endif diff --git a/boost/algorithm/string/detail/finder_regex.hpp b/boost/algorithm/string/detail/finder_regex.hpp index 01bf5a082..9cb01cfaf 100644 --- a/boost/algorithm/string/detail/finder_regex.hpp +++ b/boost/algorithm/string/detail/finder_regex.hpp @@ -14,7 +14,7 @@ #include <boost/algorithm/string/config.hpp> #include <boost/regex.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> diff --git a/boost/algorithm/string/detail/formatter.hpp b/boost/algorithm/string/detail/formatter.hpp index 8e7b727e7..c071822f2 100644 --- a/boost/algorithm/string/detail/formatter.hpp +++ b/boost/algorithm/string/detail/formatter.hpp @@ -12,7 +12,7 @@ #define BOOST_STRING_FORMATTER_DETAIL_HPP -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/const_iterator.hpp> diff --git a/boost/algorithm/string/detail/util.hpp b/boost/algorithm/string/detail/util.hpp index 7e8471f71..cf4a8b1c8 100644 --- a/boost/algorithm/string/detail/util.hpp +++ b/boost/algorithm/string/detail/util.hpp @@ -13,7 +13,7 @@ #include <boost/algorithm/string/config.hpp> #include <functional> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> namespace boost { namespace algorithm { diff --git a/boost/algorithm/string/erase.hpp b/boost/algorithm/string/erase.hpp index e738b86fa..688379097 100644 --- a/boost/algorithm/string/erase.hpp +++ b/boost/algorithm/string/erase.hpp @@ -13,7 +13,7 @@ #include <boost/algorithm/string/config.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/iterator.hpp> diff --git a/boost/algorithm/string/find.hpp b/boost/algorithm/string/find.hpp index da1cb616b..f2c2926b5 100644 --- a/boost/algorithm/string/find.hpp +++ b/boost/algorithm/string/find.hpp @@ -13,7 +13,7 @@ #include <boost/algorithm/string/config.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/iterator.hpp> diff --git a/boost/algorithm/string/find_format.hpp b/boost/algorithm/string/find_format.hpp index ef0373912..0e84a4ee6 100644 --- a/boost/algorithm/string/find_format.hpp +++ b/boost/algorithm/string/find_format.hpp @@ -13,7 +13,7 @@ #include <deque> #include <boost/detail/iterator.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/const_iterator.hpp> diff --git a/boost/algorithm/string/find_iterator.hpp b/boost/algorithm/string/find_iterator.hpp index e8cede5e8..5834407f0 100644 --- a/boost/algorithm/string/find_iterator.hpp +++ b/boost/algorithm/string/find_iterator.hpp @@ -15,7 +15,7 @@ #include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_categories.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/iterator.hpp> @@ -132,12 +132,7 @@ namespace boost { // increment void increment() { - if(m_Match.begin() == m_Match.end()) - m_Match=this->do_find(m_Match.end(),m_End); - else { - input_iterator_type last = m_Match.begin(); - m_Match=this->do_find(++last,m_End); - } + m_Match=this->do_find(m_Match.end(),m_End); } // comparison @@ -235,7 +230,7 @@ namespace boost { \post eof()==true */ - split_iterator() {} + split_iterator() { m_bEof = true; } //! Copy constructor /*! Construct a copy of the split_iterator diff --git a/boost/algorithm/string/finder.hpp b/boost/algorithm/string/finder.hpp index 4c7ac38b0..93f7ec304 100644 --- a/boost/algorithm/string/finder.hpp +++ b/boost/algorithm/string/finder.hpp @@ -13,7 +13,7 @@ #include <boost/algorithm/string/config.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/iterator.hpp> diff --git a/boost/algorithm/string/formatter.hpp b/boost/algorithm/string/formatter.hpp index c2c13eb2e..de8681bc3 100644 --- a/boost/algorithm/string/formatter.hpp +++ b/boost/algorithm/string/formatter.hpp @@ -13,7 +13,7 @@ #include <boost/detail/iterator.hpp> #include <boost/range/value_type.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/as_literal.hpp> #include <boost/algorithm/string/detail/formatter.hpp> diff --git a/boost/algorithm/string/iter_find.hpp b/boost/algorithm/string/iter_find.hpp index e10652834..10424abc7 100644 --- a/boost/algorithm/string/iter_find.hpp +++ b/boost/algorithm/string/iter_find.hpp @@ -16,7 +16,7 @@ #include <iterator> #include <boost/iterator/transform_iterator.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/iterator.hpp> diff --git a/boost/algorithm/string/predicate.hpp b/boost/algorithm/string/predicate.hpp index 6642f427d..0879829b5 100644 --- a/boost/algorithm/string/predicate.hpp +++ b/boost/algorithm/string/predicate.hpp @@ -17,7 +17,7 @@ #include <boost/range/iterator.hpp> #include <boost/range/const_iterator.hpp> #include <boost/range/as_literal.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/algorithm/string/compare.hpp> #include <boost/algorithm/string/find.hpp> diff --git a/boost/algorithm/string/regex.hpp b/boost/algorithm/string/regex.hpp index 0a4c38bd7..a6c7c60ae 100644 --- a/boost/algorithm/string/regex.hpp +++ b/boost/algorithm/string/regex.hpp @@ -14,7 +14,7 @@ #include <boost/algorithm/string/config.hpp> #include <boost/regex.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/iterator.hpp> diff --git a/boost/algorithm/string/replace.hpp b/boost/algorithm/string/replace.hpp index f2d201f97..0c04e47e1 100644 --- a/boost/algorithm/string/replace.hpp +++ b/boost/algorithm/string/replace.hpp @@ -13,7 +13,7 @@ #include <boost/algorithm/string/config.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/iterator.hpp> diff --git a/boost/algorithm/string/sequence_traits.hpp b/boost/algorithm/string/sequence_traits.hpp index b1ac67e9b..be151f8d3 100644 --- a/boost/algorithm/string/sequence_traits.hpp +++ b/boost/algorithm/string/sequence_traits.hpp @@ -36,47 +36,6 @@ namespace boost { // sequence traits -----------------------------------------------// -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - //! Native replace tester - /*! - Declare an override of this tester function with return - type boost::string_algo::yes_type for a sequence with this property. - - \return yes_type if the container has basic_string like native replace - method. - */ - no_type has_native_replace_tester(...); - - //! Stable iterators tester - /*! - Declare an override of this tester function with return - type boost::string_algo::yes_type for a sequence with this property. - - \return yes_type if the sequence's insert/replace/erase methods do not invalidate - existing iterators. - */ - no_type has_stable_iterators_tester(...); - - //! const time insert tester - /*! - Declare an override of this tester function with return - type boost::string_algo::yes_type for a sequence with this property. - - \return yes_type if the sequence's insert method is working in constant time - */ - no_type has_const_time_insert_tester(...); - - //! const time erase tester - /*! - Declare an override of this tester function with return - type boost::string_algo::yes_type for a sequence with this property. - - \return yes_type if the sequence's erase method is working in constant time - */ - no_type has_const_time_erase_tester(...); - -#endif //BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //! Native replace trait /*! @@ -86,20 +45,12 @@ namespace boost { class has_native_replace { -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - private: - static T* t; - public: - BOOST_STATIC_CONSTANT(bool, value=( - sizeof(has_native_replace_tester(t))==sizeof(yes_type) ) ); -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: # if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) enum { value = false }; # else BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_<has_native_replace<T>::value> type; @@ -114,20 +65,12 @@ namespace boost { template< typename T > class has_stable_iterators { -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - private: - static T* t; - public: - BOOST_STATIC_CONSTANT(bool, value=( - sizeof(has_stable_iterators_tester(t))==sizeof(yes_type) ) ); -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: # if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) enum { value = false }; # else BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_<has_stable_iterators<T>::value> type; }; @@ -141,20 +84,12 @@ namespace boost { template< typename T > class has_const_time_insert { -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - private: - static T* t; - public: - BOOST_STATIC_CONSTANT(bool, value=( - sizeof(has_const_time_insert_tester(t))==sizeof(yes_type) ) ); -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: # if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) enum { value = false }; # else BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_<has_const_time_insert<T>::value> type; }; @@ -168,20 +103,12 @@ namespace boost { template< typename T > class has_const_time_erase { -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - private: - static T* t; - public: - BOOST_STATIC_CONSTANT(bool, value=( - sizeof(has_const_time_erase_tester(t))==sizeof(yes_type) ) ); -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: # if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) enum { value = false }; # else BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_<has_const_time_erase<T>::value> type; }; diff --git a/boost/algorithm/string/std/list_traits.hpp b/boost/algorithm/string/std/list_traits.hpp index ce2379d83..a3cf7bb18 100644 --- a/boost/algorithm/string/std/list_traits.hpp +++ b/boost/algorithm/string/std/list_traits.hpp @@ -20,22 +20,6 @@ namespace boost { // std::list<> traits -----------------------------------------------// -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - // stable iterators tester - template<typename T, typename AllocT> - yes_type has_stable_iterators_tester( const ::std::list<T,AllocT>* ); - - // const time insert tester - template<typename T, typename AllocT> - yes_type has_const_time_insert_tester( const ::std::list<T,AllocT>* ); - - // const time erase tester - template<typename T, typename AllocT> - yes_type has_const_time_erase_tester( const ::std::list<T,AllocT>* ); - - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // stable iterators trait template<typename T, typename AllocT> @@ -75,7 +59,6 @@ namespace boost { #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_<has_const_time_erase<T>::value> type; }; -#endif } // namespace algorithm diff --git a/boost/algorithm/string/std/rope_traits.hpp b/boost/algorithm/string/std/rope_traits.hpp index c2cd549ce..637059a55 100644 --- a/boost/algorithm/string/std/rope_traits.hpp +++ b/boost/algorithm/string/std/rope_traits.hpp @@ -20,25 +20,6 @@ namespace boost { // SGI's std::rope<> traits -----------------------------------------------// -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - // native replace tester - template<typename T, typename TraitsT, typename AllocT> - yes_type has_native_replace_tester( const std::rope<T, TraitsT, AllocT>* ); - - // stable iterators tester - template<typename T, typename TraitsT, typename AllocT> - yes_type has_stable_iterators_tester( const std::rope<T, TraitsT, AllocT>* ); - - // const time insert tester - template<typename T, typename TraitsT, typename AllocT> - yes_type has_const_time_insert_tester( const std::rope<T, TraitsT, AllocT>* ); - - // const time erase tester - template<typename T, typename TraitsT, typename AllocT> - yes_type has_const_time_erase_tester( const std::rope<T, TraitsT, AllocT>* ); - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // native replace trait template<typename T, typename TraitsT, typename AllocT> @@ -91,7 +72,6 @@ namespace boost { #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_<value> type; }; -#endif } // namespace algorithm diff --git a/boost/algorithm/string/std/slist_traits.hpp b/boost/algorithm/string/std/slist_traits.hpp index 7b915a3d4..c30b93c73 100644 --- a/boost/algorithm/string/std/slist_traits.hpp +++ b/boost/algorithm/string/std/slist_traits.hpp @@ -21,21 +21,6 @@ namespace boost { // SGI's std::slist<> traits -----------------------------------------------// -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - // stable iterators tester - template<typename T, typename AllocT> - yes_type has_stable_iterators_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT>* ); - - // const time insert tester - template<typename T, typename AllocT> - yes_type has_const_time_insert_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT>* ); - - // const time erase tester - template<typename T, typename AllocT> - yes_type has_const_time_erase_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT>* ); - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // stable iterators trait template<typename T, typename AllocT> @@ -75,7 +60,6 @@ namespace boost { #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_<has_const_time_erase<T>::value> type; }; -#endif } // namespace algorithm diff --git a/boost/algorithm/string/std/string_traits.hpp b/boost/algorithm/string/std/string_traits.hpp index c466d26b1..c9408307d 100644 --- a/boost/algorithm/string/std/string_traits.hpp +++ b/boost/algorithm/string/std/string_traits.hpp @@ -20,13 +20,6 @@ namespace boost { // std::basic_string<> traits -----------------------------------------------// -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - // native replace tester - template<typename T, typename TraitsT, typename AllocT> - yes_type has_native_replace_tester( const std::basic_string<T, TraitsT, AllocT>* ); - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // native replace trait template<typename T, typename TraitsT, typename AllocT> @@ -43,7 +36,6 @@ namespace boost { }; -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace algorithm } // namespace boost diff --git a/boost/algorithm/string/trim.hpp b/boost/algorithm/string/trim.hpp index be57cd92f..e740d57d9 100644 --- a/boost/algorithm/string/trim.hpp +++ b/boost/algorithm/string/trim.hpp @@ -17,7 +17,7 @@ #include <boost/range/end.hpp> #include <boost/range/const_iterator.hpp> #include <boost/range/as_literal.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> #include <boost/algorithm/string/detail/trim.hpp> #include <boost/algorithm/string/classification.hpp> |
