None¶
#include <m3ta/none>
Checks if none of the values evaluate to true.
Functions¶
- m3ta::none
template<typename ... T_Values> constexpr bool none(T_Values ... values) noexcept
Template Parameters: - T_Values (automatically deduced) — Types of the values to check.
Function Parameters: - values – Variable number of values to check. Those can be of heterogeneous types.
Returns
Whether none of the values evaluate to true.
Traits¶
- m3ta::None
template<typename T, T ... T_values> struct None
Template Parameters: - T – Type of the values to check.
- T_values – Variable number of values to check.
Member Types
- type
The type std::integral_constant<bool, value> where value is the result of the function m3ta::none().
- value_type
The type bool.
Member Constants
- static constexpr bool value
Whether none of the values evaluate to true.
Aliases¶
- m3ta::NoneT
template<typename T, T ... T_values> using NoneT = typename None<T, T_values ...>::type;
Usage Examples¶
bool value1 = m3ta::none(true, true); // false
bool value2 = m3ta::none(false, false); // true
bool value3 = m3ta::none(true, false); // false
bool value4 = m3ta::none(true, 1, 2L, 4.0f, 9.0, 85.0L); // false
using Type1 = m3ta::NoneT<bool, true, true>; // std::integral_constant<bool, false>
using Type2 = m3ta::NoneT<bool, false, false>; // std::integral_constant<bool, true>
using Type3 = m3ta::NoneT<bool, true, false>; // std::integral_constant<bool, false>
using Type4 = m3ta::NoneT<bool, 1, 2, 4, 9, 85>; // std::integral_constant<bool, false>