diff options
Diffstat (limited to 'boost/test/utils/algorithm.hpp')
-rw-r--r-- | boost/test/utils/algorithm.hpp | 61 |
1 files changed, 28 insertions, 33 deletions
diff --git a/boost/test/utils/algorithm.hpp b/boost/test/utils/algorithm.hpp index 1ad389dbaf..7a70654718 100644 --- a/boost/test/utils/algorithm.hpp +++ b/boost/test/utils/algorithm.hpp @@ -1,20 +1,18 @@ -// (C) Copyright Gennadiy Rozental 2004-2008. +// (C) Copyright Gennadiy Rozental 2004-2014. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // -// File : $RCSfile$ -// -// Version : $Revision$ -// -// Description : addition to STL algorithms +/// @file +/// Addition to STL algorithms // *************************************************************************** -#ifndef BOOST_ALGORITHM_HPP_062304GER -#define BOOST_ALGORITHM_HPP_062304GER +#ifndef BOOST_TEST_UTILS_ALGORITHM_HPP +#define BOOST_TEST_UTILS_ALGORITHM_HPP +// STL #include <utility> #include <algorithm> // std::find #include <functional> // std::bind1st @@ -29,7 +27,7 @@ namespace unit_test { /// @brief this algorithm search through two collections for first mismatch position that get returned as a pair /// of iterators, first pointing to the mismatch position in first collection, second iterator in second one - +/// /// @param first1 - first collection begin iterator /// @param last1 - first collection end iterator /// @param first2 - second collection begin iterator @@ -52,7 +50,7 @@ mismatch( InputIter1 first1, InputIter1 last1, /// @brief this algorithm search through two collections for first mismatch position that get returned as a pair /// of iterators, first pointing to the mismatch position in first collection, second iterator in second one. This algorithms /// uses supplied predicate for collection elements comparison - +/// /// @param first1 - first collection begin iterator /// @param last1 - first collection end iterator /// @param first2 - second collection begin iterator @@ -75,14 +73,14 @@ mismatch( InputIter1 first1, InputIter1 last1, //____________________________________________________________________________// /// @brief this algorithm search through first collection for first element that does not belong a second one - +/// /// @param first1 - first collection begin iterator /// @param last1 - first collection end iterator /// @param first2 - second collection begin iterator /// @param last2 - second collection end iterator template<class ForwardIterator1, class ForwardIterator2> inline ForwardIterator1 -find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, +find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2 ) { while( first1 != last1 ) { @@ -96,9 +94,9 @@ find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, //____________________________________________________________________________// -/// @brief this algorithm search through first collection for first element that does not satisfy binary +/// @brief this algorithm search through first collection for first element that does not satisfy binary /// predicate in conjunction will any element in second collection - +/// /// @param first1 - first collection begin iterator /// @param last1 - first collection end iterator /// @param first2 - second collection begin iterator @@ -106,8 +104,8 @@ find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, /// @param pred - predicate to be used for search template<class ForwardIterator1, class ForwardIterator2, class Predicate> inline ForwardIterator1 -find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, +find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, + ForwardIterator2 first2, ForwardIterator2 last2, Predicate pred ) { while( first1 != last1 ) { @@ -122,14 +120,14 @@ find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, //____________________________________________________________________________// /// @brief this algorithm search through first collection for last element that belongs to a second one - +/// /// @param first1 - first collection begin iterator /// @param last1 - first collection end iterator /// @param first2 - second collection begin iterator /// @param last2 - second collection end iterator template<class BidirectionalIterator1, class ForwardIterator2> inline BidirectionalIterator1 -find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, +find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2 ) { if( first1 == last1 || first2 == last2 ) @@ -143,9 +141,9 @@ find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, //____________________________________________________________________________// -/// @brief this algorithm search through first collection for last element that satisfy binary +/// @brief this algorithm search through first collection for last element that satisfy binary /// predicate in conjunction will at least one element in second collection - +/// /// @param first1 - first collection begin iterator /// @param last1 - first collection end iterator /// @param first2 - second collection begin iterator @@ -153,8 +151,8 @@ find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, /// @param pred - predicate to be used for search template<class BidirectionalIterator1, class ForwardIterator2, class Predicate> inline BidirectionalIterator1 -find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, +find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, + ForwardIterator2 first2, ForwardIterator2 last2, Predicate pred ) { if( first1 == last1 || first2 == last2 ) @@ -169,14 +167,14 @@ find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, //____________________________________________________________________________// /// @brief this algorithm search through first collection for last element that does not belong to a second one - +/// /// @param first1 - first collection begin iterator /// @param last1 - first collection end iterator /// @param first2 - second collection begin iterator /// @param last2 - second collection end iterator template<class BidirectionalIterator1, class ForwardIterator2> inline BidirectionalIterator1 -find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, +find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2 ) { if( first1 == last1 || first2 == last2 ) @@ -190,9 +188,9 @@ find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, //____________________________________________________________________________// -/// @brief this algorithm search through first collection for last element that does not satisfy binary +/// @brief this algorithm search through first collection for last element that does not satisfy binary /// predicate in conjunction will any element in second collection - +/// /// @param first1 - first collection begin iterator /// @param last1 - first collection end iterator /// @param first2 - second collection begin iterator @@ -200,8 +198,8 @@ find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, /// @param pred - predicate to be used for search template<class BidirectionalIterator1, class ForwardIterator2, class Predicate> inline BidirectionalIterator1 -find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, +find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, + ForwardIterator2 first2, ForwardIterator2 last2, Predicate pred ) { if( first1 == last1 || first2 == last2 ) @@ -216,13 +214,10 @@ find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, //____________________________________________________________________________// } // namespace unit_test - } // namespace boost -//____________________________________________________________________________// - #include <boost/test/detail/enable_warnings.hpp> -#endif // BOOST_ALGORITHM_HPP_062304GER +#endif // BOOST_TEST_UTILS_ALGORITHM_HPP |