Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61281 - trunk/boost/range/algorithm
From: neil_at_[hidden]
Date: 2010-04-14 18:16:14


Author: neilgroves
Date: 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
New Revision: 61281
URL: http://svn.boost.org/trac/boost/changeset/61281

Log:
Boost.Range removed redundant overloads, increased compiler support, and made return types consistent.
Text files modified:
   trunk/boost/range/algorithm/adjacent_find.hpp | 65 +++-------------------------
   trunk/boost/range/algorithm/count.hpp | 9 ---
   trunk/boost/range/algorithm/count_if.hpp | 9 ---
   trunk/boost/range/algorithm/equal_range.hpp | 24 ----------
   trunk/boost/range/algorithm/for_each.hpp | 8 ---
   trunk/boost/range/algorithm/generate.hpp | 9 ---
   trunk/boost/range/algorithm/heap_algorithm.hpp | 73 -------------------------------
   trunk/boost/range/algorithm/inplace_merge.hpp | 21 ---------
   trunk/boost/range/algorithm/max_element.hpp | 40 -----------------
   trunk/boost/range/algorithm/min_element.hpp | 40 -----------------
   trunk/boost/range/algorithm/mismatch.hpp | 91 ----------------------------------------
   trunk/boost/range/algorithm/nth_element.hpp | 21 ---------
   trunk/boost/range/algorithm/partial_sort.hpp | 21 ---------
   trunk/boost/range/algorithm/partial_sort_copy.hpp | 16 ++----
   trunk/boost/range/algorithm/partition.hpp | 20 --------
   trunk/boost/range/algorithm/permutation.hpp | 36 ---------------
   trunk/boost/range/algorithm/random_shuffle.hpp | 18 -------
   trunk/boost/range/algorithm/remove.hpp | 20 --------
   trunk/boost/range/algorithm/remove_if.hpp | 20 --------
   trunk/boost/range/algorithm/replace.hpp | 11 ----
   trunk/boost/range/algorithm/replace_if.hpp | 11 ----
   trunk/boost/range/algorithm/reverse.hpp | 9 ---
   trunk/boost/range/algorithm/reverse_copy.hpp | 10 ---
   trunk/boost/range/algorithm/rotate.hpp | 15 -----
   trunk/boost/range/algorithm/rotate_copy.hpp | 6 +-
   trunk/boost/range/algorithm/search.hpp | 51 ----------------------
   trunk/boost/range/algorithm/search_n.hpp | 80 ++++------------------------------
   trunk/boost/range/algorithm/sort.hpp | 18 -------
   trunk/boost/range/algorithm/stable_partition.hpp | 20 --------
   trunk/boost/range/algorithm/stable_sort.hpp | 18 -------
   trunk/boost/range/algorithm/swap_ranges.hpp | 12 ++--
   trunk/boost/range/algorithm/unique.hpp | 36 ---------------
   32 files changed, 37 insertions(+), 821 deletions(-)

Modified: trunk/boost/range/algorithm/adjacent_find.hpp
==============================================================================
--- trunk/boost/range/algorithm/adjacent_find.hpp (original)
+++ trunk/boost/range/algorithm/adjacent_find.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -28,8 +28,8 @@
 ///
 /// \pre ForwardRange is a model of the ForwardRangeConcept
 /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
-template< typename ForwardRange >
-inline typename range_iterator<ForwardRange>::type
+template< class ForwardRange >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
 adjacent_find(ForwardRange & rng)
 {
     BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
@@ -37,43 +37,19 @@
 }
 
 /// \overload
-template< typename ForwardRange >
-inline typename range_iterator<const ForwardRange>::type
-adjacent_find(const ForwardRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return std::adjacent_find(boost::begin(rng),boost::end(rng));
-}
-
-/// \overload
-template< typename ForwardRange, typename BinaryPredicate >
-inline typename range_iterator<ForwardRange>::type
+template< class ForwardRange, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
 adjacent_find(ForwardRange & rng, BinaryPredicate pred)
 {
     BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
- typename range_value<ForwardRange>::type,
- typename range_value<ForwardRange>::type>));
- return std::adjacent_find(boost::begin(rng),boost::end(rng),pred);
-}
-
-/// \overload
-template< typename ForwardRange, typename BinaryPredicate >
-inline typename range_iterator<const ForwardRange>::type
-adjacent_find(const ForwardRange& rng, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
- typename range_value<const ForwardRange>::type,
- typename range_value<const ForwardRange>::type>));
     return std::adjacent_find(boost::begin(rng),boost::end(rng),pred);
 }
 
 // range_return overloads
 
 /// \overload
-template< range_return_value re, typename ForwardRange >
-inline typename range_return<ForwardRange,re>::type
+template< range_return_value re, class ForwardRange >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
 adjacent_find(ForwardRange & rng)
 {
     BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
@@ -83,41 +59,16 @@
 }
 
 /// \overload
-template< range_return_value re, typename ForwardRange >
-inline typename range_return<const ForwardRange,re>::type
-adjacent_find(const ForwardRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return range_return<const ForwardRange,re>::
- pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
- rng);
-}
-
-/// \overload
-template< range_return_value re, typename ForwardRange, typename BinaryPredicate >
-inline typename range_return<ForwardRange,re>::type
+template< range_return_value re, class ForwardRange, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
 adjacent_find(ForwardRange& rng, BinaryPredicate pred)
 {
     BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
- typename range_value<ForwardRange>::type,
- typename range_value<ForwardRange>::type>));
     return range_return<ForwardRange,re>::
         pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
              rng);
 }
 
-/// \overload
-template< range_return_value re, typename ForwardRange, typename BinaryPredicate >
-inline typename range_return<const ForwardRange,re>::type
-adjacent_find(const ForwardRange& rng, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return range_return<const ForwardRange,re>::
- pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
- rng);
-}
-
     } // namespace range
     using range::adjacent_find;
 } // namespace boost

Modified: trunk/boost/range/algorithm/count.hpp
==============================================================================
--- trunk/boost/range/algorithm/count.hpp (original)
+++ trunk/boost/range/algorithm/count.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -27,15 +27,6 @@
 ///
 /// \pre SinglePassRange is a model of the SinglePassRangeConcept
 template< class SinglePassRange, class Value >
-inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange>::type
-count(SinglePassRange& rng, const Value& val)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
- return std::count(boost::begin(rng), boost::end(rng), val);
-}
-
-/// \overload
-template< class SinglePassRange, class Value >
 inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange const>::type
 count(const SinglePassRange& rng, const Value& val)
 {

Modified: trunk/boost/range/algorithm/count_if.hpp
==============================================================================
--- trunk/boost/range/algorithm/count_if.hpp (original)
+++ trunk/boost/range/algorithm/count_if.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -28,15 +28,6 @@
 /// \pre SinglePassRange is a model of the SinglePassRangeConcept
 /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
 template< class SinglePassRange, class UnaryPredicate >
-inline BOOST_DEDUCED_TYPENAME boost::range_difference<SinglePassRange>::type
-count_if(SinglePassRange& rng, UnaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
- return std::count_if(boost::begin(rng), boost::end(rng), pred);
-}
-
-/// \overload
-template< class SinglePassRange, class UnaryPredicate >
 inline BOOST_DEDUCED_TYPENAME boost::range_difference<const SinglePassRange>::type
 count_if(const SinglePassRange& rng, UnaryPredicate pred)
 {

Modified: trunk/boost/range/algorithm/equal_range.hpp
==============================================================================
--- trunk/boost/range/algorithm/equal_range.hpp (original)
+++ trunk/boost/range/algorithm/equal_range.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -38,18 +38,6 @@
 }
 
 /// \overload
-template<class ForwardRange, class Value>
-inline std::pair<
- BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type,
- BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type
- >
-equal_range(const ForwardRange& rng, const Value& val)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::equal_range(boost::begin(rng), boost::end(rng), val);
-}
-
-/// \overload
 template<class ForwardRange, class Value, class SortPredicate>
 inline std::pair<
         BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type,
@@ -61,18 +49,6 @@
     return std::equal_range(boost::begin(rng), boost::end(rng), val, pred);
 }
 
-/// \overload
-template<class ForwardRange, class Value, class SortPredicate>
-inline std::pair<
- BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type,
- BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type
- >
-equal_range(const ForwardRange& rng, const Value& val, SortPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::equal_range(boost::begin(rng), boost::end(rng), val, pred);
-}
-
     } // namespace range
     using range::equal_range;
 } // namespace boost

Modified: trunk/boost/range/algorithm/for_each.hpp
==============================================================================
--- trunk/boost/range/algorithm/for_each.hpp (original)
+++ trunk/boost/range/algorithm/for_each.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -33,14 +33,6 @@
     return std::for_each(boost::begin(rng),boost::end(rng),fun);
 }
 
-/// \overload
-template< class SinglePassRange, class UnaryFunction >
-inline UnaryFunction for_each(const SinglePassRange& rng, UnaryFunction fun)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
- return std::for_each(boost::begin(rng), boost::end(rng), fun);
-}
-
     } // namespace range
     using range::for_each;
 } // namespace boost

Modified: trunk/boost/range/algorithm/generate.hpp
==============================================================================
--- trunk/boost/range/algorithm/generate.hpp (original)
+++ trunk/boost/range/algorithm/generate.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -33,15 +33,6 @@
     return rng;
 }
 
-/// \overload
-template< class ForwardRange, class Generator >
-inline const ForwardRange& generate(const ForwardRange& rng, Generator gen)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- std::generate(boost::begin(rng), boost::end(rng), gen);
- return rng;
-}
-
     } // namespace range
     using range::generate;
 } // namespace boost

Modified: trunk/boost/range/algorithm/heap_algorithm.hpp
==============================================================================
--- trunk/boost/range/algorithm/heap_algorithm.hpp (original)
+++ trunk/boost/range/algorithm/heap_algorithm.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -27,18 +27,10 @@
 /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
 /// \pre Compare is a model of the BinaryPredicateConcept
 template<class RandomAccessRange>
-inline void push_heap(RandomAccessRange& rng)
+inline RandomAccessRange& push_heap(RandomAccessRange& rng)
 {
     BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
     std::push_heap(boost::begin(rng), boost::end(rng));
-}
-
-/// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& push_heap(const RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::push_heap(boost::begin(rng), boost::end(rng));
     return rng;
 }
 
@@ -51,15 +43,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class Compare>
-inline const RandomAccessRange& push_heap(const RandomAccessRange& rng, Compare comp_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
- return rng;
-}
-
 /// \brief template function pop_heap
 ///
 /// range-based version of the pop_heap std algorithm
@@ -75,15 +58,6 @@
 }
 
 /// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& pop_heap(const RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::pop_heap(boost::begin(rng),boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class RandomAccessRange, class Compare>
 inline RandomAccessRange& pop_heap(RandomAccessRange& rng, Compare comp_pred)
 {
@@ -92,15 +66,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class Compare>
-inline const RandomAccessRange& pop_heap(const RandomAccessRange& rng, Compare comp_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
- return rng;
-}
-
 /// \brief template function make_heap
 ///
 /// range-based version of the make_heap std algorithm
@@ -116,15 +81,6 @@
 }
 
 /// \overload
-template<class RandomAccessRange>
-inline RandomAccessRange& make_heap(const RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::make_heap(boost::begin(rng),boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class RandomAccessRange, class Compare>
 inline RandomAccessRange& make_heap(RandomAccessRange& rng, Compare comp_pred)
 {
@@ -133,15 +89,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class Compare>
-inline const RandomAccessRange& make_heap(const RandomAccessRange& rng, Compare comp_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
- return rng;
-}
-
 /// \brief template function sort_heap
 ///
 /// range-based version of the sort_heap std algorithm
@@ -157,15 +104,6 @@
 }
 
 /// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& sort_heap(const RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::sort_heap(boost::begin(rng), boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class RandomAccessRange, class Compare>
 inline RandomAccessRange& sort_heap(RandomAccessRange& rng, Compare comp_pred)
 {
@@ -174,15 +112,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class Compare>
-inline const RandomAccessRange& sort_heap(const RandomAccessRange& rng, Compare comp_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
- return rng;
-}
-
     } // namespace range
     using range::push_heap;
     using range::pop_heap;

Modified: trunk/boost/range/algorithm/inplace_merge.hpp
==============================================================================
--- trunk/boost/range/algorithm/inplace_merge.hpp (original)
+++ trunk/boost/range/algorithm/inplace_merge.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -36,16 +36,6 @@
 }
 
 /// \overload
-template<class BidirectionalRange>
-inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng,
- BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- std::inplace_merge(boost::begin(rng), middle, boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class BidirectionalRange, class BinaryPredicate>
 inline BidirectionalRange& inplace_merge(BidirectionalRange& rng,
     BOOST_DEDUCED_TYPENAME boost::range_iterator<BidirectionalRange>::type middle,
@@ -56,17 +46,6 @@
     return rng;
 }
 
-/// \overload
-template<class BidirectionalRange, class BinaryPredicate>
-inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng,
- BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle,
- BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred);
- return rng;
-}
-
     } // namespace range
     using range::inplace_merge;
 } // namespace boost

Modified: trunk/boost/range/algorithm/max_element.hpp
==============================================================================
--- trunk/boost/range/algorithm/max_element.hpp (original)
+++ trunk/boost/range/algorithm/max_element.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -36,15 +36,6 @@
 }
 
 /// \overload
-template<class ForwardRange>
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
-max_element(const ForwardRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::max_element(boost::begin(rng), boost::end(rng));
-}
-
-/// \overload
 template<class ForwardRange, class BinaryPredicate>
 inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
 max_element(ForwardRange& rng, BinaryPredicate pred)
@@ -53,15 +44,6 @@
     return std::max_element(boost::begin(rng), boost::end(rng), pred);
 }
 
-/// \overload
-template<class ForwardRange, class BinaryPredicate>
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
-max_element(const ForwardRange& rng, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::max_element(boost::begin(rng), boost::end(rng), pred);
-}
-
 // range_return overloads
 
 /// \overload
@@ -76,17 +58,6 @@
 }
 
 /// \overload
-template<range_return_value re, class ForwardRange>
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-max_element(const ForwardRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return range_return<const ForwardRange,re>::pack(
- std::max_element(boost::begin(rng), boost::end(rng)),
- rng);
-}
-
-/// \overload
 template<range_return_value re, class ForwardRange, class BinaryPredicate>
 inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
 max_element(ForwardRange& rng, BinaryPredicate pred)
@@ -97,17 +68,6 @@
         rng);
 }
 
-/// \overload
-template<range_return_value re, class ForwardRange, class BinaryPredicate>
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-max_element(const ForwardRange& rng, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return range_return<const ForwardRange,re>::pack(
- std::max_element(boost::begin(rng), boost::end(rng), pred),
- rng);
-}
-
     } // namespace range
     using range::max_element;
 } // namespace boost

Modified: trunk/boost/range/algorithm/min_element.hpp
==============================================================================
--- trunk/boost/range/algorithm/min_element.hpp (original)
+++ trunk/boost/range/algorithm/min_element.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -36,15 +36,6 @@
 }
 
 /// \overload
-template<class ForwardRange>
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
-min_element(const ForwardRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::min_element(boost::begin(rng), boost::end(rng));
-}
-
-/// \overload
 template<class ForwardRange, class BinaryPredicate>
 inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
 min_element(ForwardRange& rng, BinaryPredicate pred)
@@ -53,15 +44,6 @@
     return std::min_element(boost::begin(rng), boost::end(rng), pred);
 }
 
-/// \overload
-template<class ForwardRange, class BinaryPredicate>
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
-min_element(const ForwardRange& rng, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::min_element(boost::begin(rng), boost::end(rng), pred);
-}
-
 // range_return overloads
 
 /// \overload
@@ -76,17 +58,6 @@
 }
 
 /// \overload
-template<range_return_value re, class ForwardRange>
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-min_element(const ForwardRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return range_return<const ForwardRange,re>::pack(
- std::min_element(boost::begin(rng), boost::end(rng)),
- rng);
-}
-
-/// \overload
 template<range_return_value re, class ForwardRange, class BinaryPredicate>
 inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
 min_element(ForwardRange& rng, BinaryPredicate pred)
@@ -97,17 +68,6 @@
         rng);
 }
 
-/// \overload
-template<range_return_value re, class ForwardRange, class BinaryPredicate>
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-min_element(const ForwardRange& rng, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return range_return<const ForwardRange,re>::pack(
- std::min_element(boost::begin(rng), boost::end(rng), pred),
- rng);
-}
-
     } // namespace range
     using range::min_element;
 } // namespace boost

Modified: trunk/boost/range/algorithm/mismatch.hpp
==============================================================================
--- trunk/boost/range/algorithm/mismatch.hpp (original)
+++ trunk/boost/range/algorithm/mismatch.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -71,36 +71,6 @@
 template< class SinglePassRange1, class SinglePassRange2 >
 inline std::pair<
     BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
- BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
-mismatch(SinglePassRange1& rng1, const SinglePassRange2 & rng2)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
-
- return ::boost::range_detail::mismatch_impl(
- ::boost::begin(rng1), ::boost::end(rng1),
- ::boost::begin(rng2), ::boost::end(rng2));
-}
-
-/// \overload
-template< class SinglePassRange1, class SinglePassRange2 >
-inline std::pair<
- BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
- BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
-mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
-
- return ::boost::range_detail::mismatch_impl(
- ::boost::begin(rng1), ::boost::end(rng1),
- ::boost::begin(rng2), ::boost::end(rng2));
-}
-
-/// \overload
-template< class SinglePassRange1, class SinglePassRange2 >
-inline std::pair<
- BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
     BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
 mismatch(SinglePassRange1& rng1, SinglePassRange2 & rng2)
 {
@@ -113,52 +83,6 @@
 }
 
 /// \overload
-template< class SinglePassRange1, class SinglePassRange2 >
-inline std::pair<
- BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
- BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
-mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
-
- return ::boost::range_detail::mismatch_impl(
- ::boost::begin(rng1), ::boost::end(rng1),
- ::boost::begin(rng2), ::boost::end(rng2));
-}
-
-
-/// \overload
-template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
-inline std::pair<
- BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
- BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
-mismatch(SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
-
- return ::boost::range_detail::mismatch_impl(
- ::boost::begin(rng1), ::boost::end(rng1),
- ::boost::begin(rng2), ::boost::end(rng2), pred);
-}
-
-/// \overload
-template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
-inline std::pair<
- BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
- BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
-mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
-
- return ::boost::range_detail::mismatch_impl(
- ::boost::begin(rng1), ::boost::end(rng1),
- ::boost::begin(rng2), ::boost::end(rng2), pred);
-}
-
-/// \overload
 template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
 inline std::pair<
     BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
@@ -173,21 +97,6 @@
         ::boost::begin(rng2), ::boost::end(rng2), pred);
 }
 
-/// \overload
-template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
-inline std::pair<
- BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
- BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
-mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
-
- return ::boost::range_detail::mismatch_impl(
- ::boost::begin(rng1), ::boost::end(rng1),
- ::boost::begin(rng2), ::boost::end(rng2), pred);
-}
-
     } // namespace range
     using range::mismatch;
 } // namespace boost

Modified: trunk/boost/range/algorithm/nth_element.hpp
==============================================================================
--- trunk/boost/range/algorithm/nth_element.hpp (original)
+++ trunk/boost/range/algorithm/nth_element.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -36,16 +36,6 @@
 }
 
 /// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& nth_element(const RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::nth_element(boost::begin(rng),nth,boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class RandomAccessRange, class BinaryPredicate>
 inline RandomAccessRange& nth_element(RandomAccessRange& rng,
     BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth,
@@ -56,17 +46,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class BinaryPredicate>
-inline const RandomAccessRange& nth_element(const RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth,
- BinaryPredicate sort_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::nth_element(boost::begin(rng),nth,boost::end(rng), sort_pred);
- return rng;
-}
-
     } // namespace range
     using range::nth_element;
 } // namespace boost

Modified: trunk/boost/range/algorithm/partial_sort.hpp
==============================================================================
--- trunk/boost/range/algorithm/partial_sort.hpp (original)
+++ trunk/boost/range/algorithm/partial_sort.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -36,16 +36,6 @@
 }
 
 /// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& partial_sort(const RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::partial_sort(boost::begin(rng), middle, boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class RandomAccessRange, class BinaryPredicate>
 inline RandomAccessRange& partial_sort(RandomAccessRange& rng,
     BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle,
@@ -57,17 +47,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class BinaryPredicate>
-inline const RandomAccessRange& partial_sort(const RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle,
- BinaryPredicate sort_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::partial_sort(boost::begin(rng), middle, boost::end(rng), sort_pred);
- return rng;
-}
-
     } // namespace range
     using range::partial_sort;
 } // namespace boost

Modified: trunk/boost/range/algorithm/partial_sort_copy.hpp
==============================================================================
--- trunk/boost/range/algorithm/partial_sort_copy.hpp (original)
+++ trunk/boost/range/algorithm/partial_sort_copy.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -28,30 +28,24 @@
 /// \pre SinglePassRange is a model of the SinglePassRangeConcept
 /// \pre RandomAccessRange is a model of the Mutable_RandomAccessRangeConcept
 /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
-template<typename SinglePassRange, typename RandomAccessRange>
-inline typename range_iterator<RandomAccessRange>::type
+template<class SinglePassRange, class RandomAccessRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type
 partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2)
 {
     BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
- BOOST_RANGE_CONCEPT_ASSERT((WriteableRandomAccessRangeConcept<RandomAccessRange>));
- BOOST_RANGE_CONCEPT_ASSERT((range_detail::SameTypeConcept<typename range_value<SinglePassRange>::type, typename range_value<RandomAccessRange>::type>));
- BOOST_RANGE_CONCEPT_ASSERT((LessThanComparableConcept<typename range_value<SinglePassRange>::type>));
 
     return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1),
         boost::begin(rng2), boost::end(rng2));
 }
 
 /// \overload
-template<typename SinglePassRange, typename RandomAccessRange,
- typename BinaryPredicate>
-inline typename range_iterator<RandomAccessRange>::type
+template<class SinglePassRange, class RandomAccessRange,
+ class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type
 partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2,
     BinaryPredicate pred)
 {
     BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
- BOOST_RANGE_CONCEPT_ASSERT((WriteableRandomAccessRangeConcept<RandomAccessRange>));
- BOOST_RANGE_CONCEPT_ASSERT((range_detail::SameTypeConcept<typename range_value<SinglePassRange>::type, typename range_value<RandomAccessRange>::type>));
- BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, typename range_value<RandomAccessRange>::type, typename range_value<RandomAccessRange>::type>));
 
     return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1),
         boost::begin(rng2), boost::end(rng2), pred);

Modified: trunk/boost/range/algorithm/partition.hpp
==============================================================================
--- trunk/boost/range/algorithm/partition.hpp (original)
+++ trunk/boost/range/algorithm/partition.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -34,15 +34,6 @@
     return std::partition(boost::begin(rng),boost::end(rng),pred);
 }
 
-/// \overload
-template<class ForwardRange, class UnaryPredicate>
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
-partition(const ForwardRange& rng, UnaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::partition(boost::begin(rng),boost::end(rng),pred);
-}
-
 // range_return overloads
 
 /// \overload
@@ -56,17 +47,6 @@
         pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng);
 }
 
-/// \overload
-template< range_return_value re, class ForwardRange,
- class UnaryPredicate >
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-partition(const ForwardRange& rng, UnaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return boost::range_return<const ForwardRange,re>::
- pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng);
-}
-
     } // namespace range
     using range::partition;
 } // namespace boost

Modified: trunk/boost/range/algorithm/permutation.hpp
==============================================================================
--- trunk/boost/range/algorithm/permutation.hpp (original)
+++ trunk/boost/range/algorithm/permutation.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -34,14 +34,6 @@
 }
 
 /// \overload
-template<class BidirectionalRange>
-inline bool next_permutation(const BidirectionalRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- return std::next_permutation(boost::begin(rng), boost::end(rng));
-}
-
-/// \overload
 template<class BidirectionalRange, class Compare>
 inline bool next_permutation(BidirectionalRange& rng, Compare comp_pred)
 {
@@ -50,16 +42,6 @@
                                  comp_pred);
 }
 
-/// \overload
-template<class BidirectionalRange, class Compare>
-inline bool next_permutation(const BidirectionalRange& rng,
- Compare comp_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- return std::next_permutation(boost::begin(rng), boost::end(rng),
- comp_pred);
-}
-
 /// \brief template function prev_permutation
 ///
 /// range-based version of the prev_permutation std algorithm
@@ -74,14 +56,6 @@
 }
 
 /// \overload
-template<class BidirectionalRange>
-inline bool prev_permutation(const BidirectionalRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- return std::prev_permutation(boost::begin(rng), boost::end(rng));
-}
-
-/// \overload
 template<class BidirectionalRange, class Compare>
 inline bool prev_permutation(BidirectionalRange& rng, Compare comp_pred)
 {
@@ -90,16 +64,6 @@
                                  comp_pred);
 }
 
-/// \overload
-template<class BidirectionalRange, class Compare>
-inline bool prev_permutation(const BidirectionalRange& rng,
- Compare comp_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- return std::prev_permutation(boost::begin(rng), boost::end(rng),
- comp_pred);
-}
-
     } // namespace range
     using range::next_permutation;
     using range::prev_permutation;

Modified: trunk/boost/range/algorithm/random_shuffle.hpp
==============================================================================
--- trunk/boost/range/algorithm/random_shuffle.hpp (original)
+++ trunk/boost/range/algorithm/random_shuffle.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -35,15 +35,6 @@
 }
 
 /// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::random_shuffle(boost::begin(rng),boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class RandomAccessRange, class Generator>
 inline RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen)
 {
@@ -52,15 +43,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class Generator>
-inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::random_shuffle(boost::begin(rng), boost::end(rng), gen);
- return rng;
-}
-
     } // namespace range
     using range::random_shuffle;
 } // namespace boost

Modified: trunk/boost/range/algorithm/remove.hpp
==============================================================================
--- trunk/boost/range/algorithm/remove.hpp (original)
+++ trunk/boost/range/algorithm/remove.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -34,15 +34,6 @@
     return std::remove(boost::begin(rng),boost::end(rng),val);
 }
 
-/// \overload
-template< class ForwardRange, class Value >
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
-remove(const ForwardRange& rng, const Value& val)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::remove(boost::begin(rng),boost::end(rng),val);
-}
-
 // range_return overloads
 
 /// \overload
@@ -56,17 +47,6 @@
         rng);
 }
 
-/// \overload
-template< range_return_value re, class ForwardRange, class Value >
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-remove(const ForwardRange& rng, const Value& val)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return range_return<const ForwardRange,re>::pack(
- std::remove(boost::begin(rng), boost::end(rng), val),
- rng);
-}
-
     } // namespace range
     using range::remove;
 } // namespace boost

Modified: trunk/boost/range/algorithm/remove_if.hpp
==============================================================================
--- trunk/boost/range/algorithm/remove_if.hpp (original)
+++ trunk/boost/range/algorithm/remove_if.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -35,15 +35,6 @@
     return std::remove_if(boost::begin(rng), boost::end(rng), pred);
 }
 
-/// \overload
-template< class ForwardRange, class UnaryPredicate >
-inline BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type
-remove_if(const ForwardRange& rng, UnaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return std::remove_if(boost::begin(rng),boost::end(rng),pred);
-}
-
 // range_return overloads
 
 /// \overload
@@ -57,17 +48,6 @@
         rng);
 }
 
-/// \overload
-template< range_return_value re, class ForwardRange, class UnaryPredicate >
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-remove_if(const ForwardRange& rng, UnaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return range_return<const ForwardRange,re>::pack(
- std::remove_if(boost::begin(rng), boost::end(rng), pred),
- rng);
-}
-
     } // namespace range
     using range::remove_if;
 } // namespace boost

Modified: trunk/boost/range/algorithm/replace.hpp
==============================================================================
--- trunk/boost/range/algorithm/replace.hpp (original)
+++ trunk/boost/range/algorithm/replace.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -35,17 +35,6 @@
     return rng;
 }
 
-/// \overload
-template< class ForwardRange, class Value >
-inline const ForwardRange&
-replace(const ForwardRange& rng, const Value& what,
- const Value& with_what)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- std::replace(boost::begin(rng), boost::end(rng), what, with_what);
- return rng;
-}
-
     } // namespace range
     using range::replace;
 } // namespace boost;

Modified: trunk/boost/range/algorithm/replace_if.hpp
==============================================================================
--- trunk/boost/range/algorithm/replace_if.hpp (original)
+++ trunk/boost/range/algorithm/replace_if.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -36,17 +36,6 @@
     return rng;
 }
 
-/// \overload
-template< class ForwardRange, class UnaryPredicate, class Value >
-inline const ForwardRange&
- replace_if(const ForwardRange& rng, UnaryPredicate pred,
- const Value& val)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- std::replace_if(boost::begin(rng), boost::end(rng), pred, val);
- return rng;
-}
-
     } // namespace range
     using range::replace_if;
 } // namespace boost

Modified: trunk/boost/range/algorithm/reverse.hpp
==============================================================================
--- trunk/boost/range/algorithm/reverse.hpp (original)
+++ trunk/boost/range/algorithm/reverse.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -34,15 +34,6 @@
     return rng;
 }
 
-/// \overload
-template<class BidirectionalRange>
-inline const BidirectionalRange& reverse(const BidirectionalRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- std::reverse(boost::begin(rng), boost::end(rng));
- return rng;
-}
-
     } // namespace range
     using range::reverse;
 } // namespace boost

Modified: trunk/boost/range/algorithm/reverse_copy.hpp
==============================================================================
--- trunk/boost/range/algorithm/reverse_copy.hpp (original)
+++ trunk/boost/range/algorithm/reverse_copy.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -26,15 +26,7 @@
 /// range-based version of the reverse_copy std algorithm
 ///
 /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
-template<typename BidirectionalRange, typename OutputIterator>
-inline OutputIterator reverse_copy(BidirectionalRange& rng, OutputIterator out)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
- return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
-}
-
-/// \overload
-template<typename BidirectionalRange, typename OutputIterator>
+template<class BidirectionalRange, class OutputIterator>
 inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out)
 {
     BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));

Modified: trunk/boost/range/algorithm/rotate.hpp
==============================================================================
--- trunk/boost/range/algorithm/rotate.hpp (original)
+++ trunk/boost/range/algorithm/rotate.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -25,26 +25,15 @@
 /// range-based version of the rotate std algorithm
 ///
 /// \pre Rng meets the requirements for a Forward range
-template<typename ForwardRange>
+template<class ForwardRange>
 inline ForwardRange& rotate(ForwardRange& rng,
- typename range_iterator<ForwardRange>::type middle)
+ BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type middle)
 {
     BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
     std::rotate(boost::begin(rng), middle, boost::end(rng));
     return rng;
 }
 
-/// \overload
-template<typename ForwardRange>
-inline const ForwardRange&
- rotate(const ForwardRange& rng,
- typename range_iterator<const ForwardRange>::type middle)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- std::rotate(boost::begin(rng), middle, boost::end(rng));
- return rng;
-}
-
     } // namespace range
     using range::rotate;
 } // namespace boost

Modified: trunk/boost/range/algorithm/rotate_copy.hpp
==============================================================================
--- trunk/boost/range/algorithm/rotate_copy.hpp (original)
+++ trunk/boost/range/algorithm/rotate_copy.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -28,9 +28,9 @@
     /// \pre Rng meets the requirements for a Forward range
     template<typename ForwardRange, typename OutputIterator>
     inline OutputIterator rotate_copy(
- const ForwardRange& rng,
- typename range_iterator<const ForwardRange>::type middle,
- OutputIterator target
+ const ForwardRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type middle,
+ OutputIterator target
         )
     {
         BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));

Modified: trunk/boost/range/algorithm/search.hpp
==============================================================================
--- trunk/boost/range/algorithm/search.hpp (original)
+++ trunk/boost/range/algorithm/search.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -39,17 +39,6 @@
 }
 
 /// \overload
-template< class ForwardRange1, class ForwardRange2 >
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
-search(const ForwardRange1& rng1, const ForwardRange2& rng2)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
- return std::search(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2));
-}
-
-/// \overload
 template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
 inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
 search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
@@ -60,18 +49,6 @@
                        boost::begin(rng2),boost::end(rng2),pred);
 }
 
-/// \overload
-template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
-search(const ForwardRange1& rng1, const ForwardRange2& rng2,
- BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
- return std::search(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred);
-}
-
 // range_return overloads
 
 /// \overload
@@ -88,19 +65,6 @@
 }
 
 /// \overload
-template< range_return_value re, class ForwardRange1, class ForwardRange2 >
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
-search(const ForwardRange1& rng1, const ForwardRange2& rng2)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
- return range_return<const ForwardRange1,re>::
- pack(std::search(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2)),
- rng1);
-}
-
-/// \overload
 template< range_return_value re, class ForwardRange1, class ForwardRange2,
           class BinaryPredicate >
 inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
@@ -114,21 +78,6 @@
              rng1);
 }
 
-/// \overload
-template< range_return_value re, class ForwardRange1, class ForwardRange2,
- class BinaryPredicate >
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
-search(const ForwardRange1& rng1, const ForwardRange2& rng2,
- BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
- return range_return<const ForwardRange1,re>::
- pack(std::search(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred),
- rng1);
-}
-
     } // namespace range
     using range::search;
 } // namespace boost

Modified: trunk/boost/range/algorithm/search_n.hpp
==============================================================================
--- trunk/boost/range/algorithm/search_n.hpp (original)
+++ trunk/boost/range/algorithm/search_n.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -31,8 +31,8 @@
 /// \pre Value is a model of the EqualityComparableConcept
 /// \pre ForwardRange's value type is a model of the EqualityComparableConcept
 /// \pre Object's of ForwardRange's value type can be compared for equality with Objects of type Value
-template< typename ForwardRange, typename Integer, typename Value >
-inline typename range_iterator<ForwardRange>::type
+template< class ForwardRange, class Integer, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
 search_n(ForwardRange& rng, Integer count, const Value& value)
 {
     BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
@@ -40,38 +40,13 @@
 }
 
 /// \overload
-template< typename ForwardRange, typename Integer, typename Value >
-inline typename range_iterator<const ForwardRange>::type
-search_n(const ForwardRange& rng, Integer count, const Value& value)
-{
- BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return std::search_n(boost::begin(rng), boost::end(rng), count, value);
-}
-
-/// \overload
-template< typename ForwardRange, typename Integer, class Value,
- typename BinaryPredicate >
-inline typename range_iterator<ForwardRange>::type
+template< class ForwardRange, class Integer, class Value,
+ class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
 search_n(ForwardRange& rng, Integer count, const Value& value,
          BinaryPredicate binary_pred)
 {
     BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
- typename range_value<ForwardRange>::type, const Value&>));
- return std::search_n(boost::begin(rng), boost::end(rng),
- count, value, binary_pred);
-}
-
-/// \overload
-template< typename ForwardRange, typename Integer, typename Value,
- typename BinaryPredicate >
-inline typename range_iterator<const ForwardRange>::type
-search_n(const ForwardRange& rng, Integer count, const Value& value,
- BinaryPredicate binary_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
- typename range_value<const ForwardRange>::type, const Value&>));
     return std::search_n(boost::begin(rng), boost::end(rng),
         count, value, binary_pred);
 }
@@ -79,9 +54,9 @@
 // range_return overloads
 
 /// \overload
-template< range_return_value re, typename ForwardRange, typename Integer,
- typename Value >
-inline typename range_return<ForwardRange,re>::type
+template< range_return_value re, class ForwardRange, class Integer,
+ class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
 search_n(ForwardRange& rng, Integer count, const Value& value)
 {
     BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
@@ -92,52 +67,19 @@
 }
 
 /// \overload
-template< range_return_value re, typename ForwardRange, typename Integer,
- class Value >
-inline typename range_return<const ForwardRange,re>::type
-search_n(const ForwardRange& rng, Integer count, const Value& value)
-{
- BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return range_return<const ForwardRange,re>::
- pack(std::search_n(boost::begin(rng), boost::end(rng),
- count, value),
- rng);
-}
-
-/// \overload
-template< range_return_value re, typename ForwardRange, typename Integer,
- typename Value, typename BinaryPredicate >
-inline typename range_return<ForwardRange,re>::type
+template< range_return_value re, class ForwardRange, class Integer,
+ class Value, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
 search_n(ForwardRange& rng, Integer count, const Value& value,
          BinaryPredicate pred)
 {
     BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
- typename range_value<ForwardRange>::type,
- const Value&>));
     return range_return<ForwardRange,re>::
         pack(std::search_n(boost::begin(rng), boost::end(rng),
                            count, value, pred),
              rng);
 }
 
-/// \overload
-template< range_return_value re, typename ForwardRange, typename Integer,
- typename Value, typename BinaryPredicate >
-inline typename range_return<const ForwardRange,re>::type
-search_n(const ForwardRange& rng, Integer count, const Value& value,
- BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
- typename range_value<const ForwardRange>::type,
- const Value&>));
- return range_return<const ForwardRange,re>::
- pack(std::search_n(boost::begin(rng), boost::end(rng),
- count, value, pred),
- rng);
-}
-
     } // namespace range
     using range::search_n;
 } // namespace boost

Modified: trunk/boost/range/algorithm/sort.hpp
==============================================================================
--- trunk/boost/range/algorithm/sort.hpp (original)
+++ trunk/boost/range/algorithm/sort.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -35,15 +35,6 @@
 }
 
 /// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& sort(const RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::sort(boost::begin(rng),boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class RandomAccessRange, class BinaryPredicate>
 inline RandomAccessRange& sort(RandomAccessRange& rng, BinaryPredicate pred)
 {
@@ -52,15 +43,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class BinaryPredicate>
-inline const RandomAccessRange& sort(const RandomAccessRange& rng, BinaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::sort(boost::begin(rng), boost::end(rng), pred);
- return rng;
-}
-
     } // namespace range
     using range::sort;
 } // namespace boost

Modified: trunk/boost/range/algorithm/stable_partition.hpp
==============================================================================
--- trunk/boost/range/algorithm/stable_partition.hpp (original)
+++ trunk/boost/range/algorithm/stable_partition.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -35,15 +35,6 @@
     return std::stable_partition(boost::begin(rng), boost::end(rng), pred);
 }
 
-/// \overload
-template<class BidirectionalRange, class UnaryPredicate>
-inline BOOST_DEDUCED_TYPENAME range_iterator<const BidirectionalRange>::type
-stable_partition(const BidirectionalRange& rng, UnaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- return std::stable_partition(boost::begin(rng),boost::end(rng),pred);
-}
-
 // range_return overloads
 template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
 inline BOOST_DEDUCED_TYPENAME range_return<BidirectionalRange,re>::type
@@ -55,17 +46,6 @@
         rng);
 }
 
-/// \overload
-template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
-inline BOOST_DEDUCED_TYPENAME range_return<const BidirectionalRange,re>::type
-stable_partition(const BidirectionalRange& rng, UnaryPredicate pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
- return range_return<const BidirectionalRange,re>::pack(
- std::stable_partition(boost::begin(rng),boost::end(rng),pred),
- rng);
-}
-
     } // namespace range
     using range::stable_partition;
 } // namespace boost

Modified: trunk/boost/range/algorithm/stable_sort.hpp
==============================================================================
--- trunk/boost/range/algorithm/stable_sort.hpp (original)
+++ trunk/boost/range/algorithm/stable_sort.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -35,15 +35,6 @@
 }
 
 /// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::stable_sort(boost::begin(rng), boost::end(rng));
- return rng;
-}
-
-/// \overload
 template<class RandomAccessRange, class BinaryPredicate>
 inline RandomAccessRange& stable_sort(RandomAccessRange& rng, BinaryPredicate sort_pred)
 {
@@ -52,15 +43,6 @@
     return rng;
 }
 
-/// \overload
-template<class RandomAccessRange, class BinaryPredicate>
-inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng, BinaryPredicate sort_pred)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred);
- return rng;
-}
-
     } // namespace range
     using range::stable_sort;
 } // namespace boost

Modified: trunk/boost/range/algorithm/swap_ranges.hpp
==============================================================================
--- trunk/boost/range/algorithm/swap_ranges.hpp (original)
+++ trunk/boost/range/algorithm/swap_ranges.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -22,7 +22,7 @@
 {
     namespace range_detail
     {
- template<typename Iterator1, typename Iterator2>
+ template<class Iterator1, class Iterator2>
         void swap_ranges_impl(Iterator1 it1, Iterator1 last1,
                               Iterator2 it2, Iterator2 last2,
                               single_pass_traversal_tag,
@@ -36,7 +36,7 @@
             }
         }
 
- template<typename Iterator1, typename Iterator2>
+ template<class Iterator1, class Iterator2>
         void swap_ranges_impl(Iterator1 it1, Iterator1 last1,
                               Iterator2 it2, Iterator2 last2,
                               random_access_traversal_tag,
@@ -47,13 +47,13 @@
             std::swap_ranges(it1, last1, it2);
         }
 
- template<typename Iterator1, typename Iterator2>
+ template<class Iterator1, class Iterator2>
         void swap_ranges_impl(Iterator1 first1, Iterator1 last1,
                               Iterator2 first2, Iterator2 last2)
         {
             swap_ranges_impl(first1, last1, first2, last2,
- typename iterator_traversal<Iterator1>::type(),
- typename iterator_traversal<Iterator2>::type());
+ BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator1>::type(),
+ BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator2>::type());
         }
     } // namespace range_detail
 
@@ -66,7 +66,7 @@
 ///
 /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
 /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
-template< typename SinglePassRange1, typename SinglePassRange2 >
+template< class SinglePassRange1, class SinglePassRange2 >
 inline SinglePassRange2&
 swap_ranges(SinglePassRange1& range1, SinglePassRange2& range2)
 {

Modified: trunk/boost/range/algorithm/unique.hpp
==============================================================================
--- trunk/boost/range/algorithm/unique.hpp (original)
+++ trunk/boost/range/algorithm/unique.hpp 2010-04-14 18:16:11 EDT (Wed, 14 Apr 2010)
@@ -37,16 +37,6 @@
 }
 
 /// \overload
-template< range_return_value re, class ForwardRange >
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-unique( const ForwardRange& rng )
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return range_return<const ForwardRange,re>::
- pack( std::unique( boost::begin(rng),
- boost::end(rng)), rng );
-}
-/// \overload
 template< range_return_value re, class ForwardRange, class BinaryPredicate >
 inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
 unique( ForwardRange& rng, BinaryPredicate pred )
@@ -56,16 +46,6 @@
         pack(std::unique(boost::begin(rng), boost::end(rng), pred),
              rng);
 }
-/// \overload
-template< range_return_value re, class ForwardRange, class BinaryPredicate >
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
-unique( const ForwardRange& rng, BinaryPredicate pred )
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return range_return<const ForwardRange,re>::
- pack(std::unique(boost::begin(rng), boost::end(rng), pred),
- rng);
-}
 
 /// \overload
 template< class ForwardRange >
@@ -76,14 +56,6 @@
     return ::boost::range::unique<return_begin_found>(rng);
 }
 /// \overload
-template< class ForwardRange >
-inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange, return_begin_found>::type
-unique( const ForwardRange& rng )
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return ::boost::range::unique<return_begin_found>(rng);
-}
-/// \overload
 template< class ForwardRange, class BinaryPredicate >
 inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type
 unique( ForwardRange& rng, BinaryPredicate pred )
@@ -91,14 +63,6 @@
     BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
     return ::boost::range::unique<return_begin_found>(rng);
 }
-/// \overload
-template< class ForwardRange, class BinaryPredicate >
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
-unique( const ForwardRange& rng, BinaryPredicate pred )
-{
- BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
- return ::boost::range::unique<return_begin_found>(rng, pred);
-}
 
     } // namespace range
     using range::unique;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk