|
Boost Users : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2004-05-23 05:05:33
Hi,
I added several algorithms that extent STL algorithms set. I use them in my
Boost.test development. But since they seems to be generic and IMO should be
present in STL I propose to push them in boost/algorithm.hpp (or under
boost/algorithm). I remember there was a discussion already about these
algorithms. Here is the list (I hope name and spec is self -explanatory):
template <class InputIter1, class InputIter2>
inline std::pair<InputIter1, InputIter2>
mismatch( InputIter1 first1, InputIter1 last1, InputIter2 first2, InputIter2
last2 );
template <class InputIter1, class InputIter2, class Predicate>
inline std::pair<InputIter1, InputIter2>
mismatch( InputIter1 first1, InputIter1 last1,
InputIter2 first2, InputIter2 last2,
Predicate pred );
template<class ForwardIterator1, class ForwardIterator2>
inline ForwardIterator1
find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2
last2 );
template<class ForwardIterator1, class ForwardIterator2, class Predicate>
inline ForwardIterator1
find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
Predicate pred );
template<class BidirectionalIterator1, class ForwardIterator2>
inline BidirectionalIterator1
find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2 )
template<class BidirectionalIterator1, class ForwardIterator2, class
Predicate>
inline BidirectionalIterator1
find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
Predicate pred );
template<class BidirectionalIterator1, class ForwardIterator2>
inline BidirectionalIterator1
find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1
last1,
ForwardIterator2 first2, ForwardIterator2
last2 );
template<class BidirectionalIterator1, class ForwardIterator2, class
Predicate>
inline BidirectionalIterator1
find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1
last1,
ForwardIterator2 first2, ForwardIterator2 last2,
Predicate pred );
Implementation together with doxigen docs is here:
Test is here:
If we don't find this header eligible for review I would like to ask then
for permision to at least put this algorithm in boost namespace (currently
boost::unit_test), for it inconvenience for me to keep it in deep namespace.
Gennadiy.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net