Boost logo

Boost-Commit :

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


Author: neilgroves
Date: 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
New Revision: 61023
URL: http://svn.boost.org/trac/boost/changeset/61023

Log:
Boost.Range algorithms are now in the boost::range namespace and brought into boost by the appropriate using statement. This allows better interoperation with Boost.Algorithm since errors only occur when the use calls similarly named ambiguous functions. In this event the user can disambiguate by using algorithm::xxx() or range::xxx(). This iteration also updates the concept assert code in the range algorithms.
Text files modified:
   trunk/boost/range/algorithm/adjacent_find.hpp | 188 +++++++++++----------
   trunk/boost/range/algorithm/binary_search.hpp | 44 ++--
   trunk/boost/range/algorithm/copy.hpp | 28 ++-
   trunk/boost/range/algorithm/copy_backward.hpp | 34 ++-
   trunk/boost/range/algorithm/count.hpp | 44 ++--
   trunk/boost/range/algorithm/count_if.hpp | 46 +++--
   trunk/boost/range/algorithm/equal.hpp | 68 ++++---
   trunk/boost/range/algorithm/equal_range.hpp | 108 ++++++------
   trunk/boost/range/algorithm/fill.hpp | 28 ++-
   trunk/boost/range/algorithm/fill_n.hpp | 30 ++-
   trunk/boost/range/algorithm/find.hpp | 84 +++++----
   trunk/boost/range/algorithm/find_end.hpp | 212 ++++++++++++------------
   trunk/boost/range/algorithm/find_first_of.hpp | 213 ++++++++++++------------
   trunk/boost/range/algorithm/find_if.hpp | 88 +++++-----
   trunk/boost/range/algorithm/for_each.hpp | 42 ++--
   trunk/boost/range/algorithm/generate.hpp | 45 ++--
   trunk/boost/range/algorithm/heap_algorithm.hpp | 301 ++++++++++++++++++-----------------
   trunk/boost/range/algorithm/inplace_merge.hpp | 96 ++++++-----
   trunk/boost/range/algorithm/lexicographical_compare.hpp | 62 ++++---
   trunk/boost/range/algorithm/lower_bound.hpp | 156 +++++++++--------
   trunk/boost/range/algorithm/max_element.hpp | 170 ++++++++++---------
   trunk/boost/range/algorithm/merge.hpp | 68 ++++---
   trunk/boost/range/algorithm/min_element.hpp | 170 ++++++++++---------
   trunk/boost/range/algorithm/mismatch.hpp | 233 ++++++++++++++-------------
   trunk/boost/range/algorithm/nth_element.hpp | 88 +++++----
   trunk/boost/range/algorithm/partial_sort.hpp | 90 +++++-----
   trunk/boost/range/algorithm/partial_sort_copy.hpp | 74 ++++----
   trunk/boost/range/algorithm/partition.hpp | 88 +++++----
   trunk/boost/range/algorithm/permutation.hpp | 163 +++++++++----------
   trunk/boost/range/algorithm/random_shuffle.hpp | 84 +++++----
   trunk/boost/range/algorithm/remove.hpp | 90 +++++-----
   trunk/boost/range/algorithm/remove_copy.hpp | 36 ++-
   trunk/boost/range/algorithm/remove_if.hpp | 89 +++++-----
   trunk/boost/range/algorithm/replace.hpp | 52 +++--
   trunk/boost/range/algorithm/replace_copy.hpp | 32 ++-
   trunk/boost/range/algorithm/replace_copy_if.hpp | 40 ++--
   trunk/boost/range/algorithm/replace_if.hpp | 53 +++--
   trunk/boost/range/algorithm/reverse.hpp | 44 ++--
   trunk/boost/range/algorithm/reverse_copy.hpp | 40 ++--
   trunk/boost/range/algorithm/rotate.hpp | 50 +++--
   trunk/boost/range/algorithm/rotate_copy.hpp | 10
   trunk/boost/range/algorithm/search.hpp | 211 ++++++++++++------------
   trunk/boost/range/algorithm/search_n.hpp | 227 +++++++++++++-------------
   trunk/boost/range/algorithm/set_algorithm.hpp | 336 ++++++++++++++++++++-------------------
   trunk/boost/range/algorithm/sort.hpp | 81 +++++----
   trunk/boost/range/algorithm/stable_partition.hpp | 87 +++++----
   trunk/boost/range/algorithm/stable_sort.hpp | 84 +++++----
   trunk/boost/range/algorithm/swap_ranges.hpp | 38 ++-
   trunk/boost/range/algorithm/transform.hpp | 84 +++++----
   trunk/boost/range/algorithm/unique.hpp | 160 +++++++++---------
   trunk/boost/range/algorithm/unique_copy.hpp | 50 +++--
   trunk/boost/range/algorithm/upper_bound.hpp | 160 +++++++++---------
   52 files changed, 2752 insertions(+), 2447 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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -19,101 +19,107 @@
 
 namespace boost
 {
- /// \brief template function adjacent_find
- ///
- /// range-based version of the adjacent_find std algorithm
- ///
- /// \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
- adjacent_find(ForwardRange & rng)
+ namespace range
     {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return std::adjacent_find(boost::begin(rng),boost::end(rng));
- }
-
- /// \overload
- template< typename ForwardRange >
- inline typename range_iterator<const ForwardRange>::type
- adjacent_find(const ForwardRange& rng)
- {
- BOOST_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
- adjacent_find(ForwardRange & rng, BinaryPredicate pred)
- {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_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_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_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);
- }
+
+/// \brief template function adjacent_find
+///
+/// range-based version of the adjacent_find std algorithm
+///
+/// \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
+adjacent_find(ForwardRange & rng)
+{
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return std::adjacent_find(boost::begin(rng),boost::end(rng));
+}
+
+/// \overload
+template< typename ForwardRange >
+inline typename range_iterator<const ForwardRange>::type
+adjacent_find(const ForwardRange& rng)
+{
+ BOOST_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
+adjacent_find(ForwardRange & rng, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_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_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_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
- adjacent_find(ForwardRange & rng)
- {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return range_return<ForwardRange,re>::
- pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
- rng);
- }
-
- /// \overload
- template< range_return_value re, typename ForwardRange >
- inline typename range_return<const ForwardRange,re>::type
- adjacent_find(const ForwardRange& rng)
- {
- BOOST_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
- adjacent_find(ForwardRange& rng, BinaryPredicate pred)
- {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_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_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return range_return<const ForwardRange,re>::
- pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
- rng);
- }
+/// \overload
+template< range_return_value re, typename ForwardRange >
+inline typename range_return<ForwardRange,re>::type
+adjacent_find(ForwardRange & rng)
+{
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return range_return<ForwardRange,re>::
+ pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
+ rng);
+}
+
+/// \overload
+template< range_return_value re, typename ForwardRange >
+inline typename range_return<const ForwardRange,re>::type
+adjacent_find(const ForwardRange& rng)
+{
+ BOOST_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
+adjacent_find(ForwardRange& rng, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_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_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/binary_search.hpp
==============================================================================
--- trunk/boost/range/algorithm/binary_search.hpp (original)
+++ trunk/boost/range/algorithm/binary_search.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,27 +17,33 @@
 
 namespace boost
 {
- /// \brief template function binary_search
- ///
- /// range-based version of the binary_search std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class ForwardRange, class Value>
- inline bool binary_search(const ForwardRange& rng, const Value& val)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::binary_search(boost::begin(rng), boost::end(rng), val);
- }
 
- /// \overload
- template<class ForwardRange, class Value, class BinaryPredicate>
- inline bool binary_search(const ForwardRange& rng, const Value& val,
- BinaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::binary_search(boost::begin(rng), boost::end(rng), val, pred);
- }
+/// \brief template function binary_search
+///
+/// range-based version of the binary_search std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class ForwardRange, class Value>
+inline bool binary_search(const ForwardRange& rng, const Value& val)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::binary_search(boost::begin(rng), boost::end(rng), val);
+}
+
+/// \overload
+template<class ForwardRange, class Value, class BinaryPredicate>
+inline bool binary_search(const ForwardRange& rng, const Value& val,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::binary_search(boost::begin(rng), boost::end(rng), val, pred);
 }
 
+ } // namespace range
+ using range::binary_search;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/copy.hpp
==============================================================================
--- trunk/boost/range/algorithm/copy.hpp (original)
+++ trunk/boost/range/algorithm/copy.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,18 +18,24 @@
 
 namespace boost
 {
- /// \brief template function copy
- ///
- /// range-based version of the copy std algorithm
- ///
- /// \pre SinglePassRange is a model of the SinglePassRangeConcept
- /// \pre OutputIterator is a model of the OutputIteratorConcept
- template< class SinglePassRange, class OutputIterator >
- inline OutputIterator copy(const SinglePassRange& rng, OutputIterator out)
+ namespace range
     {
- //BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
- return std::copy(boost::begin(rng),boost::end(rng),out);
- }
+
+/// \brief template function copy
+///
+/// range-based version of the copy std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre OutputIterator is a model of the OutputIteratorConcept
+template< class SinglePassRange, class OutputIterator >
+inline OutputIterator copy(const SinglePassRange& rng, OutputIterator out)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+ return std::copy(boost::begin(rng),boost::end(rng),out);
 }
 
+ } // namespace range
+ using range::copy;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/copy_backward.hpp
==============================================================================
--- trunk/boost/range/algorithm/copy_backward.hpp (original)
+++ trunk/boost/range/algorithm/copy_backward.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,21 +17,27 @@
 
 namespace boost
 {
- /// \brief template function copy_backward
- ///
- /// range-based version of the copy_backwards std algorithm
- ///
- /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
- /// \pre BidirectionalTraversalWriteableIterator is a model of the BidirectionalIteratorConcept
- /// \pre BidirectionalTraversalWriteableIterator is a model of the WriteableIteratorConcept
- template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator >
- inline BidirectionalTraversalWriteableIterator
- copy_backward(const BidirectionalRange& rng,
- BidirectionalTraversalWriteableIterator out)
+ namespace range
     {
- boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- return std::copy_backward(boost::begin(rng), boost::end(rng), out);
- }
+
+/// \brief template function copy_backward
+///
+/// range-based version of the copy_backwards std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre BidirectionalTraversalWriteableIterator is a model of the BidirectionalIteratorConcept
+/// \pre BidirectionalTraversalWriteableIterator is a model of the WriteableIteratorConcept
+template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator >
+inline BidirectionalTraversalWriteableIterator
+copy_backward(const BidirectionalRange& rng,
+ BidirectionalTraversalWriteableIterator out)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ return std::copy_backward(boost::begin(rng), boost::end(rng), out);
 }
 
+ } // namespace range
+ using range::copy_backward;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/count.hpp
==============================================================================
--- trunk/boost/range/algorithm/count.hpp (original)
+++ trunk/boost/range/algorithm/count.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,27 +18,33 @@
 
 namespace boost
 {
- /// \brief template function count
- ///
- /// range-based version of the count std algorithm
- ///
- /// \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)
+ namespace range
     {
- boost::function_requires< 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)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::count(boost::begin(rng), boost::end(rng), val);
- }
+/// \brief template function count
+///
+/// range-based version of the count std algorithm
+///
+/// \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_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)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return std::count(boost::begin(rng), boost::end(rng), val);
 }
 
+ } // namespace range
+ using range::count;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,28 +18,34 @@
 
 namespace boost
 {
- /// \brief template function count_if
- ///
- /// range-based version of the count_if std algorithm
- ///
- /// \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)
+ namespace range
     {
- boost::function_requires< 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)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::count_if(boost::begin(rng), boost::end(rng), pred);
- }
+/// \brief template function count_if
+///
+/// range-based version of the count_if std algorithm
+///
+/// \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_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)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return std::count_if(boost::begin(rng), boost::end(rng), pred);
 }
 
+ } // namespace range
+ using range::count_if;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/equal.hpp
==============================================================================
--- trunk/boost/range/algorithm/equal.hpp (original)
+++ trunk/boost/range/algorithm/equal.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -143,40 +143,46 @@
 
             return equal_impl(first1, last1, first2, last2, pred, tag1, tag2);
         }
-
- }
 
- /// \brief template function equal
- ///
- /// range-based version of the equal std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template< class SinglePassRange1, class SinglePassRange2 >
- inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 )
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ } // namespace range_detail
 
- return range_detail::equal(
- boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2) );
- }
-
- /// \overload
- template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
- inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
- BinaryPredicate pred )
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
 
- return range_detail::equal(
- boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2),
- pred);
- }
-}
+ /// \brief template function equal
+ ///
+ /// range-based version of the equal std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 )
+ {
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+ return ::boost::range_detail::equal(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2) );
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+ inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+ BinaryPredicate pred )
+ {
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+ return ::boost::range_detail::equal(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2),
+ pred);
+ }
+
+ } // namespace range
+ using range::equal;
+} // namespace boost
 
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,58 +17,64 @@
 
 namespace boost
 {
- /// \brief template function equal_range
- ///
- /// range-based version of the equal_range std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre SortPredicate is a model of the BinaryPredicateConcept
- template<class ForwardRange, class Value>
- inline std::pair<
- BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type,
- BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
- >
- equal_range(ForwardRange& rng, const Value& val)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::equal_range(boost::begin(rng), boost::end(rng), val);
- }
-
- /// \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::function_requires< ForwardRangeConcept<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,
- BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
- >
- equal_range(ForwardRange& rng, const Value& val, SortPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::equal_range(boost::begin(rng), boost::end(rng), val, pred);
- }
+
+/// \brief template function equal_range
+///
+/// range-based version of the equal_range std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre SortPredicate is a model of the BinaryPredicateConcept
+template<class ForwardRange, class Value>
+inline std::pair<
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+ >
+equal_range(ForwardRange& rng, const Value& val)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::equal_range(boost::begin(rng), boost::end(rng), val);
+}
+
+/// \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_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,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+ >
+equal_range(ForwardRange& rng, const Value& val, SortPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ 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_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/fill.hpp
==============================================================================
--- trunk/boost/range/algorithm/fill.hpp (original)
+++ trunk/boost/range/algorithm/fill.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,18 +17,24 @@
 
 namespace boost
 {
- /// \brief template function fill
- ///
- /// range-based version of the fill std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- template< class ForwardRange, class Value >
- inline ForwardRange& fill(ForwardRange& rng, const Value& val)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- std::fill(boost::begin(rng), boost::end(rng), val);
- return rng;
- }
+
+/// \brief template function fill
+///
+/// range-based version of the fill std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline ForwardRange& fill(ForwardRange& rng, const Value& val)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ std::fill(boost::begin(rng), boost::end(rng), val);
+ return rng;
+}
+
+ } // namespace range
+ using range::fill;
 }
 
 #endif // include guard

Modified: trunk/boost/range/algorithm/fill_n.hpp
==============================================================================
--- trunk/boost/range/algorithm/fill_n.hpp (original)
+++ trunk/boost/range/algorithm/fill_n.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,19 +18,25 @@
 
 namespace boost
 {
- /// \brief template function fill_n
- ///
- /// range-based version of the fill_n std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- template< class ForwardRange, class Size, class Value >
- inline ForwardRange& fill_n(ForwardRange& rng, Size n, const Value& val)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- BOOST_ASSERT( static_cast<Size>(std::distance(boost::begin(rng), boost::end(rng))) >= n );
- std::fill_n(boost::begin(rng), n, val);
- return rng;
- }
+
+/// \brief template function fill_n
+///
+/// range-based version of the fill_n std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Size, class Value >
+inline ForwardRange& fill_n(ForwardRange& rng, Size n, const Value& val)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ BOOST_ASSERT( static_cast<Size>(std::distance(boost::begin(rng), boost::end(rng))) >= n );
+ std::fill_n(boost::begin(rng), n, val);
+ return rng;
 }
 
+ } // namespace range
+ using range::fill_n;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/find.hpp
==============================================================================
--- trunk/boost/range/algorithm/find.hpp (original)
+++ trunk/boost/range/algorithm/find.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,49 +18,55 @@
 
 namespace boost
 {
- /// \brief template function find
- ///
- /// range-based version of the find std algorithm
- ///
- /// \pre SinglePassRange is a model of the SinglePassRangeConcept
- template< class SinglePassRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type
- find( SinglePassRange& rng, const Value& val )
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::find(boost::begin(rng), boost::end(rng), val);
- }
- /// \overload
- template< class SinglePassRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type
- find( const SinglePassRange& rng, const Value& val )
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::find(boost::begin(rng), boost::end(rng), val);
- }
+
+/// \brief template function find
+///
+/// range-based version of the find std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+template< class SinglePassRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type
+find( SinglePassRange& rng, const Value& val )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+ return std::find(boost::begin(rng), boost::end(rng), val);
+}
+/// \overload
+template< class SinglePassRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type
+find( const SinglePassRange& rng, const Value& val )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return std::find(boost::begin(rng), boost::end(rng), val);
+}
 
 // range_return overloads
 
- /// \overload
- template< range_return_value re, class SinglePassRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type
- find( SinglePassRange& rng, const Value& val )
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return range_return<SinglePassRange,re>::
- pack(std::find(boost::begin(rng), boost::end(rng), val),
- rng);
- }
- /// \overload
- template< range_return_value re, class SinglePassRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange,re>::type
- find( const SinglePassRange& rng, const Value& val )
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return range_return<const SinglePassRange,re>::
- pack(std::find(boost::begin(rng), boost::end(rng), val),
- rng);
- }
+/// \overload
+template< range_return_value re, class SinglePassRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type
+find( SinglePassRange& rng, const Value& val )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+ return range_return<SinglePassRange,re>::
+ pack(std::find(boost::begin(rng), boost::end(rng), val),
+ rng);
+}
+/// \overload
+template< range_return_value re, class SinglePassRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange,re>::type
+find( const SinglePassRange& rng, const Value& val )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return range_return<const SinglePassRange,re>::
+ pack(std::find(boost::begin(rng), boost::end(rng), val),
+ rng);
+}
+
+ } // namespace range
+ using range::find;
 }
 
 #endif // include guard

Modified: trunk/boost/range/algorithm/find_end.hpp
==============================================================================
--- trunk/boost/range/algorithm/find_end.hpp (original)
+++ trunk/boost/range/algorithm/find_end.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,119 +18,125 @@
 
 namespace boost
 {
- /// \brief template function find_end
- ///
- /// range-based version of the find_end std algorithm
- ///
- /// \pre ForwardRange1 is a model of the ForwardRangeConcept
- /// \pre ForwardRange2 is a model of the ForwardRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template< class ForwardRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_iterator< ForwardRange1 >::type
- find_end(ForwardRange1 & rng1, ForwardRange2 const & rng2)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
 
- return std::find_end(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2));
- }
-
- /// \overload
- template< class ForwardRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
- find_end(ForwardRange1 const & rng1, ForwardRange2 const & rng2)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+/// \brief template function find_end
+///
+/// range-based version of the find_end std algorithm
+///
+/// \pre ForwardRange1 is a model of the ForwardRangeConcept
+/// \pre ForwardRange2 is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator< ForwardRange1 >::type
+find_end(ForwardRange1 & rng1, ForwardRange2 const & rng2)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
 
- return std::find_end(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
- find_end(ForwardRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return std::find_end(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+}
 
- return std::find_end(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred);
- }
-
- /// \overload
- template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
- find_end(ForwardRange1 const & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+/// \overload
+template< class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+find_end(ForwardRange1 const & rng1, ForwardRange2 const & rng2)
+{
 
- return std::find_end(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred);
- }
-
- /// \overload
- template< range_return_value re, class ForwardRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
- find_end(ForwardRange1& rng1, const ForwardRange2& rng2)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
 
- return range_return<ForwardRange1,re>::
- pack(std::find_end(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2)),
- rng1);
- }
-
- /// \overload
- template< range_return_value re, class ForwardRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
- find_end(const ForwardRange1& rng1, const ForwardRange2& rng2)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return std::find_end(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+}
 
- return range_return<const ForwardRange1,re>::
- pack(std::find_end(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
- find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+/// \overload
+template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
+find_end(ForwardRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
 
- return range_return<ForwardRange1,re>::
- pack(std::find_end(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), pred),
- rng1);
- }
-
- /// \overload
- template< range_return_value re, class ForwardRange1, class ForwardRange2,
- class BinaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
- find_end(const ForwardRange1& rng1, const ForwardRange2& rng2,
- BinaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return std::find_end(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+}
 
- return range_return<const ForwardRange1,re>::
- pack(std::find_end(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), pred),
- rng1);
- }
+/// \overload
+template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+find_end(ForwardRange1 const & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
 
+ return std::find_end(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
 }
 
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+find_end(ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+ return range_return<ForwardRange1,re>::
+ pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2)),
+ rng1);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+find_end(const ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+ return range_return<const ForwardRange1,re>::
+ pack(std::find_end(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
+find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+ return range_return<ForwardRange1,re>::
+ pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred),
+ rng1);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2,
+ class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+find_end(const ForwardRange1& rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+ return range_return<const ForwardRange1,re>::
+ pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred),
+ rng1);
+}
+
+ } // namespace range
+ using range::find_end;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/find_first_of.hpp
==============================================================================
--- trunk/boost/range/algorithm/find_first_of.hpp (original)
+++ trunk/boost/range/algorithm/find_first_of.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,122 +18,127 @@
 
 namespace boost
 {
- /// \brief template function find_first_of
- ///
- /// range-based version of the find_first_of std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre ForwardRange2 is a model of the ForwardRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template< class SinglePassRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
- find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2)
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
 
- return std::find_first_of(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2));
- }
-
- /// \overload
- template< class SinglePassRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type
- find_first_of(SinglePassRange1 const & rng1, ForwardRange2 const & rng2)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+/// \brief template function find_first_of
+///
+/// range-based version of the find_first_of std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre ForwardRange2 is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class SinglePassRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
+find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
 
- return std::find_first_of(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2));
- }
-
- /// \overload
- template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
- find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+}
 
- return std::find_first_of(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred);
- }
-
- /// \overload
- template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type
- find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+/// \overload
+template< class SinglePassRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type
+find_first_of(SinglePassRange1 const & rng1, ForwardRange2 const & rng2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+ return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+}
 
- return std::find_first_of(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred);
- }
+/// \overload
+template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
+find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+ return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+}
+
+/// \overload
+template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type
+find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+ return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+}
 
 // range return overloads
- /// \overload
- template< range_return_value re, class SinglePassRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
- find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+/// \overload
+template< range_return_value re, class SinglePassRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
+find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
 
- return range_return<SinglePassRange1,re>::
- pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2)),
- rng1);
- }
-
- /// \overload
- template< range_return_value re, class SinglePassRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange1,re>::type
- find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return range_return<SinglePassRange1,re>::
+ pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2)),
+ rng1);
+}
 
- return range_return<const SinglePassRange1,re>::
- pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2)),
- rng1);
- }
-
- /// \overload
- template< range_return_value re, class SinglePassRange1, class ForwardRange2,
- class BinaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
- find_first_of(SinglePassRange1 & rng1, const ForwardRange2& rng2,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+/// \overload
+template< range_return_value re, class SinglePassRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange1,re>::type
+find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
 
- return range_return<SinglePassRange1,re>::
- pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), pred),
- rng1);
- }
-
- /// \overload
- template< range_return_value re, class SinglePassRange1, class ForwardRange2,
- class BinaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange1,re>::type
- find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return range_return<const SinglePassRange1,re>::
+ pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2)),
+ rng1);
+}
 
- return range_return<const SinglePassRange1,re>::
- pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2),pred),
- rng1);
- }
+/// \overload
+template< range_return_value re, class SinglePassRange1, class ForwardRange2,
+ class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
+find_first_of(SinglePassRange1 & rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
 
+ return range_return<SinglePassRange1,re>::
+ pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred),
+ rng1);
 }
 
+/// \overload
+template< range_return_value re, class SinglePassRange1, class ForwardRange2,
+ class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange1,re>::type
+find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange2> ));
+
+ return range_return<const SinglePassRange1,re>::
+ pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2),pred),
+ rng1);
+}
+
+ } // namespace range
+ using range::find_first_of;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/find_if.hpp
==============================================================================
--- trunk/boost/range/algorithm/find_if.hpp (original)
+++ trunk/boost/range/algorithm/find_if.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,52 +18,56 @@
 
 namespace boost
 {
- /// \brief template function find_if
- ///
- /// range-based version of the find_if std algorithm
- ///
- /// \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 range_iterator<SinglePassRange>::type
- find_if( SinglePassRange& rng, UnaryPredicate pred )
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::find_if(boost::begin(rng), boost::end(rng), pred);
- }
- /// \overload
- template< class SinglePassRange, class UnaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type
- find_if( const SinglePassRange& rng, UnaryPredicate pred )
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::find_if(boost::begin(rng), boost::end(rng), pred);
- }
-
-// range_return overloads
 
- /// \overload
- template< range_return_value re, class SinglePassRange, class UnaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type
- find_if( SinglePassRange& rng, UnaryPredicate pred )
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return range_return<SinglePassRange,re>::
- pack(std::find_if(boost::begin(rng), boost::end(rng), pred),
- rng);
- }
- /// \overload
- template< range_return_value re, class SinglePassRange, class UnaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange,re>::type
- find_if( const SinglePassRange& rng, UnaryPredicate pred )
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return range_return<const SinglePassRange,re>::
- pack(std::find_if(boost::begin(rng), boost::end(rng), pred),
- rng);
- }
+/// \brief template function find_if
+///
+/// range-based version of the find_if std algorithm
+///
+/// \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 range_iterator<SinglePassRange>::type
+find_if( SinglePassRange& rng, UnaryPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+ return std::find_if(boost::begin(rng), boost::end(rng), pred);
+}
+/// \overload
+template< class SinglePassRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type
+find_if( const SinglePassRange& rng, UnaryPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return std::find_if(boost::begin(rng), boost::end(rng), pred);
+}
 
+// range_return overloads
 
+/// \overload
+template< range_return_value re, class SinglePassRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type
+find_if( SinglePassRange& rng, UnaryPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+ return range_return<SinglePassRange,re>::
+ pack(std::find_if(boost::begin(rng), boost::end(rng), pred),
+ rng);
 }
+/// \overload
+template< range_return_value re, class SinglePassRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange,re>::type
+find_if( const SinglePassRange& rng, UnaryPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return range_return<const SinglePassRange,re>::
+ pack(std::find_if(boost::begin(rng), boost::end(rng), pred),
+ rng);
+}
+
+ } // namespace range
+ using range::find_if;
+} // namespace boost
 
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,26 +17,32 @@
 
 namespace boost
 {
- /// \brief template function for_each
- ///
- /// range-based version of the for_each std algorithm
- ///
- /// \pre SinglePassRange is a model of the SinglePassRangeConcept
- /// \pre UnaryFunction is a model of the UnaryFunctionConcept
- template< class SinglePassRange, class UnaryFunction >
- inline UnaryFunction for_each(SinglePassRange & rng, UnaryFunction fun)
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept< SinglePassRange > >();
- return std::for_each(boost::begin(rng),boost::end(rng),fun);
- }
 
- /// \overload
- template< class SinglePassRange, class UnaryFunction >
- inline UnaryFunction for_each(SinglePassRange const & rng, UnaryFunction fun)
- {
- boost::function_requires< SinglePassRangeConcept< SinglePassRange > >();
- return std::for_each(boost::begin(rng),boost::end(rng),fun);
- }
+/// \brief template function for_each
+///
+/// range-based version of the for_each std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre UnaryFunction is a model of the UnaryFunctionConcept
+template< class SinglePassRange, class UnaryFunction >
+inline UnaryFunction for_each(SinglePassRange & rng, UnaryFunction fun)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+ return std::for_each(boost::begin(rng),boost::end(rng),fun);
+}
+
+/// \overload
+template< class SinglePassRange, class UnaryFunction >
+inline UnaryFunction for_each(SinglePassRange const & rng, UnaryFunction fun)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return std::for_each(boost::begin(rng),boost::end(rng),fun);
+}
+
+ } // namespace range
+ using range::for_each;
 } // namespace boost
 
 #endif // include guard

Modified: trunk/boost/range/algorithm/generate.hpp
==============================================================================
--- trunk/boost/range/algorithm/generate.hpp (original)
+++ trunk/boost/range/algorithm/generate.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,28 +17,33 @@
 
 namespace boost
 {
- /// \brief template function generate
- ///
- /// range-based version of the generate std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre Generator is a model of the UnaryFunctionConcept
- template< class ForwardRange, class Generator >
- inline ForwardRange& generate( ForwardRange& rng, Generator gen )
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- std::generate(boost::begin(rng), boost::end(rng), gen);
- return rng;
- }
+/// \brief template function generate
+///
+/// range-based version of the generate std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre Generator is a model of the UnaryFunctionConcept
+template< class ForwardRange, class Generator >
+inline ForwardRange& generate( ForwardRange& rng, Generator gen )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ std::generate(boost::begin(rng), boost::end(rng), gen);
+ return rng;
+}
 
- /// \overload
- template< class ForwardRange, class Generator >
- inline const ForwardRange& generate(const ForwardRange& rng, Generator gen)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- std::generate(boost::begin(rng), boost::end(rng), gen);
- return rng;
- }
+/// \overload
+template< class ForwardRange, class Generator >
+inline const ForwardRange& generate(const ForwardRange& rng, Generator gen)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ std::generate(boost::begin(rng), boost::end(rng), gen);
+ return rng;
 }
 
+ } // namespace range
+ using range::generate;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,153 +17,162 @@
 
 namespace boost
 {
- /// \brief template function push_heap
- ///
- /// range-based version of the push_heap std algorithm
- ///
- /// \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)
+ namespace range
     {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::push_heap(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange>
- inline void push_heap(const RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::push_heap(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange, class Compare>
- inline void push_heap(RandomAccessRange& rng, Compare comp_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
- }
-
- /// \overload
- template<class RandomAccessRange, class Compare>
- inline void push_heap(const RandomAccessRange& rng, Compare comp_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
- }
-
- /// \brief template function pop_heap
- ///
- /// range-based version of the pop_heap std algorithm
- ///
- /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
- /// \pre Compare is a model of the BinaryPredicateConcept
- template<class RandomAccessRange>
- inline void pop_heap(RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::pop_heap(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange>
- inline void pop_heap(const RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::pop_heap(boost::begin(rng),boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange, class Compare>
- inline void pop_heap(RandomAccessRange& rng, Compare comp_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
- }
-
- /// \overload
- template<class RandomAccessRange, class Compare>
- inline void pop_heap(const RandomAccessRange& rng, Compare comp_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
- }
-
- /// \brief template function make_heap
- ///
- /// range-based version of the make_heap std algorithm
- ///
- /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
- /// \pre Compare is a model of the BinaryPredicateConcept
- template<class RandomAccessRange>
- inline void make_heap(RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::make_heap(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange>
- inline void make_heap(const RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::make_heap(boost::begin(rng),boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange, class Compare>
- inline void make_heap(RandomAccessRange& rng, Compare comp_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
- }
-
- /// \overload
- template<class RandomAccessRange, class Compare>
- inline void make_heap(const RandomAccessRange& rng, Compare comp_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
- }
-
- /// \brief template function sort_heap
- ///
- /// range-based version of the sort_heap std algorithm
- ///
- /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
- /// \pre Compare is a model of the BinaryPredicateConcept
- template<class RandomAccessRange>
- inline void sort_heap(RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::sort_heap(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange>
- inline void sort_heap(const RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::sort_heap(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange, class Compare>
- inline void sort_heap(RandomAccessRange& rng, Compare comp_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
- }
-
- /// \overload
- template<class RandomAccessRange, class Compare>
- inline void sort_heap(const RandomAccessRange& rng, Compare comp_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
- }
+
+/// \brief template function push_heap
+///
+/// range-based version of the push_heap std algorithm
+///
+/// \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)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::push_heap(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline void push_heap(const RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::push_heap(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline void push_heap(RandomAccessRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline void push_heap(const RandomAccessRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
+}
+
+/// \brief template function pop_heap
+///
+/// range-based version of the pop_heap std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline void pop_heap(RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::pop_heap(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline void pop_heap(const RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::pop_heap(boost::begin(rng),boost::end(rng));
 }
 
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline void pop_heap(RandomAccessRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline void pop_heap(const RandomAccessRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
+}
+
+/// \brief template function make_heap
+///
+/// range-based version of the make_heap std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline void make_heap(RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::make_heap(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline void make_heap(const RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::make_heap(boost::begin(rng),boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline void make_heap(RandomAccessRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline void make_heap(const RandomAccessRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
+}
+
+/// \brief template function sort_heap
+///
+/// range-based version of the sort_heap std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline void sort_heap(RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::sort_heap(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline void sort_heap(const RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::sort_heap(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline void sort_heap(RandomAccessRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline void sort_heap(const RandomAccessRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
+}
+
+ } // namespace range
+ using range::push_heap;
+ using range::pop_heap;
+ using range::make_heap;
+ using range::sort_heap;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,52 +17,58 @@
 
 namespace boost
 {
- /// \brief template function inplace_merge
- ///
- /// range-based version of the inplace_merge std algorithm
- ///
- /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class BidirectionalRange>
- inline BidirectionalRange& inplace_merge(BidirectionalRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type middle)
+ namespace range
     {
- boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- std::inplace_merge(boost::begin(rng), middle, boost::end(rng));
- return rng;
- }
-
- /// \overload
- template<class BidirectionalRange>
- inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng,
- BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle)
- {
- boost::function_requires< BidirectionalRangeConcept<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,
- BinaryPredicate pred)
- {
- boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred);
- 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::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred);
- return rng;
- }
+
+/// \brief template function inplace_merge
+///
+/// range-based version of the inplace_merge std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class BidirectionalRange>
+inline BidirectionalRange& inplace_merge(BidirectionalRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type middle)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ std::inplace_merge(boost::begin(rng), middle, boost::end(rng));
+ return rng;
+}
+
+/// \overload
+template<class BidirectionalRange>
+inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle)
+{
+ BOOST_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,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred);
+ 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_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/lexicographical_compare.hpp
==============================================================================
--- trunk/boost/range/algorithm/lexicographical_compare.hpp (original)
+++ trunk/boost/range/algorithm/lexicographical_compare.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,36 +17,42 @@
 
 namespace boost
 {
- /// \brief template function lexicographic_compare
- ///
- /// range-based version of the lexicographic_compare std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- template<class SinglePassRange1, class SinglePassRange2>
- inline bool lexicographical_compare(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2)
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::lexicographical_compare(
- boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2));
- }
 
- /// \overload
- template<class SinglePassRange1, class SinglePassRange2,
- class BinaryPredicate>
- inline bool lexicographical_compare(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::lexicographical_compare(
- boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), pred);
- }
+/// \brief template function lexicographic_compare
+///
+/// range-based version of the lexicographic_compare std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+template<class SinglePassRange1, class SinglePassRange2>
+inline bool lexicographical_compare(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::lexicographical_compare(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2));
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+ class BinaryPredicate>
+inline bool lexicographical_compare(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::lexicographical_compare(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
 }
 
+ } // namespace range
+ using range::lexicographical_compare;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/lower_bound.hpp
==============================================================================
--- trunk/boost/range/algorithm/lower_bound.hpp (original)
+++ trunk/boost/range/algorithm/lower_bound.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,82 +18,88 @@
 
 namespace boost
 {
- /// \brief template function lower_bound
- ///
- /// range-based version of the lower_bound std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- template< class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
- lower_bound( ForwardRange& rng, Value val )
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::lower_bound(boost::begin(rng), boost::end(rng), val);
- }
- /// \overload
- template< class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
- lower_bound( const ForwardRange& rng, Value val )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::lower_bound(boost::begin(rng), boost::end(rng), val);
- }
- /// \overload
- template< class ForwardRange, class Value, class SortPredicate >
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
- lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
- }
- /// \overload
- template< class ForwardRange, class Value, class SortPredicate >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
- lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
- }
- /// \overload
- template< range_return_value re, class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- lower_bound( ForwardRange& rng, Value val )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::
- pack(std::lower_bound(boost::begin(rng), boost::end(rng), val),
- rng);
- }
- /// \overload
- template< range_return_value re, class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
- lower_bound( const ForwardRange& rng, Value val )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<const ForwardRange,re>::
- pack(std::lower_bound(boost::begin(rng), boost::end(rng), val),
- rng);
- }
- /// \overload
- template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::
- pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred),
- rng);
- }
- /// \overload
- template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
- lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<const ForwardRange,re>::
- pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred),
- rng);
- }
+
+/// \brief template function lower_bound
+///
+/// range-based version of the lower_bound std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+lower_bound( ForwardRange& rng, Value val )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::lower_bound(boost::begin(rng), boost::end(rng), val);
+}
+/// \overload
+template< class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+lower_bound( const ForwardRange& rng, Value val )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::lower_bound(boost::begin(rng), boost::end(rng), val);
+}
+/// \overload
+template< class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
+}
+/// \overload
+template< class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+lower_bound( ForwardRange& rng, Value val )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::
+ pack(std::lower_bound(boost::begin(rng), boost::end(rng), val),
+ rng);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+lower_bound( const ForwardRange& rng, Value val )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return range_return<const ForwardRange,re>::
+ pack(std::lower_bound(boost::begin(rng), boost::end(rng), val),
+ rng);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::
+ pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred),
+ rng);
 }
+/// \overload
+template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return range_return<const ForwardRange,re>::
+ pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred),
+ rng);
+}
+
+ } // namespace range
+ using range::lower_bound;
+} // namespace boost
 
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,92 +18,98 @@
 
 namespace boost
 {
- /// \brief template function max_element
- ///
- /// range-based version of the max_element std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class ForwardRange>
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
- max_element(ForwardRange& rng)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::max_element(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class ForwardRange>
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
- max_element(const ForwardRange& rng)
- {
- boost::function_requires< ForwardRangeConcept<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)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::max_element(boost::begin(rng), boost::end(rng), pred);
- }
+
+/// \brief template function max_element
+///
+/// range-based version of the max_element std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+max_element(ForwardRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::max_element(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+max_element(const ForwardRange& rng)
+{
+ BOOST_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)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ 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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::max_element(boost::begin(rng), boost::end(rng), pred);
+}
 
 // range_return overloads
 
- /// \overload
- template<range_return_value re, class ForwardRange>
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- max_element(ForwardRange& rng)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::pack(
- std::max_element(boost::begin(rng), boost::end(rng)),
- rng);
- }
-
- /// \overload
- template<range_return_value re, class ForwardRange>
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
- max_element(const ForwardRange& rng)
- {
- boost::function_requires< ForwardRangeConcept<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)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::pack(
- std::max_element(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
- max_element(const ForwardRange& rng, BinaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<const ForwardRange,re>::pack(
- std::max_element(boost::begin(rng), boost::end(rng), pred),
- rng);
- }
+/// \overload
+template<range_return_value re, class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+max_element(ForwardRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::pack(
+ std::max_element(boost::begin(rng), boost::end(rng)),
+ rng);
+}
+
+/// \overload
+template<range_return_value re, class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+max_element(const ForwardRange& rng)
+{
+ BOOST_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)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::pack(
+ std::max_element(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
+max_element(const ForwardRange& rng, BinaryPredicate pred)
+{
+ BOOST_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/merge.hpp
==============================================================================
--- trunk/boost/range/algorithm/merge.hpp (original)
+++ trunk/boost/range/algorithm/merge.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,39 +17,45 @@
 
 namespace boost
 {
- /// \brief template function merge
- ///
- /// range-based version of the merge std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- ///
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator>
- inline OutputIterator merge(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out)
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::merge(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out);
- }
 
- /// \overload
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator, class BinaryPredicate>
- inline OutputIterator merge(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::merge(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out, pred);
- }
+/// \brief template function merge
+///
+/// range-based version of the merge std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+///
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+inline OutputIterator merge(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::merge(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+inline OutputIterator merge(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::merge(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out, pred);
 }
 
+ } // namespace range
+ using range::merge;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,92 +18,98 @@
 
 namespace boost
 {
- /// \brief template function min_element
- ///
- /// range-based version of the min_element std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class ForwardRange>
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
- min_element(ForwardRange& rng)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::min_element(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class ForwardRange>
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
- min_element(const ForwardRange& rng)
- {
- boost::function_requires< ForwardRangeConcept<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)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::min_element(boost::begin(rng), boost::end(rng), pred);
- }
+
+/// \brief template function min_element
+///
+/// range-based version of the min_element std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+min_element(ForwardRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::min_element(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+min_element(const ForwardRange& rng)
+{
+ BOOST_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)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ 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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::min_element(boost::begin(rng), boost::end(rng), pred);
+}
 
 // range_return overloads
 
- /// \overload
- template<range_return_value re, class ForwardRange>
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- min_element(ForwardRange& rng)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::pack(
- std::min_element(boost::begin(rng), boost::end(rng)),
- rng);
- }
-
- /// \overload
- template<range_return_value re, class ForwardRange>
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
- min_element(const ForwardRange& rng)
- {
- boost::function_requires< ForwardRangeConcept<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)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::pack(
- std::min_element(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
- min_element(const ForwardRange& rng, BinaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<const ForwardRange,re>::pack(
- std::min_element(boost::begin(rng), boost::end(rng), pred),
- rng);
- }
+/// \overload
+template<range_return_value re, class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+min_element(ForwardRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::pack(
+ std::min_element(boost::begin(rng), boost::end(rng)),
+ rng);
+}
+
+/// \overload
+template<range_return_value re, class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+min_element(const ForwardRange& rng)
+{
+ BOOST_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)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::pack(
+ std::min_element(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
+min_element(const ForwardRange& rng, BinaryPredicate pred)
+{
+ BOOST_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/mismatch.hpp
==============================================================================
--- trunk/boost/range/algorithm/mismatch.hpp (original)
+++ trunk/boost/range/algorithm/mismatch.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -57,126 +57,139 @@
             return std::pair<SinglePassTraversalReadableIterator1,
                              SinglePassTraversalReadableIterator2>(first1, first2);
         }
- }
+ } // namespace range_detail
 
- /// \brief template function mismatch
- ///
- /// range-based version of the mismatch std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- 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)
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
-
- return 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::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+/// \brief template function mismatch
+///
+/// range-based version of the mismatch std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+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_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+ return ::boost::range_detail::mismatch_impl(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2));
+}
 
- return 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)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+/// \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_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+ return ::boost::range_detail::mismatch_impl(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2));
+}
 
- return 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<SinglePassRange2>::type >
- mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+/// \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)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+ return ::boost::range_detail::mismatch_impl(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2));
+}
 
- return 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<SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_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::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
-
- return 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::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+/// \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_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+ return ::boost::range_detail::mismatch_impl(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2), pred);
+}
 
- return 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,
- BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
- mismatch(SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+/// \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_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+ return ::boost::range_detail::mismatch_impl(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2), pred);
+}
 
- return 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<SinglePassRange2>::type >
- mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+/// \overload
+template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+ return ::boost::range_detail::mismatch_impl(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2), pred);
+}
 
- return 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<SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_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
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,48 +17,54 @@
 
 namespace boost
 {
- /// \brief template function nth_element
- ///
- /// range-based version of the nth_element std algorithm
- ///
- /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class RandomAccessRange>
- inline void nth_element(RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth)
+ namespace range
     {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::nth_element(boost::begin(rng), nth, boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange>
- inline void nth_element(const RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::nth_element(boost::begin(rng),nth,boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange, class BinaryPredicate>
- inline void nth_element(RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth,
- BinaryPredicate sort_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred);
- }
-
- /// \overload
- template<class RandomAccessRange, class BinaryPredicate>
- inline void nth_element(const RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth,
- BinaryPredicate sort_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::nth_element(boost::begin(rng),nth,boost::end(rng), sort_pred);
- }
+
+/// \brief template function nth_element
+///
+/// range-based version of the nth_element std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline void nth_element(RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::nth_element(boost::begin(rng), nth, boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline void nth_element(const RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::nth_element(boost::begin(rng),nth,boost::end(rng));
 }
 
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline void nth_element(RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth,
+ BinaryPredicate sort_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred);
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline void nth_element(const RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth,
+ BinaryPredicate sort_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::nth_element(boost::begin(rng),nth,boost::end(rng), sort_pred);
+}
+
+ } // namespace range
+ using range::nth_element;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,49 +17,55 @@
 
 namespace boost
 {
- /// \brief template function partial_sort
- ///
- /// range-based version of the partial_sort std algorithm
- ///
- /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class RandomAccessRange>
- inline void partial_sort(RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle)
+ namespace range
     {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::partial_sort(boost::begin(rng), middle, boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange>
- inline void partial_sort(const RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::partial_sort(boost::begin(rng), middle, boost::end(rng));
- }
-
- /// \overload
- template<class RandomAccessRange, class BinaryPredicate>
- inline void partial_sort(RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle,
- BinaryPredicate sort_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::partial_sort(boost::begin(rng), middle, boost::end(rng),
- sort_pred);
- }
-
- /// \overload
- template<class RandomAccessRange, class BinaryPredicate>
- inline void partial_sort(const RandomAccessRange& rng,
- BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle,
- BinaryPredicate sort_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::partial_sort(boost::begin(rng), middle, boost::end(rng), sort_pred);
- }
+
+/// \brief template function partial_sort
+///
+/// range-based version of the partial_sort std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline void partial_sort(RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::partial_sort(boost::begin(rng), middle, boost::end(rng));
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline void partial_sort(const RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::partial_sort(boost::begin(rng), middle, boost::end(rng));
 }
 
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline void partial_sort(RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle,
+ BinaryPredicate sort_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::partial_sort(boost::begin(rng), middle, boost::end(rng),
+ sort_pred);
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline void partial_sort(const RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle,
+ BinaryPredicate sort_pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::partial_sort(boost::begin(rng), middle, boost::end(rng), sort_pred);
+}
+
+ } // namespace range
+ using range::partial_sort;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,41 +18,47 @@
 
 namespace boost
 {
- /// \brief template function partial_sort_copy
- ///
- /// range-based version of the partial_sort_copy std algorithm
- ///
- /// \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
- partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2)
+ namespace range
     {
- BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
- BOOST_CONCEPT_ASSERT((WriteableRandomAccessRangeConcept<RandomAccessRange>));
- BOOST_CONCEPT_ASSERT((range_detail::SameTypeConcept<typename range_value<SinglePassRange>::type, typename range_value<RandomAccessRange>::type>));
- BOOST_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
- partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2,
- BinaryPredicate pred)
- {
- BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
- BOOST_CONCEPT_ASSERT((WriteableRandomAccessRangeConcept<RandomAccessRange>));
- BOOST_CONCEPT_ASSERT((range_detail::SameTypeConcept<typename range_value<SinglePassRange>::type, typename range_value<RandomAccessRange>::type>));
- BOOST_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);
- }
+
+/// \brief template function partial_sort_copy
+///
+/// range-based version of the partial_sort_copy std algorithm
+///
+/// \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
+partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2)
+{
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+ BOOST_CONCEPT_ASSERT((WriteableRandomAccessRangeConcept<RandomAccessRange>));
+ BOOST_CONCEPT_ASSERT((range_detail::SameTypeConcept<typename range_value<SinglePassRange>::type, typename range_value<RandomAccessRange>::type>));
+ BOOST_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
+partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+ BOOST_CONCEPT_ASSERT((WriteableRandomAccessRangeConcept<RandomAccessRange>));
+ BOOST_CONCEPT_ASSERT((range_detail::SameTypeConcept<typename range_value<SinglePassRange>::type, typename range_value<RandomAccessRange>::type>));
+ BOOST_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);
+}
+
+ } // namespace range
+ using range::partial_sort_copy;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/partition.hpp
==============================================================================
--- trunk/boost/range/algorithm/partition.hpp (original)
+++ trunk/boost/range/algorithm/partition.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,51 +18,57 @@
 
 namespace boost
 {
- /// \brief template function partition
- ///
- /// range-based version of the partition std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- template<class ForwardRange, class UnaryPredicate>
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
- partition(ForwardRange& rng, UnaryPredicate pred)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::partition(boost::begin(rng),boost::end(rng),pred);
- }
+
+/// \brief template function partition
+///
+/// range-based version of the partition std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template<class ForwardRange, class UnaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+partition(ForwardRange& rng, UnaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ 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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::partition(boost::begin(rng),boost::end(rng),pred);
+}
 
 // range_return overloads
 
- /// \overload
- template< range_return_value re, class ForwardRange,
- class UnaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- partition(ForwardRange& rng, UnaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return boost::range_return<ForwardRange,re>::
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return boost::range_return<const ForwardRange,re>::
- 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<ForwardRange,re>::type
+partition(ForwardRange& rng, UnaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return boost::range_return<ForwardRange,re>::
+ 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_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/permutation.hpp
==============================================================================
--- trunk/boost/range/algorithm/permutation.hpp (original)
+++ trunk/boost/range/algorithm/permutation.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,101 +17,92 @@
 
 namespace boost
 {
- /// \brief template function next_permutation
- ///
- /// range-based version of the next_permutation std algorithm
- ///
- /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
- /// \pre Compare is a model of the BinaryPredicateConcept
- template<class BidirectionalRange>
- inline bool next_permutation(BidirectionalRange& rng)
+ namespace range
     {
- boost::function_requires<
- BidirectionalRangeConcept<BidirectionalRange> >();
 
- return std::next_permutation(boost::begin(rng), boost::end(rng));
- }
-
- /// \overload
- template<class BidirectionalRange>
- inline bool next_permutation(const BidirectionalRange& rng)
- {
- boost::function_requires<
- BidirectionalRangeConcept<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)
- {
- boost::function_requires<
- BidirectionalRangeConcept<BidirectionalRange> >();
-
- return std::next_permutation(boost::begin(rng), boost::end(rng),
- comp_pred);
- }
-
- /// \overload
- template<class BidirectionalRange, class Compare>
- inline bool next_permutation(const BidirectionalRange& rng,
- Compare comp_pred)
- {
- boost::function_requires<
- BidirectionalRangeConcept<BidirectionalRange> >();
+/// \brief template function next_permutation
+///
+/// range-based version of the next_permutation std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class BidirectionalRange>
+inline bool next_permutation(BidirectionalRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ return std::next_permutation(boost::begin(rng), boost::end(rng));
+}
 
- 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
- ///
- /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
- /// \pre Compare is a model of the BinaryPredicateConcept
- template<class BidirectionalRange>
- inline bool prev_permutation(BidirectionalRange& rng)
- {
- boost::function_requires<
- BidirectionalRangeConcept<BidirectionalRange> >();
+/// \overload
+template<class BidirectionalRange>
+inline bool next_permutation(const BidirectionalRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+ return std::next_permutation(boost::begin(rng), boost::end(rng));
+}
 
- return std::prev_permutation(boost::begin(rng), boost::end(rng));
- }
+/// \overload
+template<class BidirectionalRange, class Compare>
+inline bool next_permutation(BidirectionalRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ return std::next_permutation(boost::begin(rng), boost::end(rng),
+ comp_pred);
+}
 
- /// \overload
- template<class BidirectionalRange>
- inline bool prev_permutation(const BidirectionalRange& rng)
- {
- boost::function_requires<
- BidirectionalRangeConcept<BidirectionalRange> >();
+/// \overload
+template<class BidirectionalRange, class Compare>
+inline bool next_permutation(const BidirectionalRange& rng,
+ Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+ return std::next_permutation(boost::begin(rng), boost::end(rng),
+ comp_pred);
+}
 
- return std::prev_permutation(boost::begin(rng), boost::end(rng));
- }
+/// \brief template function prev_permutation
+///
+/// range-based version of the prev_permutation std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class BidirectionalRange>
+inline bool prev_permutation(BidirectionalRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<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)
- {
- boost::function_requires<
- BidirectionalRangeConcept<BidirectionalRange> >();
+/// \overload
+template<class BidirectionalRange>
+inline bool prev_permutation(const BidirectionalRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+ return std::prev_permutation(boost::begin(rng), boost::end(rng));
+}
 
- return std::prev_permutation(boost::begin(rng), boost::end(rng),
- comp_pred);
- }
-
- /// \overload
- template<class BidirectionalRange, class Compare>
- inline bool prev_permutation(const BidirectionalRange& rng,
- Compare comp_pred)
- {
- boost::function_requires<
- BidirectionalRangeConcept<BidirectionalRange> >();
+/// \overload
+template<class BidirectionalRange, class Compare>
+inline bool prev_permutation(BidirectionalRange& rng, Compare comp_pred)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ return std::prev_permutation(boost::begin(rng), boost::end(rng),
+ comp_pred);
+}
 
- return std::prev_permutation(boost::begin(rng), boost::end(rng),
- comp_pred);
- }
+/// \overload
+template<class BidirectionalRange, class Compare>
+inline bool prev_permutation(const BidirectionalRange& rng,
+ Compare comp_pred)
+{
+ BOOST_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;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,46 +17,52 @@
 
 namespace boost
 {
- /// \brief template function random_shuffle
- ///
- /// range-based version of the random_shuffle std algorithm
- ///
- /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
- /// \pre Generator is a model of the UnaryFunctionConcept
- template<class RandomAccessRange>
- inline RandomAccessRange& random_shuffle(RandomAccessRange& rng)
+ namespace range
     {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::random_shuffle(boost::begin(rng), boost::end(rng));
- return rng;
- }
-
- /// \overload
- template<class RandomAccessRange>
- inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<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)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::random_shuffle(boost::begin(rng), boost::end(rng), gen);
- return rng;
- }
-
- /// \overload
- template<class RandomAccessRange, class Generator>
- inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::random_shuffle(boost::begin(rng), boost::end(rng), gen);
- return rng;
- }
+
+/// \brief template function random_shuffle
+///
+/// range-based version of the random_shuffle std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Generator is a model of the UnaryFunctionConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& random_shuffle(RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::random_shuffle(boost::begin(rng), boost::end(rng));
+ return rng;
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng)
+{
+ BOOST_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)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::random_shuffle(boost::begin(rng), boost::end(rng), gen);
+ return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class Generator>
+inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen)
+{
+ BOOST_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/remove.hpp
==============================================================================
--- trunk/boost/range/algorithm/remove.hpp (original)
+++ trunk/boost/range/algorithm/remove.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,53 +18,57 @@
 
 namespace boost
 {
- /// \brief template function remove
- ///
- /// range-based version of the remove std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- template< class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
- remove(ForwardRange& rng, const Value& val)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::remove(boost::begin(rng),boost::end(rng),val);
- }
+
+/// \brief template function remove
+///
+/// range-based version of the remove std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+remove(ForwardRange& rng, const Value& val)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ 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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::remove(boost::begin(rng),boost::end(rng),val);
+}
 
 // range_return overloads
-
- /// \overload
- template< range_return_value re, class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- remove(ForwardRange& rng, const Value& val)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
-
- return range_return<ForwardRange,re>::pack(
- std::remove(boost::begin(rng), boost::end(rng), val),
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
 
- return range_return<const ForwardRange,re>::pack(
- std::remove(boost::begin(rng), boost::end(rng), val),
- rng);
- }
+/// \overload
+template< range_return_value re, class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+remove(ForwardRange& rng, const Value& val)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::pack(
+ std::remove(boost::begin(rng), boost::end(rng), val),
+ 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_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/remove_copy.hpp
==============================================================================
--- trunk/boost/range/algorithm/remove_copy.hpp (original)
+++ trunk/boost/range/algorithm/remove_copy.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,22 +17,28 @@
 
 namespace boost
 {
- /// \brief template function remove_copy
- ///
- /// range-based version of the remove_copy std algorithm
- ///
- /// \pre SinglePassRange is a model of the SinglePassRangeConcept
- /// \pre OutputIterator is a model of the OutputIteratorConcept
- /// \pre Value is a model of the EqualityComparableConcept
- /// \pre Objects of type Value can be compared for equality with objects of
- /// InputIterator's value type.
- template< class SinglePassRange, class OutputIterator, class Value >
- inline OutputIterator
- remove_copy(SinglePassRange& rng, OutputIterator out_it, const Value& val)
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::remove_copy(boost::begin(rng), boost::end(rng), out_it, val);
- }
+
+/// \brief template function remove_copy
+///
+/// range-based version of the remove_copy std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre OutputIterator is a model of the OutputIteratorConcept
+/// \pre Value is a model of the EqualityComparableConcept
+/// \pre Objects of type Value can be compared for equality with objects of
+/// InputIterator's value type.
+template< class SinglePassRange, class OutputIterator, class Value >
+inline OutputIterator
+remove_copy(SinglePassRange& rng, OutputIterator out_it, const Value& val)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+ return std::remove_copy(boost::begin(rng), boost::end(rng), out_it, val);
 }
 
+ } // namespace range
+ using range::remove_copy;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,53 +18,58 @@
 
 namespace boost
 {
- /// \brief template function remove_if
- ///
- /// range-based version of the remove_if std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
- template< class ForwardRange, class UnaryPredicate >
- inline BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
- remove_if(ForwardRange& rng, UnaryPredicate pred)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::remove_if(boost::begin(rng),boost::end(rng),pred);
- }
+
+/// \brief template function remove_if
+///
+/// range-based version of the remove_if std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+template< class ForwardRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+remove_if(ForwardRange& rng, UnaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ 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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::remove_if(boost::begin(rng),boost::end(rng),pred);
+}
 
 // range_return overloads
 
- /// \overload
- template< range_return_value re, class ForwardRange, class UnaryPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- remove_if(ForwardRange& rng, UnaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::pack(
- std::remove_if(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
- remove_if(const ForwardRange& rng, UnaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<const ForwardRange,re>::pack(
- std::remove_if(boost::begin(rng), boost::end(rng), pred),
- rng);
- }
+/// \overload
+template< range_return_value re, class ForwardRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+remove_if(ForwardRange& rng, UnaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::pack(
+ std::remove_if(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
+remove_if(const ForwardRange& rng, UnaryPredicate pred)
+{
+ BOOST_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/replace.hpp
==============================================================================
--- trunk/boost/range/algorithm/replace.hpp (original)
+++ trunk/boost/range/algorithm/replace.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,31 +17,37 @@
 
 namespace boost
 {
- /// \brief template function replace
- ///
- /// range-based version of the replace std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- template< class ForwardRange, class Value >
- inline ForwardRange&
- replace(ForwardRange& rng, const Value& what,
- const Value& with_what)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- std::replace(boost::begin(rng), boost::end(rng), what, with_what);
- return rng;
- }
 
- /// \overload
- template< class ForwardRange, class Value >
- inline const ForwardRange&
- replace(const ForwardRange& rng, const Value& what,
- const Value& with_what)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- std::replace(boost::begin(rng), boost::end(rng), what, with_what);
- return rng;
- }
+/// \brief template function replace
+///
+/// range-based version of the replace std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline ForwardRange&
+replace(ForwardRange& rng, const Value& what,
+ const Value& with_what)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ std::replace(boost::begin(rng), boost::end(rng), what, with_what);
+ return rng;
+}
+
+/// \overload
+template< class ForwardRange, class Value >
+inline const ForwardRange&
+replace(const ForwardRange& rng, const Value& what,
+ const Value& with_what)
+{
+ BOOST_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;
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/replace_copy.hpp
==============================================================================
--- trunk/boost/range/algorithm/replace_copy.hpp (original)
+++ trunk/boost/range/algorithm/replace_copy.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,20 +17,26 @@
 
 namespace boost
 {
- /// \brief template function replace_copy
- ///
- /// range-based version of the replace_copy std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- template< class ForwardRange, class OutputIterator, class Value >
- inline OutputIterator
- replace_copy(ForwardRange& rng, OutputIterator out_it, const Value& what,
- const Value& with_what)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::replace_copy(boost::begin(rng), boost::end(rng), out_it,
- what, with_what);
- }
+
+/// \brief template function replace_copy
+///
+/// range-based version of the replace_copy std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class OutputIterator, class Value >
+inline OutputIterator
+replace_copy(ForwardRange& rng, OutputIterator out_it, const Value& what,
+ const Value& with_what)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::replace_copy(boost::begin(rng), boost::end(rng), out_it,
+ what, with_what);
 }
 
+ } // namespace range
+ using range::replace_copy;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/replace_copy_if.hpp
==============================================================================
--- trunk/boost/range/algorithm/replace_copy_if.hpp (original)
+++ trunk/boost/range/algorithm/replace_copy_if.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,24 +17,30 @@
 
 namespace boost
 {
- /// \brief template function replace_copy_if
- ///
- /// range-based version of the replace_copy_if std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre Predicate is a model of the PredicateConcept
- /// \pre Value is convertible to Predicate's argument type
- /// \pre Value is Assignable
- /// \pre Value is convertible to a type in OutputIterator's set of value types.
- template< class ForwardRange, class OutputIterator, class Predicate, class Value >
- inline OutputIterator
- replace_copy_if(ForwardRange& rng, OutputIterator out_it, Predicate pred,
- const Value& with_what)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::replace_copy_if(boost::begin(rng), boost::end(rng), out_it,
- pred, with_what);
- }
+
+/// \brief template function replace_copy_if
+///
+/// range-based version of the replace_copy_if std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre Predicate is a model of the PredicateConcept
+/// \pre Value is convertible to Predicate's argument type
+/// \pre Value is Assignable
+/// \pre Value is convertible to a type in OutputIterator's set of value types.
+template< class ForwardRange, class OutputIterator, class Predicate, class Value >
+inline OutputIterator
+replace_copy_if(ForwardRange& rng, OutputIterator out_it, Predicate pred,
+ const Value& with_what)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::replace_copy_if(boost::begin(rng), boost::end(rng), out_it,
+ pred, with_what);
 }
 
+ } // namespace range
+ using range::replace_copy_if;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,33 +17,38 @@
 
 namespace boost
 {
- /// \brief template function replace_if
- ///
- /// range-based version of the replace_if std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
- template< class ForwardRange, class UnaryPredicate, class Value >
- inline ForwardRange&
- replace_if(ForwardRange& rng, UnaryPredicate pred,
- const Value& val)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- std::replace_if(boost::begin(rng), boost::end(rng), pred, val);
- return rng;
- }
 
- /// \overload
- template< class ForwardRange, class UnaryPredicate, class Value >
- inline const ForwardRange&
- replace_if(const ForwardRange& rng, UnaryPredicate pred,
- const Value& val)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- std::replace_if(boost::begin(rng), boost::end(rng), pred, val);
- return rng;
- }
+/// \brief template function replace_if
+///
+/// range-based version of the replace_if std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+template< class ForwardRange, class UnaryPredicate, class Value >
+inline ForwardRange&
+ replace_if(ForwardRange& rng, UnaryPredicate pred,
+ const Value& val)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ std::replace_if(boost::begin(rng), boost::end(rng), pred, val);
+ return rng;
+}
 
+/// \overload
+template< class ForwardRange, class UnaryPredicate, class Value >
+inline const ForwardRange&
+ replace_if(const ForwardRange& rng, UnaryPredicate pred,
+ const Value& val)
+{
+ BOOST_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/reverse.hpp
==============================================================================
--- trunk/boost/range/algorithm/reverse.hpp (original)
+++ trunk/boost/range/algorithm/reverse.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,27 +18,33 @@
 
 namespace boost
 {
- /// \brief template function reverse
- ///
- /// range-based version of the reverse std algorithm
- ///
- /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
- template<class BidirectionalRange>
- inline BidirectionalRange& reverse(BidirectionalRange& rng)
+ namespace range
     {
- boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- std::reverse(boost::begin(rng), boost::end(rng));
- return rng;
- }
 
- /// \overload
- template<class BidirectionalRange>
- inline const BidirectionalRange& reverse(const BidirectionalRange& rng)
- {
- boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- std::reverse(boost::begin(rng), boost::end(rng));
- return rng;
- }
+/// \brief template function reverse
+///
+/// range-based version of the reverse std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+template<class BidirectionalRange>
+inline BidirectionalRange& reverse(BidirectionalRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ std::reverse(boost::begin(rng), boost::end(rng));
+ return rng;
+}
+
+/// \overload
+template<class BidirectionalRange>
+inline const BidirectionalRange& reverse(const BidirectionalRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+ std::reverse(boost::begin(rng), boost::end(rng));
+ return rng;
 }
 
+ } // namespace range
+ using range::reverse;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,25 +18,31 @@
 
 namespace boost
 {
- /// \brief template function reverse_copy
- ///
- /// 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)
+ namespace range
     {
- BOOST_CONCEPT_ASSERT((BidirectionalRangeConcept<BidirectionalRange>));
- return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
- }
 
- /// \overload
- template<typename BidirectionalRange, typename OutputIterator>
- inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out)
- {
- BOOST_CONCEPT_ASSERT((BidirectionalRangeConcept<BidirectionalRange>));
- return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
- }
+/// \brief template function reverse_copy
+///
+/// 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_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
+}
+
+/// \overload
+template<typename BidirectionalRange, typename OutputIterator>
+inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
 }
 
+ } // namespace range
+ using range::reverse_copy;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/rotate.hpp
==============================================================================
--- trunk/boost/range/algorithm/rotate.hpp (original)
+++ trunk/boost/range/algorithm/rotate.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,30 +17,36 @@
 
 namespace boost
 {
- /// \brief template function rotate
- ///
- /// range-based version of the rotate std algorithm
- ///
- /// \pre Rng meets the requirements for a Forward range
- template<typename ForwardRange>
- inline ForwardRange& rotate(ForwardRange& rng,
- typename range_iterator<ForwardRange>::type middle)
+ namespace range
     {
- BOOST_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_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- std::rotate(boost::begin(rng), middle, boost::end(rng));
- return rng;
- }
+/// \brief template function rotate
+///
+/// range-based version of the rotate std algorithm
+///
+/// \pre Rng meets the requirements for a Forward range
+template<typename ForwardRange>
+inline ForwardRange& rotate(ForwardRange& rng,
+ typename range_iterator<ForwardRange>::type middle)
+{
+ BOOST_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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ std::rotate(boost::begin(rng), middle, boost::end(rng));
+ return rng;
 }
 
+ } // namespace range
+ using range::rotate;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,6 +18,9 @@
 
 namespace boost
 {
+ namespace range
+ {
+
     /// \brief template function rotate
     ///
     /// range-based version of the rotate std algorithm
@@ -30,9 +33,12 @@
         OutputIterator target
         )
     {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
         return std::rotate_copy(boost::begin(rng), middle, boost::end(rng), target);
     }
-}
+
+ } // namespace range
+ using range::rotate_copy;
+} // namespace boost
 
 #endif // include guard

Modified: trunk/boost/range/algorithm/search.hpp
==============================================================================
--- trunk/boost/range/algorithm/search.hpp (original)
+++ trunk/boost/range/algorithm/search.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,114 +18,119 @@
 
 namespace boost
 {
- /// \brief template function search
- ///
- /// range-based version of the search std algorithm
- ///
- /// \pre ForwardRange1 is a model of the ForwardRangeConcept
- /// \pre ForwardRange2 is a model of the ForwardRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template< class ForwardRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
- search(ForwardRange1& rng1, const ForwardRange2& rng2)
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
- return std::search(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2));
- }
-
- /// \overload
- template< class ForwardRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
- search(const ForwardRange1& rng1, const ForwardRange2& rng2)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<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)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
- return std::search(boost::begin(rng1),boost::end(rng1),
- 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::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
- return std::search(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred);
- }
+
+/// \brief template function search
+///
+/// range-based version of the search std algorithm
+///
+/// \pre ForwardRange1 is a model of the ForwardRangeConcept
+/// \pre ForwardRange2 is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
+search(ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+ BOOST_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 >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+ BOOST_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)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+ return std::search(boost::begin(rng1),boost::end(rng1),
+ 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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+ BOOST_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
- template< range_return_value re, class ForwardRange1, class ForwardRange2 >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
- search(ForwardRange1& rng1, const ForwardRange2& rng2)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
- return range_return<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 >
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
- search(const ForwardRange1& rng1, const ForwardRange2& rng2)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<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
- search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
- return range_return<ForwardRange1,re>::
- pack(std::search(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred),
- 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::function_requires< ForwardRangeConcept<ForwardRange1> >();
- boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
- return range_return<const ForwardRange1,re>::
- pack(std::search(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2),pred),
- rng1);
- }
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+search(ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+ return range_return<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 >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+ BOOST_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
+search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+ return range_return<ForwardRange1,re>::
+ pack(std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred),
+ 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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+ BOOST_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
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -19,122 +19,127 @@
 
 namespace boost
 {
- /// \brief template function search
- ///
- /// range-based version of the search std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- /// \pre Integer is an integral type
- /// \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
- search_n(ForwardRange& rng, Integer count, const Value& value)
+ namespace range
     {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return std::search_n(boost::begin(rng),boost::end(rng), count, value);
- }
-
- /// \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_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
- search_n(ForwardRange& rng, Integer count, const Value& value,
- BinaryPredicate binary_pred)
- {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_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_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_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);
- }
+
+/// \brief template function search
+///
+/// range-based version of the search std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre Integer is an integral type
+/// \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
+search_n(ForwardRange& rng, Integer count, const Value& value)
+{
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return std::search_n(boost::begin(rng),boost::end(rng), count, value);
+}
+
+/// \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_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
+search_n(ForwardRange& rng, Integer count, const Value& value,
+ BinaryPredicate binary_pred)
+{
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_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_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_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);
+}
 
 // range_return overloads
 
- /// \overload
- template< range_return_value re, typename ForwardRange, typename Integer,
- typename Value >
- inline typename range_return<ForwardRange,re>::type
- search_n(ForwardRange& rng, Integer count, const Value& value)
- {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- return range_return<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,
- class Value >
- inline typename range_return<const ForwardRange,re>::type
- search_n(const ForwardRange& rng, Integer count, const Value& value)
- {
- BOOST_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
- search_n(ForwardRange& rng, Integer count, const Value& value,
- BinaryPredicate pred)
- {
- BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_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_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
- BOOST_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);
- }
+/// \overload
+template< range_return_value re, typename ForwardRange, typename Integer,
+ typename Value >
+inline typename range_return<ForwardRange,re>::type
+search_n(ForwardRange& rng, Integer count, const Value& value)
+{
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return range_return<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,
+ class Value >
+inline typename range_return<const ForwardRange,re>::type
+search_n(const ForwardRange& rng, Integer count, const Value& value)
+{
+ BOOST_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
+search_n(ForwardRange& rng, Integer count, const Value& value,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_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_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_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
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/set_algorithm.hpp
==============================================================================
--- trunk/boost/range/algorithm/set_algorithm.hpp (original)
+++ trunk/boost/range/algorithm/set_algorithm.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,172 +17,182 @@
 
 namespace boost
 {
- /// \brief template function includes
- ///
- /// range-based version of the includes std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class SinglePassRange1, class SinglePassRange2>
- inline bool includes(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2)
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::includes(boost::begin(rng1),boost::end(rng1),
- boost::begin(rng2),boost::end(rng2));
- }
-
- /// \overload
- template<class SinglePassRange1, class SinglePassRange2,
- class BinaryPredicate>
- inline bool includes(const SinglePassRange1& rng1,
+
+/// \brief template function includes
+///
+/// range-based version of the includes std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2>
+inline bool includes(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::includes(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+ class BinaryPredicate>
+inline bool includes(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::includes(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
+}
+
+/// \brief template function set_union
+///
+/// range-based version of the set_union std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+inline OutputIterator set_union(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::set_union(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+inline OutputIterator set_union(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::set_union(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out, pred);
+}
+
+/// \brief template function set_intersection
+///
+/// range-based version of the set_intersection std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+inline OutputIterator set_intersection(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::set_intersection(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+inline OutputIterator set_intersection(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::set_intersection(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2),
+ out, pred);
+}
+
+/// \brief template function set_difference
+///
+/// range-based version of the set_difference std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+inline OutputIterator set_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::set_difference(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+inline OutputIterator set_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::set_difference(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out, pred);
+}
+
+/// \brief template function set_symmetric_difference
+///
+/// range-based version of the set_symmetric_difference std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+inline OutputIterator
+set_symmetric_difference(const SinglePassRange1& rng1,
                          const SinglePassRange2& rng2,
+ OutputIterator out)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::set_symmetric_difference(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+inline OutputIterator
+set_symmetric_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
                          BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::includes(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), pred);
- }
-
- /// \brief template function set_union
- ///
- /// range-based version of the set_union std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator>
- inline OutputIterator set_union(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::set_union(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out);
- }
-
- /// \overload
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator, class BinaryPredicate>
- inline OutputIterator set_union(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::set_union(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out, pred);
- }
-
- /// \brief template function set_intersection
- ///
- /// range-based version of the set_intersection std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator>
- inline OutputIterator set_intersection(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::set_intersection(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out);
- }
-
- /// \overload
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator, class BinaryPredicate>
- inline OutputIterator set_intersection(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::set_intersection(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2),
- out, pred);
- }
-
- /// \brief template function set_difference
- ///
- /// range-based version of the set_difference std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator>
- inline OutputIterator set_difference(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::set_difference(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out);
- }
-
- /// \overload
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator, class BinaryPredicate>
- inline OutputIterator set_difference(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::set_difference(
- boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out, pred);
- }
-
- /// \brief template function set_symmetric_difference
- ///
- /// range-based version of the set_symmetric_difference std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator>
- inline OutputIterator
- set_symmetric_difference(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::set_symmetric_difference(boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out);
- }
-
- /// \overload
- template<class SinglePassRange1, class SinglePassRange2,
- class OutputIterator, class BinaryPredicate>
- inline OutputIterator
- set_symmetric_difference(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out,
- BinaryPredicate pred)
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return std::set_symmetric_difference(
- boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2), out, pred);
- }
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return std::set_symmetric_difference(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out, pred);
 }
 
+ } // namespace range
+ using range::includes;
+ using range::set_union;
+ using range::set_intersection;
+ using range::set_difference;
+ using range::set_symmetric_difference;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/sort.hpp
==============================================================================
--- trunk/boost/range/algorithm/sort.hpp (original)
+++ trunk/boost/range/algorithm/sort.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,47 +17,52 @@
 
 namespace boost
 {
- /// \brief template function sort
- ///
- /// range-based version of the sort std algorithm
- ///
- /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class RandomAccessRange>
- inline RandomAccessRange& sort(RandomAccessRange& rng)
+ namespace range
     {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::sort(boost::begin(rng), boost::end(rng));
 
- return rng;
- }
+/// \brief template function sort
+///
+/// range-based version of the sort std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& sort(RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::sort(boost::begin(rng), boost::end(rng));
+ return rng;
+}
 
- /// \overload
- template<class RandomAccessRange>
- inline const RandomAccessRange& sort(const RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::sort(boost::begin(rng),boost::end(rng));
- return rng;
- }
-
- /// \overload
- template<class RandomAccessRange, class BinaryPredicate>
- inline RandomAccessRange& sort(RandomAccessRange& rng, BinaryPredicate pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::sort(boost::begin(rng), boost::end(rng), pred);
- return rng;
- }
-
- /// \overload
- template<class RandomAccessRange, class BinaryPredicate>
- inline const RandomAccessRange& sort(const RandomAccessRange& rng, BinaryPredicate pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::sort(boost::begin(rng), boost::end(rng), pred);
- return rng;
- }
+/// \overload
+template<class RandomAccessRange>
+inline const RandomAccessRange& sort(const RandomAccessRange& rng)
+{
+ BOOST_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)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::sort(boost::begin(rng), boost::end(rng), pred);
+ return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline const RandomAccessRange& sort(const RandomAccessRange& rng, BinaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ std::sort(boost::begin(rng), boost::end(rng), pred);
+ return rng;
+}
+
+ } // namespace range
+ using range::sort;
+} // namespace boost
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,51 +18,56 @@
 
 namespace boost
 {
- /// \brief template function stable_partition
- ///
- /// range-based version of the stable_partition std algorithm
- ///
- /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
- /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
- template<class BidirectionalRange, class UnaryPredicate>
- inline BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type
- stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
+ namespace range
     {
- boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- 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::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- return std::stable_partition(boost::begin(rng),boost::end(rng),pred);
- }
+
+/// \brief template function stable_partition
+///
+/// range-based version of the stable_partition std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+template<class BidirectionalRange, class UnaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type
+stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ 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_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
- stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
- {
- boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- return range_return<BidirectionalRange,re>::pack(
- std::stable_partition(boost::begin(rng), boost::end(rng), pred),
- 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::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
- return range_return<const BidirectionalRange,re>::pack(
- std::stable_partition(boost::begin(rng),boost::end(rng),pred),
- rng);
- }
+template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_return<BidirectionalRange,re>::type
+stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
+{
+ BOOST_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+ return range_return<BidirectionalRange,re>::pack(
+ std::stable_partition(boost::begin(rng), boost::end(rng), pred),
+ 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_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
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,46 +17,52 @@
 
 namespace boost
 {
- /// \brief template function stable_sort
- ///
- /// range-based version of the stable_sort std algorithm
- ///
- /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template<class RandomAccessRange>
- inline RandomAccessRange& stable_sort(RandomAccessRange& rng)
+ namespace range
     {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::stable_sort(boost::begin(rng), boost::end(rng));
- return rng;
- }
-
- /// \overload
- template<class RandomAccessRange>
- inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng)
- {
- boost::function_requires< RandomAccessRangeConcept<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)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred);
- return rng;
- }
-
- /// \overload
- template<class RandomAccessRange, class BinaryPredicate>
- inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng, BinaryPredicate sort_pred)
- {
- boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
- std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred);
- return rng;
- }
+
+/// \brief template function stable_sort
+///
+/// range-based version of the stable_sort std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& stable_sort(RandomAccessRange& rng)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::stable_sort(boost::begin(rng), boost::end(rng));
+ return rng;
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng)
+{
+ BOOST_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)
+{
+ BOOST_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred);
+ return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng, BinaryPredicate sort_pred)
+{
+ BOOST_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
+
 #endif // include guard

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-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -57,25 +57,31 @@
         }
     } // namespace range_detail
 
- /// \brief template function swap_ranges
- ///
- /// range-based version of the swap_ranges std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- template< typename SinglePassRange1, typename SinglePassRange2 >
- inline SinglePassRange2&
- swap_ranges(SinglePassRange1& range1, SinglePassRange2& range2)
+ namespace range
     {
- BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange1>));
- BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange2>));
 
- boost::range_detail::swap_ranges_impl(
- boost::begin(range1), boost::end(range1),
- boost::begin(range2), boost::end(range2));
+/// \brief template function swap_ranges
+///
+/// range-based version of the swap_ranges std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+template< typename SinglePassRange1, typename SinglePassRange2 >
+inline SinglePassRange2&
+swap_ranges(SinglePassRange1& range1, SinglePassRange2& range2)
+{
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange1>));
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange2>));
 
- return range2;
- }
+ boost::range_detail::swap_ranges_impl(
+ boost::begin(range1), boost::end(range1),
+ boost::begin(range2), boost::end(range2));
+
+ return range2;
 }
 
+ } // namespace range
+ using range::swap_ranges;
+} // namespace boost
+
 #endif // include guard

Modified: trunk/boost/range/algorithm/transform.hpp
==============================================================================
--- trunk/boost/range/algorithm/transform.hpp (original)
+++ trunk/boost/range/algorithm/transform.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,25 +18,31 @@
 
 namespace boost
 {
- /// \brief template function transform
- ///
- /// range-based version of the transform std algorithm
- ///
- /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
- /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
- /// \pre OutputIterator is a model of the OutputIteratorConcept
- /// \pre UnaryOperation is a model of the UnaryFunctionConcept
- /// \pre BinaryOperation is a model of the BinaryFunctionConcept
- template< class SinglePassRange1,
- class OutputIterator,
- class UnaryOperation >
- inline OutputIterator
- transform(const SinglePassRange1& rng,
- OutputIterator out,
- UnaryOperation fun)
+ namespace range
     {
- return std::transform(boost::begin(rng),boost::end(rng),out,fun);
- }
+
+ /// \brief template function transform
+ ///
+ /// range-based version of the transform std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre OutputIterator is a model of the OutputIteratorConcept
+ /// \pre UnaryOperation is a model of the UnaryFunctionConcept
+ /// \pre BinaryOperation is a model of the BinaryFunctionConcept
+ template< class SinglePassRange1,
+ class OutputIterator,
+ class UnaryOperation >
+ inline OutputIterator
+ transform(const SinglePassRange1& rng,
+ OutputIterator out,
+ UnaryOperation fun)
+ {
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ return std::transform(boost::begin(rng),boost::end(rng),out,fun);
+ }
+
+ } // namespace range
 
     namespace range_detail
     {
@@ -62,24 +68,30 @@
         }
     }
 
- /// \overload
- template< class SinglePassRange1,
- class SinglePassRange2,
- class OutputIterator,
- class BinaryOperation >
- inline OutputIterator
- transform(const SinglePassRange1& rng1,
- const SinglePassRange2& rng2,
- OutputIterator out,
- BinaryOperation fun)
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
- boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
- return range_detail::transform_impl(
- boost::begin(rng1), boost::end(rng1),
- boost::begin(rng2), boost::end(rng2),
- out, fun);
- }
-}
+
+ /// \overload
+ template< class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator,
+ class BinaryOperation >
+ inline OutputIterator
+ transform(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryOperation fun)
+ {
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+ return range_detail::transform_impl(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2),
+ out, fun);
+ }
+
+ } // namespace range
+ using range::transform;
+} // namespace boost
 
 #endif // include guard

Modified: trunk/boost/range/algorithm/unique.hpp
==============================================================================
--- trunk/boost/range/algorithm/unique.hpp (original)
+++ trunk/boost/range/algorithm/unique.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,84 +18,90 @@
 
 namespace boost
 {
- /// \brief template function unique
- ///
- /// range-based version of the unique std algorithm
- ///
- /// \pre Rng meets the requirements for a Forward range
- template< range_return_value re, class ForwardRange >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- unique( ForwardRange& rng )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::
- pack( std::unique( boost::begin(rng),
- boost::end(rng)), rng );
- }
-
- /// \overload
- template< range_return_value re, class ForwardRange >
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
- unique( const ForwardRange& rng )
- {
- boost::function_requires< ForwardRangeConcept<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 )
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::
- 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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<const ForwardRange,re>::
- pack(std::unique(boost::begin(rng), boost::end(rng), pred),
- rng);
- }
-
- /// \overload
- template< class ForwardRange >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type
- unique( ForwardRange& rng )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return boost::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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return boost::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 )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return boost::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::function_requires< ForwardRangeConcept<ForwardRange> >();
- return boost::unique<return_begin_found>(rng, pred);
- }
+
+/// \brief template function unique
+///
+/// range-based version of the unique std algorithm
+///
+/// \pre Rng meets the requirements for a Forward range
+template< range_return_value re, class ForwardRange >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+unique( ForwardRange& rng )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::
+ pack( std::unique( boost::begin(rng),
+ boost::end(rng)), rng );
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+unique( const ForwardRange& rng )
+{
+ BOOST_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 )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::
+ 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_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 >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type
+unique( ForwardRange& rng )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ 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_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 )
+{
+ BOOST_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_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return ::boost::range::unique<return_begin_found>(rng, pred);
+}
+
+ } // namespace range
+ using range::unique;
+} // namespace boost
 
 #endif // include guard

Modified: trunk/boost/range/algorithm/unique_copy.hpp
==============================================================================
--- trunk/boost/range/algorithm/unique_copy.hpp (original)
+++ trunk/boost/range/algorithm/unique_copy.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -17,29 +17,35 @@
 
 namespace boost
 {
- /// \brief template function unique_copy
- ///
- /// range-based version of the unique_copy std algorithm
- ///
- /// \pre SinglePassRange is a model of the SinglePassRangeConcept
- /// \pre OutputIterator is a model of the OutputIteratorConcept
- /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
- template< class SinglePassRange, class OutputIterator >
- inline OutputIterator
- unique_copy( const SinglePassRange& rng, OutputIterator out_it )
- {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::unique_copy(boost::begin(rng), boost::end(rng), out_it);
- }
- /// \overload
- template< class SinglePassRange, class OutputIterator, class BinaryPredicate >
- inline OutputIterator
- unique_copy( const SinglePassRange& rng, OutputIterator out_it,
- BinaryPredicate pred )
+ namespace range
     {
- boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
- return std::unique_copy(boost::begin(rng), boost::end(rng), out_it, pred);
- }
+
+/// \brief template function unique_copy
+///
+/// range-based version of the unique_copy std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre OutputIterator is a model of the OutputIteratorConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class SinglePassRange, class OutputIterator >
+inline OutputIterator
+unique_copy( const SinglePassRange& rng, OutputIterator out_it )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return std::unique_copy(boost::begin(rng), boost::end(rng), out_it);
 }
+/// \overload
+template< class SinglePassRange, class OutputIterator, class BinaryPredicate >
+inline OutputIterator
+unique_copy( const SinglePassRange& rng, OutputIterator out_it,
+ BinaryPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+ return std::unique_copy(boost::begin(rng), boost::end(rng), out_it, pred);
+}
+
+ } // namespace range
+ using range::unique_copy;
+} // namespace boost
 
 #endif // include guard

Modified: trunk/boost/range/algorithm/upper_bound.hpp
==============================================================================
--- trunk/boost/range/algorithm/upper_bound.hpp (original)
+++ trunk/boost/range/algorithm/upper_bound.hpp 2010-04-03 15:14:13 EDT (Sat, 03 Apr 2010)
@@ -18,84 +18,90 @@
 
 namespace boost
 {
- /// \brief template function upper_bound
- ///
- /// range-based version of the upper_bound std algorithm
- ///
- /// \pre ForwardRange is a model of the ForwardRangeConcept
- template< class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
- upper_bound( ForwardRange& rng, Value val )
+ namespace range
     {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::upper_bound(boost::begin(rng), boost::end(rng), val);
- }
- /// \overload
- template< class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
- upper_bound( const ForwardRange& rng, Value val )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::upper_bound(boost::begin(rng), boost::end(rng), val);
- }
- /// \overload
- template< class ForwardRange, class Value, class SortPredicate >
- inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
- upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
- }
- /// \overload
- template< class ForwardRange, class Value, class SortPredicate >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
- upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
- }
- /// \overload
- template< range_return_value re, class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- upper_bound( ForwardRange& rng, Value val )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::
- pack(std::upper_bound(boost::begin(rng), boost::end(rng), val),
- rng);
- }
- /// \overload
- template< range_return_value re, class ForwardRange, class Value >
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
- upper_bound( const ForwardRange& rng, Value val )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<const ForwardRange,re>::
- pack(std::upper_bound(boost::begin(rng), boost::end(rng), val),
- rng);
- }
- /// \overload
- template< range_return_value re, class ForwardRange, class Value,
- class SortPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
- upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<ForwardRange,re>::
- pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred),
- rng);
- }
- /// \overload
- template< range_return_value re, class ForwardRange, class Value,
- class SortPredicate >
- inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
- upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
- {
- boost::function_requires< ForwardRangeConcept<ForwardRange> >();
- return range_return<const ForwardRange,re>::
- pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred),
- rng);
- }
+
+/// \brief template function upper_bound
+///
+/// range-based version of the upper_bound std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+upper_bound( ForwardRange& rng, Value val )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::upper_bound(boost::begin(rng), boost::end(rng), val);
+}
+/// \overload
+template< class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+upper_bound( const ForwardRange& rng, Value val )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::upper_bound(boost::begin(rng), boost::end(rng), val);
+}
+/// \overload
+template< class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
+}
+/// \overload
+template< class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+upper_bound( ForwardRange& rng, Value val )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::
+ pack(std::upper_bound(boost::begin(rng), boost::end(rng), val),
+ rng);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+upper_bound( const ForwardRange& rng, Value val )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return range_return<const ForwardRange,re>::
+ pack(std::upper_bound(boost::begin(rng), boost::end(rng), val),
+ rng);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value,
+ class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+ return range_return<ForwardRange,re>::
+ pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred),
+ rng);
 }
+/// \overload
+template< range_return_value re, class ForwardRange, class Value,
+ class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
+{
+ BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+ return range_return<const ForwardRange,re>::
+ pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred),
+ rng);
+}
+
+ } // namespace range
+ using range::upper_bound;
+} // namespace boost
 
 #endif // include guard


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