Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61028 - in trunk: boost/range/algorithm libs/range/doc/reference/algorithm libs/range/test libs/range/test/algorithm_test
From: neil_at_[hidden]
Date: 2010-04-03 17:00:57


Author: neilgroves
Date: 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
New Revision: 61028
URL: http://svn.boost.org/trac/boost/changeset/61028

Log:
Boost.Range fixes for compilers that were having problems picking between const and mutable range overloads of range algorithms.
Text files modified:
   trunk/boost/range/algorithm/find.hpp | 18 -------
   trunk/boost/range/algorithm/find_end.hpp | 59 ------------------------
   trunk/boost/range/algorithm/find_first_of.hpp | 55 -----------------------
   trunk/boost/range/algorithm/find_if.hpp | 18 -------
   trunk/boost/range/algorithm/lower_bound.hpp | 36 ---------------
   trunk/boost/range/algorithm/upper_bound.hpp | 36 ---------------
   trunk/libs/range/doc/reference/algorithm/find.qbk | 14 -----
   trunk/libs/range/doc/reference/algorithm/find_end.qbk | 32 -------------
   trunk/libs/range/doc/reference/algorithm/find_first_of.qbk | 30 ------------
   trunk/libs/range/doc/reference/algorithm/find_if.qbk | 12 -----
   trunk/libs/range/doc/reference/algorithm/lower_bound.qbk | 12 -----
   trunk/libs/range/doc/reference/algorithm/upper_bound.qbk | 14 -----
   trunk/libs/range/test/algorithm_test/find.cpp | 4 +
   trunk/libs/range/test/sub_range.cpp | 94 +++++++++++++++++++--------------------
   14 files changed, 54 insertions(+), 380 deletions(-)

Modified: trunk/boost/range/algorithm/find.hpp
==============================================================================
--- trunk/boost/range/algorithm/find.hpp (original)
+++ trunk/boost/range/algorithm/find.hpp 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -33,14 +33,6 @@
     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
 
@@ -54,16 +46,6 @@
         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;

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 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -30,7 +30,7 @@
 /// \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)
+find_end(ForwardRange1 & rng1, const ForwardRange2& rng2)
 {
     BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
     BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
@@ -40,22 +40,9 @@
 }
 
 /// \overload
-template< class ForwardRange1, class ForwardRange2 >
-inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
-find_end(ForwardRange1 const & rng1, ForwardRange2 const & rng2)
-{
-
- 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));
-}
-
-/// \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)
+find_end(ForwardRange1 & rng1, const ForwardRange2& rng2, BinaryPredicate pred)
 {
     BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
     BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
@@ -65,18 +52,6 @@
 }
 
 /// \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)
@@ -91,20 +66,6 @@
 }
 
 /// \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
@@ -119,22 +80,6 @@
              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

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 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -40,18 +40,6 @@
 }
 
 /// \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));
-}
-
-/// \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)
@@ -63,19 +51,6 @@
                               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 >
@@ -92,20 +67,6 @@
 }
 
 /// \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<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
@@ -121,22 +82,6 @@
              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

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 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -34,14 +34,6 @@
     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
 
@@ -55,16 +47,6 @@
         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;

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 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -34,14 +34,6 @@
     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 )
@@ -50,14 +42,6 @@
     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 )
@@ -68,16 +52,6 @@
              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 )
@@ -87,16 +61,6 @@
         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;

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 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -34,13 +34,6 @@
     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
@@ -50,14 +43,6 @@
     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 )
@@ -68,16 +53,6 @@
              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
@@ -88,17 +63,6 @@
         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;

Modified: trunk/libs/range/doc/reference/algorithm/find.qbk
==============================================================================
--- trunk/libs/range/doc/reference/algorithm/find.qbk (original)
+++ trunk/libs/range/doc/reference/algorithm/find.qbk 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -7,10 +7,6 @@
 typename range_iterator<SinglePassRange>::type
 find(SinglePassRange& rng, Value val);
 
-template<class SinglePassRange, class Value>
-typename range_iterator<const SinglePassRange>::type
-find(const SinglePassRange& rng, Value val);
-
 template<
     range_return_value re,
     class SinglePassRange,
@@ -18,20 +14,12 @@
>
 typename range_return<SinglePassRange, re>::type
 find(SinglePassRange& rng, Value val);
-
-template<
- range_return_value re,
- class SinglePassRange,
- class Value
- >
-typename range_return<const SinglePassRange, re>::type
-find(const SinglePassRange& rng, Value val);
 ``
 
 [heading Description]
 
 The versions of `find` that return an iterator, returns the first iterator in the range `rng` such that `*i == value`. `end(rng)` is returned if no such iterator exists.
-The versions of find that return a `range_return`, defines `found` in the same manner as the returned iterator described above.
+The versions of find that return a `range_return`, defines `found` in the same manner as the returned iterator described above.
 
 [heading Definition]
 

Modified: trunk/libs/range/doc/reference/algorithm/find_end.qbk
==============================================================================
--- trunk/libs/range/doc/reference/algorithm/find_end.qbk (original)
+++ trunk/libs/range/doc/reference/algorithm/find_end.qbk 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -7,10 +7,6 @@
 typename range_iterator<ForwardRange1>::type
 find_end(ForwardRange1& rng1, const ForwardRange2& rng2);
 
-template<class ForwardRange1, class ForwardRange2>
-typename range_iterator<const ForwardRange1>::type
-find_end(const ForwardRange1& rng1, const ForwardRange2& rng2);
-
 template<
     class ForwardRange1,
     class ForwardRange2,
@@ -20,15 +16,6 @@
 find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
 
 template<
- class ForwardRange1,
- class ForwardRange2,
- class BinaryPredicate
- >
-typename range_iterator<const ForwardRange1>::type
-find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
-
-
-template<
     range_return_value re,
     class ForwardRange1,
     class ForwardRange2
@@ -39,35 +26,18 @@
 template<
     range_return_value re,
     class ForwardRange1,
- class ForwardRange2
- >
-typename range_return<const ForwardRange1, re>::type
-find_end(const ForwardRange1& rng1, const ForwardRange2& rng2);
-
-template<
- range_return_value re,
- class ForwardRange1,
     class ForwardRange2,
     class BinaryPredicate
>
 typename range_return<ForwardRange1, re>::type
 find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
-
-template<
- range_return_value re,
- class ForwardRange1,
- class ForwardRange2,
- class BinaryPredicate
- >
-typename range_return<const ForwardRange1, re>::type
-find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
 ``
 
 [heading Description]
 
 The versions of `find_end` that return an iterator, return an iterator to the beginning of the last sub-sequence equal to `rng2` within `rng1`.
 Equality is determined by `operator==` for non-predicate versions of `find_end`, and by satisfying `pred` in the predicate versions. The versions of `find_end` that return a `range_return`, defines `found` in the same manner as the returned iterator described above.
-
+
 [heading Definition]
 
 Defined in the header file `boost/range/algorithm/find_end.hpp`

Modified: trunk/libs/range/doc/reference/algorithm/find_first_of.qbk
==============================================================================
--- trunk/libs/range/doc/reference/algorithm/find_first_of.qbk (original)
+++ trunk/libs/range/doc/reference/algorithm/find_first_of.qbk 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -7,10 +7,6 @@
 typename range_iterator<SinglePassRange1>::type
 find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2);
 
-template<class SinglePassRange1, class ForwardRange2>
-typename range_iterator<const SinglePassRange1>::type
-find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2);
-
 template<
     class SinglePassRange1,
     class ForwardRange2,
@@ -20,15 +16,6 @@
 find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
 
 template<
- class SinglePassRange1,
- class ForwardRange2,
- class BinaryPredicate
- >
-typename range_iterator<const SinglePassRange1>::type
-find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
-
-
-template<
     range_return_value re,
     class SinglePassRange1,
     class ForwardRange2
@@ -39,28 +26,11 @@
 template<
     range_return_value re,
     class SinglePassRange1,
- class ForwardRange2
- >
-typename range_return<const SinglePassRange1, re>::type
-find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2);
-
-template<
- range_return_value re,
- class SinglePassRange1,
     class ForwardRange2,
     class BinaryPredicate
>
 typename range_return<SinglePassRange1, re>::type
 find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
-
-template<
- range_return_value re,
- class SinglePassRange1,
- class ForwardRange2,
- class BinaryPredicate
- >
-typename range_return<const SinglePassRange1, re>::type
-find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
 ``
 
 [heading Description]

Modified: trunk/libs/range/doc/reference/algorithm/find_if.qbk
==============================================================================
--- trunk/libs/range/doc/reference/algorithm/find_if.qbk (original)
+++ trunk/libs/range/doc/reference/algorithm/find_if.qbk 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -7,10 +7,6 @@
 typename range_iterator<SinglePassRange>::type
 find_if(SinglePassRange& rng, UnaryPredicate pred);
 
-template<class SinglePassRange, class UnaryPredicate>
-typename range_iterator<const SinglePassRange>::type
-find_if(const SinglePassRange& rng, UnaryPredicate pred);
-
 template<
     range_return_value re,
     class SinglePassRange,
@@ -18,14 +14,6 @@
>
 typename range_return<SinglePassRange, re>::type
 find_if(SinglePassRange& rng, UnaryPredicate pred);
-
-template<
- range_return_value re,
- class SinglePassRange,
- class UnaryPredicate
- >
-typename range_return<const SinglePassRange, re>::type
-find_if(const SinglePassRange& rng, UnaryPredicate pred);
 ``
 
 [heading Description]

Modified: trunk/libs/range/doc/reference/algorithm/lower_bound.qbk
==============================================================================
--- trunk/libs/range/doc/reference/algorithm/lower_bound.qbk (original)
+++ trunk/libs/range/doc/reference/algorithm/lower_bound.qbk 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -7,10 +7,6 @@
 typename range_iterator<ForwardRange>::type
 lower_bound(ForwardRange& rng, Value val);
 
-template<class ForwardRange, class Value>
-typename range_iterator<const ForwardRange>::type
-lower_bound(const ForwardRange& rng, Value val);
-
 template<
     range_return_value re,
     class ForwardRange,
@@ -18,14 +14,6 @@
>
 typename range_return<ForwardRange, re>::type
 lower_bound(ForwardRange& rng, Value val);
-
-template<
- range_return_value re,
- class ForwardRange,
- class Value
- >
-typename range_return<const ForwardRange, re>::type
-lower_bound(const ForwardRange& rng, Value val);
 ``
 
 [heading Description]

Modified: trunk/libs/range/doc/reference/algorithm/upper_bound.qbk
==============================================================================
--- trunk/libs/range/doc/reference/algorithm/upper_bound.qbk (original)
+++ trunk/libs/range/doc/reference/algorithm/upper_bound.qbk 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -7,10 +7,6 @@
 typename range_iterator<ForwardRange>::type
 upper_bound(ForwardRange& rng, Value val);
 
-template<class ForwardRange, class Value>
-typename range_iterator<const ForwardRange>::type
-upper_bound(const ForwardRange& rng, Value val);
-
 template<
     range_return_value re,
     class ForwardRange,
@@ -18,14 +14,6 @@
>
 typename range_return<ForwardRange, re>::type
 upper_bound(ForwardRange& rng, Value val);
-
-template<
- range_return_value re,
- class ForwardRange,
- class Value
- >
-typename range_return<const ForwardRange, re>::type
-upper_bound(const ForwardRange& rng, Value val);
 ``
 
 [heading Description]
@@ -36,7 +24,7 @@
 
 `end(rng)` is returned if no such iterator exists.
 
-The versions of `upper_bound` that return a `range_return`, defines `found` in the same manner as the returned iterator described above.
+The versions of `upper_bound` that return a `range_return`, defines `found` in the same manner as the returned iterator described above.
 
 [heading Definition]
 

Modified: trunk/libs/range/test/algorithm_test/find.cpp
==============================================================================
--- trunk/libs/range/test/algorithm_test/find.cpp (original)
+++ trunk/libs/range/test/algorithm_test/find.cpp 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -86,6 +86,10 @@
             test_find_container< const std::vector<int> >();
             test_find_container< const std::list<int> >();
             test_find_container< const std::deque<int> >();
+
+ std::vector<int> vi;
+ const std::vector<int>& cvi = vi;
+ std::vector<int>::const_iterator it = boost::find(vi, 0);
         }
     }
 }

Modified: trunk/libs/range/test/sub_range.cpp
==============================================================================
--- trunk/libs/range/test/sub_range.cpp (original)
+++ trunk/libs/range/test/sub_range.cpp 2010-04-03 17:00:56 EDT (Sat, 03 Apr 2010)
@@ -17,51 +17,48 @@
 #endif
 
 #include <boost/range/sub_range.hpp>
-#include <boost/range/as_literal.hpp>
+#include <boost/range/as_literal.hpp>
 #include <boost/test/test_tools.hpp>
 #include <iostream>
 #include <string>
 #include <vector>
 
-using namespace boost;
-using namespace std;
-
 void check_sub_range()
 {
-
- typedef string::iterator iterator;
- typedef string::const_iterator const_iterator;
- typedef iterator_range<iterator> irange;
- typedef iterator_range<const_iterator> cirange;
- string str = "hello world";
- const string cstr = "const world";
- irange r = make_iterator_range( str );
- r = make_iterator_range( str.begin(), str.end() );
- cirange r2 = make_iterator_range( cstr );
- r2 = make_iterator_range( cstr.begin(), cstr.end() );
- r2 = make_iterator_range( str );
-
- typedef sub_range<string> srange;
- typedef sub_range<const string> csrange;
+
+ typedef std::string::iterator iterator;
+ typedef std::string::const_iterator const_iterator;
+ typedef boost::iterator_range<iterator> irange;
+ typedef boost::iterator_range<const_iterator> cirange;
+ std::string str = "hello world";
+ const std::string cstr = "const world";
+ irange r = boost::make_iterator_range( str );
+ r = boost::make_iterator_range( str.begin(), str.end() );
+ cirange r2 = boost::make_iterator_range( cstr );
+ r2 = boost::make_iterator_range( cstr.begin(), cstr.end() );
+ r2 = boost::make_iterator_range( str );
+
+ typedef boost::sub_range<std::string> srange;
+ typedef boost::sub_range<const std::string> csrange;
     srange s = r;
     BOOST_CHECK( r == r );
     BOOST_CHECK( s == r );
- s = make_iterator_range( str );
+ s = boost::make_iterator_range( str );
     csrange s2 = r;
     s2 = r2;
- s2 = make_iterator_range( cstr );
+ s2 = boost::make_iterator_range( cstr );
     BOOST_CHECK( r2 == r2 );
     BOOST_CHECK( s2 != r2 );
- s2 = make_iterator_range( str );
+ s2 = boost::make_iterator_range( str );
     BOOST_CHECK( !(s != s) );
-
+
     BOOST_CHECK( r.begin() == s.begin() );
     BOOST_CHECK( r2.begin()== s2.begin() );
     BOOST_CHECK( r.end() == s.end() );
     BOOST_CHECK( r2.end() == s2.end() );
     BOOST_CHECK_EQUAL( r.size(), s.size() );
     BOOST_CHECK_EQUAL( r2.size(), s2.size() );
-
+
 //#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
 // if( !(bool)r )
 // BOOST_CHECK( false );
@@ -70,7 +67,7 @@
 // if( !(bool)s )
 // BOOST_CHECK( false );
 // if( !(bool)s2 )
-// BOOST_CHECK( false );
+// BOOST_CHECK( false );
 //#else
     if( !r )
         BOOST_CHECK( false );
@@ -80,13 +77,13 @@
         BOOST_CHECK( false );
     if( !s2 )
         BOOST_CHECK( false );
-//#endif
+//#endif
+
+ std::cout << r << r2 << s << s2;
+
+ std::string res = boost::copy_range<std::string>( r );
+ BOOST_CHECK_EQUAL_COLLECTIONS( res.begin(), res.end(), r.begin(), r.end() );
 
- cout << r << r2 << s << s2;
-
- string res = copy_range<string>( r );
- BOOST_CHECK( equal( res.begin(), res.end(), r.begin() ) );
-
     r.empty();
     s.empty();
     r.size();
@@ -107,44 +104,43 @@
     //BOOST_CHECK( empty( singular_srange ) );
     //
 
- srange rr = make_iterator_range( str );
+ srange rr = boost::make_iterator_range( str );
     BOOST_CHECK( rr.equal( r ) );
 
- rr = make_iterator_range( str.begin(), str.begin() + 5 );
- BOOST_CHECK( rr == as_literal("hello") );
- BOOST_CHECK( rr != as_literal("hell") );
- BOOST_CHECK( rr < as_literal("hello dude") );
- BOOST_CHECK( as_literal("hello") == rr );
- BOOST_CHECK( as_literal("hell") != rr );
- BOOST_CHECK( ! (as_literal("hello dude") < rr ) );
-
+ rr = boost::make_iterator_range( str.begin(), str.begin() + 5 );
+ BOOST_CHECK( rr == boost::as_literal("hello") );
+ BOOST_CHECK( rr != boost::as_literal("hell") );
+ BOOST_CHECK( rr < boost::as_literal("hello dude") );
+ BOOST_CHECK( boost::as_literal("hello") == rr );
+ BOOST_CHECK( boost::as_literal("hell") != rr );
+ BOOST_CHECK( ! (boost::as_literal("hello dude") < rr ) );
+
     irange rrr = rr;
     BOOST_CHECK( rrr == rr );
     BOOST_CHECK( !( rrr != rr ) );
     BOOST_CHECK( !( rrr < rr ) );
 
- const irange cr = make_iterator_range( str );
+ const irange cr = boost::make_iterator_range( str );
     BOOST_CHECK_EQUAL( cr.front(), 'h' );
     BOOST_CHECK_EQUAL( cr.back(), 'd' );
     BOOST_CHECK_EQUAL( cr[1], 'e' );
     BOOST_CHECK_EQUAL( cr(1), 'e' );
 
- rrr = make_iterator_range( str, 1, -1 );
- BOOST_CHECK( rrr == as_literal("ello worl") );
- rrr = make_iterator_range( rrr, -1, 1 );
+ rrr = boost::make_iterator_range( str, 1, -1 );
+ BOOST_CHECK( rrr == boost::as_literal("ello worl") );
+ rrr = boost::make_iterator_range( rrr, -1, 1 );
     BOOST_CHECK( rrr == str );
     rrr.front() = 'H';
     rrr.back() = 'D';
     rrr[1] = 'E';
- BOOST_CHECK( rrr == as_literal("HEllo worlD") );
-}
+ BOOST_CHECK( rrr == boost::as_literal("HEllo worlD") );
+}
 
 #include <boost/test/unit_test.hpp>
-using boost::unit_test::test_suite;
 
-test_suite* init_unit_test_suite( int argc, char* argv[] )
+boost::unit_test::test_suite* init_unit_test_suite( int argc, char* argv[] )
 {
- test_suite* test = BOOST_TEST_SUITE( "Range Test Suite" );
+ boost::unit_test::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite" );
 
     test->add( BOOST_TEST_CASE( &check_sub_range ) );
 


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