Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 743 Bytes

Not.md

File metadata and controls

34 lines (24 loc) · 743 Bytes

<CppML/Arithmetic/Not.hpp>

Not

template <typename Pipe = ml::Identity>
struct Not {
  template <typename T>
  using f = /* .... */;
};

Not<Pipe>

Not<Pipe> is a metafunction that passes to Pipe an ml::Bool<truth_value>, where value is the negation of ::value of underlying type. Pipe defaults to ml::Identity.

f:: T -> ml::Bool<truth_value> -> ResultOf(Pipe)

T

Types T needs an ::value alias, like ml::Value<Type, value>.

Example

using T0 = ml::f<
                 ml::Not<>,
                 ml::Bool<true>>;
static_assert(
              std::is_same_v<T0, ml::Bool<false>);