Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78557 - in branches/release: boost/algorithm/cxx11 boost/algorithm/string libs/algorithm/string/doc
From: marshall_at_[hidden]
Date: 2012-05-23 12:25:49


Author: marshall
Date: 2012-05-23 12:25:48 EDT (Wed, 23 May 2012)
New Revision: 78557
URL: http://svn.boost.org/trac/boost/changeset/78557

Log:
Merged changes for Boost.Algorithm to release; Fixes #6596; Fixes #6689; Fixes #3215; Fixes #6840
Properties modified:
   branches/release/boost/algorithm/cxx11/all_of.hpp (contents, props changed)
   branches/release/boost/algorithm/cxx11/any_of.hpp (contents, props changed)
   branches/release/boost/algorithm/cxx11/none_of.hpp (contents, props changed)
   branches/release/boost/algorithm/cxx11/partition_copy.hpp (contents, props changed)
   branches/release/boost/algorithm/cxx11/partition_point.hpp (contents, props changed)
   branches/release/boost/algorithm/string/find.hpp (contents, props changed)
   branches/release/libs/algorithm/string/doc/usage.xml (contents, props changed)
Text files modified:
   branches/release/boost/algorithm/cxx11/all_of.hpp | 1 +
   branches/release/boost/algorithm/cxx11/any_of.hpp | 1 +
   branches/release/boost/algorithm/cxx11/none_of.hpp | 1 +
   branches/release/boost/algorithm/cxx11/partition_copy.hpp | 1 +
   branches/release/boost/algorithm/cxx11/partition_point.hpp | 2 +-
   branches/release/boost/algorithm/string/find.hpp | 8 ++++----
   branches/release/libs/algorithm/string/doc/usage.xml | 13 +++++++++----
   7 files changed, 18 insertions(+), 9 deletions(-)

Modified: branches/release/boost/algorithm/cxx11/all_of.hpp
==============================================================================
--- branches/release/boost/algorithm/cxx11/all_of.hpp (original)
+++ branches/release/boost/algorithm/cxx11/all_of.hpp 2012-05-23 12:25:48 EDT (Wed, 23 May 2012)
@@ -12,6 +12,7 @@
 #ifndef BOOST_ALGORITHM_ALL_OF_HPP
 #define BOOST_ALGORITHM_ALL_OF_HPP
 
+#include <algorithm> // for std::all_of, if available
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
 

Modified: branches/release/boost/algorithm/cxx11/any_of.hpp
==============================================================================
--- branches/release/boost/algorithm/cxx11/any_of.hpp (original)
+++ branches/release/boost/algorithm/cxx11/any_of.hpp 2012-05-23 12:25:48 EDT (Wed, 23 May 2012)
@@ -14,6 +14,7 @@
 #ifndef BOOST_ALGORITHM_ANY_OF_HPP
 #define BOOST_ALGORITHM_ANY_OF_HPP
 
+#include <algorithm> // for std::any_of, if available
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
 

Modified: branches/release/boost/algorithm/cxx11/none_of.hpp
==============================================================================
--- branches/release/boost/algorithm/cxx11/none_of.hpp (original)
+++ branches/release/boost/algorithm/cxx11/none_of.hpp 2012-05-23 12:25:48 EDT (Wed, 23 May 2012)
@@ -12,6 +12,7 @@
 #ifndef BOOST_ALGORITHM_NONE_OF_HPP
 #define BOOST_ALGORITHM_NONE_OF_HPP
 
+#include <algorithm> // for std::none_of, if available
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
 

Modified: branches/release/boost/algorithm/cxx11/partition_copy.hpp
==============================================================================
--- branches/release/boost/algorithm/cxx11/partition_copy.hpp (original)
+++ branches/release/boost/algorithm/cxx11/partition_copy.hpp 2012-05-23 12:25:48 EDT (Wed, 23 May 2012)
@@ -12,6 +12,7 @@
 #ifndef BOOST_ALGORITHM_PARTITION_COPY_HPP
 #define BOOST_ALGORITHM_PARTITION_COPY_HPP
 
+#include <algorithm> // for std::partition_copy, if available
 #include <utility> // for make_pair
 
 #include <boost/range/begin.hpp>

Modified: branches/release/boost/algorithm/cxx11/partition_point.hpp
==============================================================================
--- branches/release/boost/algorithm/cxx11/partition_point.hpp (original)
+++ branches/release/boost/algorithm/cxx11/partition_point.hpp 2012-05-23 12:25:48 EDT (Wed, 23 May 2012)
@@ -20,7 +20,7 @@
 namespace boost { namespace algorithm {
 
 #if __cplusplus >= 201103L
-// Use the C++11 versions of iota if it is available
+// Use the C++11 versions of partition_point if it is available
 using std::partition_point; // Section 25.3.13
 #else
 /// \fn partition_point ( ForwardIterator first, ForwardIterator last, Predicate p )

Modified: branches/release/boost/algorithm/string/find.hpp
==============================================================================
--- branches/release/boost/algorithm/string/find.hpp (original)
+++ branches/release/boost/algorithm/string/find.hpp 2012-05-23 12:25:48 EDT (Wed, 23 May 2012)
@@ -228,13 +228,13 @@
         //! Find head algorithm
         /*!
             Get the head of the input. Head is a prefix of the string of the
- given size. If the input is shorter then required, whole input if considered
+ given size. If the input is shorter then required, whole input is considered
             to be the head.
 
             \param Input An input string
             \param N Length of the head
                 For N>=0, at most N characters are extracted.
- For N<0, size(Input)-|N| characters are extracted.
+ For N<0, at most size(Input)-|N| characters are extracted.
             \return
                 An \c iterator_range delimiting the match.
                 Returned iterator is either \c Range1T::iterator or
@@ -258,13 +258,13 @@
         //! Find tail algorithm
         /*!
             Get the tail of the input. Tail is a suffix of the string of the
- given size. If the input is shorter then required, whole input if considered
+ given size. If the input is shorter then required, whole input is considered
             to be the tail.
 
             \param Input An input string
             \param N Length of the tail.
                 For N>=0, at most N characters are extracted.
- For N<0, size(Input)-|N| characters are extracted.
+ For N<0, at most size(Input)-|N| characters are extracted.
             \return
                 An \c iterator_range delimiting the match.
                 Returned iterator is either \c RangeT::iterator or

Modified: branches/release/libs/algorithm/string/doc/usage.xml
==============================================================================
--- branches/release/libs/algorithm/string/doc/usage.xml (original)
+++ branches/release/libs/algorithm/string/doc/usage.xml 2012-05-23 12:25:48 EDT (Wed, 23 May 2012)
@@ -135,12 +135,12 @@
         &lt;&lt; endl; // prints "command.com is an executable"
     
     //..
- char text1[]="hello world!";
+ char text1[]="hello";
     cout
         &lt;&lt; text1
- &lt;&lt; (all( text1, is_lower() )? "is": "is not")
+ &lt;&lt; (all( text1, is_lower() )? " is": " is not")
         &lt;&lt; " written in the lower case"
- &lt;&lt; endl; // prints "hello world! is written in the lower case"
+ &lt;&lt; endl; // prints "hello is written in the lower case"
         </programlisting>
         <para>
             The predicates determine whether if a substring is contained in the input string
@@ -150,6 +150,11 @@
             <headername>boost/algorithm/string/predicate.hpp</headername> for more details.
         </para>
         <para>
+ Note that if we had used "hello world" as the input to the test, it would have
+ output "hello world is not written in the lower case" because the space in the
+ input string is not a lower case letter.
+ </para>
+ <para>
             In addition the algorithm <functionname>all()</functionname> checks
             all elements of a container to satisfy a condition specified by a predicate.
             This predicate can be any unary predicate, but the library provides a bunch of
@@ -163,7 +168,7 @@
         <title>Trimming</title>
         
         <para>
- When parsing the input from a user, strings usually have unwanted leading or trailing
+ When parsing the input from a user, strings often have unwanted leading or trailing
             characters. To get rid of them, we need trim functions:
         </para>
         <programlisting>


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