in include/range/v3/algorithm/unique_copy.hpp [73:95]
static tagged_pair<tag::in(I), tag::out(O)> impl(I begin, S end, O out, C pred_, P proj_,
concepts::ForwardIterator*, std::false_type)
{
auto &&pred = as_function(pred_);
auto &&proj = as_function(proj_);
if(begin != end)
{
I tmp = begin;
*out = *tmp;
++out;
while(++begin != end)
{
auto &&x = *begin;
if(!pred(proj(*tmp), proj(x)))
{
*out = (decltype(x) &&) x;
++out;
tmp = begin;
}
}
}
return {begin, out};
}