Go to the documentation of this file.
9 #ifndef EAGINE_VALID_IF_INDICATED_HPP
10 #define EAGINE_VALID_IF_INDICATED_HPP
18 template <
typename Indicator,
typename Comparable, Comparable Value>
20 Indicator _indicator{};
25 : _indicator(indicator) {}
30 return Comparable(_indicator) == Value;
35 constexpr do_log(X) noexcept {}
37 template <
typename Log,
typename T>
39 log <<
"indicator is " << Value;
53 typename Comparable = bool,
54 Comparable Value =
true>
60 #endif // EAGINE_VALID_IF_INDICATED_HPP
Common code is placed in this namespace.
Definition: eagine.hpp:21
Primary template for conditionally valid values.
Definition: decl.hpp:49
Policy for values valid when non-boolean Indicator has Value.
Definition: indicated.hpp:19
valid_if< T, valid_if_indicated_policy< Indicator, Comparable, Value > > valid_if_indicated
Specialization of valid_if, for values with non-boolean indicator.
Definition: indicated.hpp:56
auto operator()(const T &) const noexcept
Indicates value validity, true if indicator == Value.
Definition: indicated.hpp:29