First
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "tl/detail/prologue.h"
|
||||
#include "tl/iterator.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
namespace tl
|
||||
{
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// adjacent_find()
|
||||
//
|
||||
// Container-based version of the <algorithm> `std::adjacent_find()` function to
|
||||
// find equal adjacent elements within a container.
|
||||
template <typename Squence>
|
||||
auto adjacent_find(Squence& sequence) noexcept -> decltype(tl::begin(sequence));
|
||||
|
||||
// Overload of adjacent_find() for using a predicate evaluation other than `==` as
|
||||
// the function's test condition.
|
||||
template <typename Sequence, typename BinaryPredicate>
|
||||
auto adjacent_find(Sequence& sequence, BinaryPredicate&& p) noexcept -> decltype(tl::begin(sequence));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
} // end namespace tl
|
||||
|
||||
#include "tl/detail/algorithm/adjacent_find.inl"
|
||||
Reference in New Issue
Block a user