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
inline std::pair
mismatch( InputIter1 first1, InputIter1 last1, InputIter2 first2, InputIter2
last2 );
template
inline std::pair
mismatch( InputIter1 first1, InputIter1 last1,
InputIter2 first2, InputIter2 last2,
Predicate pred );
template
inline ForwardIterator1
find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2
last2 );
template
inline ForwardIterator1
find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
Predicate pred );
template
inline BidirectionalIterator1
find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2 )
template
inline BidirectionalIterator1
find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
Predicate pred );
template
inline BidirectionalIterator1
find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1
last1,
ForwardIterator2 first2, ForwardIterator2
last2 );
template
inline BidirectionalIterator1
find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1
last1,
ForwardIterator2 first2, ForwardIterator2 last2,
Predicate pred );
Implementation together with doxigen docs is here:
http://tinyurl.com/35pfj
Test is here:
http://tinyurl.com/yvlgu
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.