#ifndef BOOST_MOVE_ALGO_UNIQUE_HPP
#define BOOST_MOVE_ALGO_UNIQUE_HPP
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility_core.hpp>
namespace boost {
namespace movelib {
template<class ForwardIterator, class BinaryPredicate>
ForwardIterator unique(ForwardIterator first, ForwardIterator last, BinaryPredicate pred)
{
if (first != last) {
ForwardIterator next(first);
++next;
for (; next != last; ++next, ++first) {
if (pred(*first, *next)) { while (++next != last)
if (!pred(*first, *next))
*++first = ::boost::move(*next);
break;
}
}
++first;
}
return first;
}
} }
#include <boost/move/detail/config_end.hpp>
#endif