Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86323 - in branches/release: boost/algorithm/cxx14 libs/algorithm/string/test libs/algorithm/test
From: marshall_at_[hidden]
Date: 2013-10-15 11:44:55


Author: marshall
Date: 2013-10-15 11:44:55 EDT (Tue, 15 Oct 2013)
New Revision: 86323
URL: http://svn.boost.org/trac/boost/changeset/86323

Log:
Minor merging; removing tabs from source files

Properties modified:
   branches/release/boost/algorithm/cxx14/equal.hpp (contents, props changed)
   branches/release/boost/algorithm/cxx14/mismatch.hpp (contents, props changed)
   branches/release/libs/algorithm/string/test/find_test.cpp (contents, props changed)
   branches/release/libs/algorithm/string/test/split_test.cpp (contents, props changed)
   branches/release/libs/algorithm/test/iterator_test.hpp (contents, props changed)
Text files modified:
   branches/release/boost/algorithm/cxx14/equal.hpp | 82 ++++++++++++++++++++--------------------
   branches/release/boost/algorithm/cxx14/mismatch.hpp | 19 ++++----
   branches/release/libs/algorithm/string/test/find_test.cpp | 26 ++++++------
   branches/release/libs/algorithm/string/test/split_test.cpp | 4
   branches/release/libs/algorithm/test/iterator_test.hpp | 29 +++++++++----
   5 files changed, 84 insertions(+), 76 deletions(-)

Modified: branches/release/boost/algorithm/cxx14/equal.hpp
==============================================================================
--- branches/release/boost/algorithm/cxx14/equal.hpp Tue Oct 15 11:22:02 2013 (r86322)
+++ branches/release/boost/algorithm/cxx14/equal.hpp 2013-10-15 11:44:55 EDT (Tue, 15 Oct 2013) (r86323)
@@ -12,41 +12,41 @@
 #ifndef BOOST_ALGORITHM_EQUAL_HPP
 #define BOOST_ALGORITHM_EQUAL_HPP
 
-#include <algorithm> // for std::equal
-#include <functional> // for std::equal_to
+#include <algorithm> // for std::equal
+#include <functional> // for std::equal_to
 
 namespace boost { namespace algorithm {
 
 namespace detail {
 
- template <class T1, class T2>
- struct eq : public std::binary_function<T1, T2, bool> {
- bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;}
- };
-
- template <class RandomAccessIterator1, class RandomAccessIterator2, class BinaryPredicate>
- bool equal ( RandomAccessIterator1 first1, RandomAccessIterator1 last1,
- RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred,
- std::random_access_iterator_tag, std::random_access_iterator_tag )
- {
- // Random-access iterators let is check the sizes in constant time
- if ( std::distance ( first1, last1 ) != std::distance ( first2, last2 ))
- return false;
- // If we know that the sequences are the same size, the original version is fine
- return std::equal ( first1, last1, first2, pred );
- }
-
- template <class InputIterator1, class InputIterator2, class BinaryPredicate>
- bool equal ( InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred,
- std::input_iterator_tag, std::input_iterator_tag )
- {
- for (; first1 != last1 && first2 != last2; ++first1, ++first2 )
- if ( !pred(*first1, *first2 ))
- return false;
+ template <class T1, class T2>
+ struct eq : public std::binary_function<T1, T2, bool> {
+ bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;}
+ };
+
+ template <class RandomAccessIterator1, class RandomAccessIterator2, class BinaryPredicate>
+ bool equal ( RandomAccessIterator1 first1, RandomAccessIterator1 last1,
+ RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred,
+ std::random_access_iterator_tag, std::random_access_iterator_tag )
+ {
+ // Random-access iterators let is check the sizes in constant time
+ if ( std::distance ( first1, last1 ) != std::distance ( first2, last2 ))
+ return false;
+ // If we know that the sequences are the same size, the original version is fine
+ return std::equal ( first1, last1, first2, pred );
+ }
+
+ template <class InputIterator1, class InputIterator2, class BinaryPredicate>
+ bool equal ( InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred,
+ std::input_iterator_tag, std::input_iterator_tag )
+ {
+ for (; first1 != last1 && first2 != last2; ++first1, ++first2 )
+ if ( !pred(*first1, *first2 ))
+ return false;
 
- return first1 == last1 && first2 == last2;
- }
+ return first1 == last1 && first2 == last2;
+ }
 }
 
 /// \fn equal ( InputIterator1 first1, InputIterator1 last1,
@@ -63,10 +63,10 @@
 bool equal ( InputIterator1 first1, InputIterator1 last1,
              InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred )
 {
- return boost::algorithm::detail::equal (
- first1, last1, first2, last2, pred,
- typename std::iterator_traits<InputIterator1>::iterator_category (),
- typename std::iterator_traits<InputIterator2>::iterator_category ());
+ return boost::algorithm::detail::equal (
+ first1, last1, first2, last2, pred,
+ typename std::iterator_traits<InputIterator1>::iterator_category (),
+ typename std::iterator_traits<InputIterator2>::iterator_category ());
 }
 
 /// \fn equal ( InputIterator1 first1, InputIterator1 last1,
@@ -81,16 +81,16 @@
 bool equal ( InputIterator1 first1, InputIterator1 last1,
              InputIterator2 first2, InputIterator2 last2 )
 {
- return boost::algorithm::detail::equal (
- first1, last1, first2, last2,
- boost::algorithm::detail::eq<
- typename std::iterator_traits<InputIterator1>::value_type,
- typename std::iterator_traits<InputIterator2>::value_type> (),
- typename std::iterator_traits<InputIterator1>::iterator_category (),
- typename std::iterator_traits<InputIterator2>::iterator_category ());
+ return boost::algorithm::detail::equal (
+ first1, last1, first2, last2,
+ boost::algorithm::detail::eq<
+ typename std::iterator_traits<InputIterator1>::value_type,
+ typename std::iterator_traits<InputIterator2>::value_type> (),
+ typename std::iterator_traits<InputIterator1>::iterator_category (),
+ typename std::iterator_traits<InputIterator2>::iterator_category ());
 }
 
-// There are already range-based versions of these.
+// There are already range-based versions of these.
 
 }} // namespace boost and algorithm
 

Modified: branches/release/boost/algorithm/cxx14/mismatch.hpp
==============================================================================
--- branches/release/boost/algorithm/cxx14/mismatch.hpp Tue Oct 15 11:22:02 2013 (r86322)
+++ branches/release/boost/algorithm/cxx14/mismatch.hpp 2013-10-15 11:44:55 EDT (Tue, 15 Oct 2013) (r86323)
@@ -12,13 +12,11 @@
 #ifndef BOOST_ALGORITHM_MISMATCH_HPP
 #define BOOST_ALGORITHM_MISMATCH_HPP
 
-#include <algorithm> // for std::mismatch
-#include <utility> // for std::pair
+#include <algorithm> // for std::mismatch
+#include <utility> // for std::pair
 
 namespace boost { namespace algorithm {
 
-template <class InputIterator1, class InputIterator2, class BinaryPredicate>
-
 /// \fn mismatch ( InputIterator1 first1, InputIterator1 last1,
 /// InputIterator2 first2, InputIterator2 last2,
 /// BinaryPredicate pred )
@@ -29,10 +27,11 @@
 /// \param first2 The start of the second range.
 /// \param last2 One past the end of the second range.
 /// \param pred A predicate for comparing the elements of the ranges
+template <class InputIterator1, class InputIterator2, class BinaryPredicate>
 std::pair<InputIterator1, InputIterator2> mismatch (
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- BinaryPredicate pred )
+ InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ BinaryPredicate pred )
 {
     for (; first1 != last1 && first2 != last2; ++first1, ++first2)
         if ( !pred ( *first1, *first2 ))
@@ -50,8 +49,8 @@
 /// \param last2 One past the end of the second range.
 template <class InputIterator1, class InputIterator2>
 std::pair<InputIterator1, InputIterator2> mismatch (
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2 )
+ InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2 )
 {
     for (; first1 != last1 && first2 != last2; ++first1, ++first2)
         if ( *first1 != *first2 )
@@ -59,7 +58,7 @@
     return std::pair<InputIterator1, InputIterator2>(first1, first2);
 }
 
-// There are already range-based versions of these.
+// There are already range-based versions of these.
 
 }} // namespace boost and algorithm
 

Modified: branches/release/libs/algorithm/string/test/find_test.cpp
==============================================================================
--- branches/release/libs/algorithm/string/test/find_test.cpp Tue Oct 15 11:22:02 2013 (r86322)
+++ branches/release/libs/algorithm/string/test/find_test.cpp 2013-10-15 11:44:55 EDT (Tue, 15 Oct 2013) (r86323)
@@ -181,20 +181,20 @@
         ( (cv_result.begin()-str1.begin()) == 3) &&
         ( (cv_result.end()-str1.begin()) == 6) );
 
- string s1("abc def ghi jkl");
- find_iterator<string::iterator> fEnd;
+ string s1("abc def ghi jkl");
+ find_iterator<string::iterator> fEnd;
 
- find_iterator<string::iterator> fxIt = make_find_iterator(s1,
- token_finder(is_alnum(), token_compress_on));
- BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("abc")));
- ++fxIt;
- BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("def")));
- ++fxIt;
- BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("ghi")));
- ++fxIt;
- BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("jkl")));
- ++fxIt;
- BOOST_CHECK(fxIt == fEnd);
+ find_iterator<string::iterator> fxIt = make_find_iterator(s1,
+ token_finder(is_alnum(), token_compress_on));
+ BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("abc")));
+ ++fxIt;
+ BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("def")));
+ ++fxIt;
+ BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("ghi")));
+ ++fxIt;
+ BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("jkl")));
+ ++fxIt;
+ BOOST_CHECK(fxIt == fEnd);
 
     nc_result=find_token( str1, is_any_of("abc"), token_compress_off );
     BOOST_CHECK(

Modified: branches/release/libs/algorithm/string/test/split_test.cpp
==============================================================================
--- branches/release/libs/algorithm/string/test/split_test.cpp Tue Oct 15 11:22:02 2013 (r86322)
+++ branches/release/libs/algorithm/string/test/split_test.cpp 2013-10-15 11:44:55 EDT (Tue, 15 Oct 2013) (r86323)
@@ -46,7 +46,7 @@
     const char* pch1="xx-abc--xx-abb";
     vector<string> tokens;
     vector< vector<int> > vtokens;
-
+
     // find_all tests
     find_all(
         tokens,
@@ -182,7 +182,7 @@
     BOOST_CHECK(siter==split_iterator<string::iterator>());
 
 // Make sure we work with forward iterators
-// See bug #7989
+// See bug #7989
     list<char> l1;
     find_iterator<list<char>::iterator> liter=make_find_iterator(l1, first_finder("xx"));
 }

Modified: branches/release/libs/algorithm/test/iterator_test.hpp
==============================================================================
--- branches/release/libs/algorithm/test/iterator_test.hpp Tue Oct 15 11:22:02 2013 (r86322)
+++ branches/release/libs/algorithm/test/iterator_test.hpp 2013-10-15 11:44:55 EDT (Tue, 15 Oct 2013) (r86323)
@@ -1,12 +1,21 @@
+/*
+ Copyright (c) Marshall Clow 2013.
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+ For more information, see http://www.boost.org
+*/
+
 #ifndef ITERATOR_TEST_H
 #define ITERATOR_TEST_H
 
 /*
- A set of iterator adapters for constructing test cases
- From an iterator (or a pointer), you can make any class of iterator.
- Assuming you want to degrade the capabilities.
-
- Modeled closely on work that Howard Hinnant did for libc++.
+ A set of iterator adapters for constructing test cases
+ From an iterator (or a pointer), you can make any class of iterator.
+ Assuming you want to degrade the capabilities.
+
+ Modeled closely on work that Howard Hinnant did for libc++.
 */
 
 #include <iterator>
@@ -269,10 +278,10 @@
 private:
     It it_;
     template <typename U> friend class output_iterator;
- };
-
-// No comparison operators for output iterators
-
+ };
+
+// No comparison operators for output iterators
+
 
 // == Get the base of an iterator; used for comparisons ==
 template <typename Iter>
@@ -290,7 +299,7 @@
 template <typename Iter>
 inline Iter base(random_access_iterator<Iter> i) { return i.base(); }
 
-template <typename Iter> // everything else
+template <typename Iter> // everything else
 inline Iter base(Iter i) { return i; }
 
 #endif // ITERATORS_H


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