Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
any_of.hpp
Go to the documentation of this file.
1// Copyright 2026, Toyota Motor Corporation
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5///
6/// @file any_of.hpp
7/// @brief Provides the @c any_of_v<bool...> trait
8///
9///
10///
11
12#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_ANY_OF_HPP_
13#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_ANY_OF_HPP_
14
15// IWYU pragma: private, include "arene/base/type_traits.hpp"
16// IWYU pragma: friend "(arene/base(?!/tests)|stdlib/include/stdlib_detail)/.*"
17
18namespace arene {
19namespace base {
20
21///
22/// @brief Trait which tests if at least one value in a parameter pack is
23/// @c true .
24///
25/// @tparam Args The set of boolean values to test
26///
27/// @return true if any value in the parameter pack is @c true
28/// @return false if all values in the parameter pack is @c false , or the
29/// parameter pack is empty.
30///
31/// @{
32template <bool... Args>
33extern constexpr bool any_of_v = false;
34
35template <bool B1, bool... Args>
36extern constexpr bool any_of_v<B1, Args...> = B1 || any_of_v<Args...>;
37/// @}
38
39} // namespace base
40} // namespace arene
41
42#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_ANY_OF_HPP_
Definition array_exceptions_disabled.cpp:11
constexpr bool any_of_v
Trait which tests if at least one value in a parameter pack is true .
constexpr bool any_of_v< B1, Args... >
Trait which tests if at least one value in a parameter pack is true .
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10