Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
all_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 all_of.hpp
7/// @brief Provides the @c all_of_v<bool...> trait
8///
9///
10///
11
12#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_ALL_OF_HPP_
13#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_ALL_OF_HPP_
14
15// IWYU pragma: private, include "arene/base/type_traits.hpp"
16// IWYU pragma: friend "(arene/base(?!/tests)|stdlib/include/stdlib_detail)/.*"
17namespace arene {
18namespace base {
19
20///
21/// @brief Trait which tests if every value in a parameter pack is @c true .
22///
23/// @tparam Args The set of boolean values to test
24///
25/// @return true if every value in the parameter pack is @c true , or the
26/// parameter pack is empty.
27/// @return false if any value in the parameter pack is @c false .
28///
29/// @{
30template <bool... Args>
31extern constexpr bool all_of_v = true;
32
33template <bool B1, bool... Args>
34extern constexpr bool all_of_v<B1, Args...> = B1 && all_of_v<Args...>;
35/// @}
36
37} // namespace base
38} // namespace arene
39
40#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_ALL_OF_HPP_
Definition array_exceptions_disabled.cpp:11
constexpr bool all_of_v
Trait which tests if every value in a parameter pack is true .
constexpr bool all_of_v< B1, Args... >
Trait which tests if every value in a parameter pack is true .
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10