SeqAn3
3.4.0-rc.3
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
type_pack_algorithm.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
10
#pragma once
11
12
#include <concepts>
13
#include <
type_traits
>
14
#include <
utility
>
15
16
#include <
seqan3/core/platform.hpp
>
17
18
namespace
seqan3::detail
19
{
20
21
//-----------------------------------------------------------------------------
22
// all_of
23
//-----------------------------------------------------------------------------
24
55
template
<
typename
unary_predicate_t,
typename
... pack_t>
56
requires
(
std::predicate<unary_predicate_t, pack_t>
&& ...)
57
constexpr
bool
all_of
(unary_predicate_t && fn, pack_t &&... args)
58
{
59
return
(fn(
std::forward<pack_t>
(args)) && ...);
60
}
61
62
//-----------------------------------------------------------------------------
63
// for_each
64
//-----------------------------------------------------------------------------
65
93
template
<
typename
unary_function_t,
typename
... pack_t>
94
requires
(
std::invocable<unary_function_t, pack_t>
&& ...)
95
constexpr
void
for_each
(unary_function_t && fn, pack_t &&... args)
96
{
97
(fn(
std::forward<pack_t>
(args)), ...);
98
}
99
100
}
// namespace seqan3::detail
std::all_of
T all_of(T... args)
std::for_each
T for_each(T... args)
platform.hpp
Provides platform and dependency checks.
std::tuple_size_v
T tuple_size_v
type_traits
utility
Hide me
Version:
seqan3
utility
type_pack
detail
type_pack_algorithm.hpp
Generated on Wed Apr 23 2025 13:22:40 for SeqAn3 by
1.9.8