SeqAn3
3.4.0
The Modern C++ library for sequence analysis.
Toggle main menu visibility
Loading...
Searching...
No Matches
type_pack_algorithm.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
9
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::forward
T forward(T... args)
platform.hpp
Provides platform and dependency checks.
type_traits
utility
Hide me
Version:
seqan3
utility
type_pack
detail
type_pack_algorithm.hpp
Generated on
for SeqAn3 by
1.17.0