Files
jeanlemotan 8297b0b45f First
2024-07-02 18:06:33 +02:00

29 lines
931 B
C++

#pragma once
#include "tl/detail/prologue.h"
#include "tl/iterator.h"
#include <algorithm>
namespace tl
{
//////////////////////////////////////////////////////////////////////////
// find_first_of()
//
// Container-based version of the <algorithm> `std::find_first_of()` function to
// find the first elements in an ordered set within a container.
template <typename SquenceA, typename SequenceB>
auto find_first_of(SquenceA& sequence, SequenceB& subsequence) noexcept -> decltype(tl::begin(sequence));
// Overload of find_first_of() for using a predicate evaluation other than `==` as
// the function's test condition.
template <typename SequenceA, typename SequenceB, typename BinaryPredicate>
auto find_first_of(SequenceA& sequence, SequenceB& subsequence, BinaryPredicate&& p) noexcept -> decltype(tl::begin(sequence));
//////////////////////////////////////////////////////////////////////////
} // end namespace tl