Loading...
Searching...
No Matches
type_pack_algorithm.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <concepts>
#include <type_traits>
#include <utility>
#include <seqan3/core/platform.hpp>
namespace seqan3::detail
{
//-----------------------------------------------------------------------------
// all_of
//-----------------------------------------------------------------------------
template <typename unary_predicate_t, typename... pack_t>
requires (std::predicate<unary_predicate_t, pack_t> && ...)
constexpr bool all_of(unary_predicate_t && fn, pack_t &&... args)
{
return (fn(std::forward<pack_t>(args)) && ...);
}
//-----------------------------------------------------------------------------
// for_each
//-----------------------------------------------------------------------------
template <typename unary_function_t, typename... pack_t>
requires (std::invocable<unary_function_t, pack_t> && ...)
constexpr void for_each(unary_function_t && fn, pack_t &&... args)
{
(fn(std::forward<pack_t>(args)), ...);
}
} // namespace seqan3::detail
std::forward
T forward(T... args)
platform.hpp
Provides platform and dependency checks.
type_traits
utility
Hide me