not

named logical not operator (!), runtime predicate inversion, and boolean symbol inversion

  1. bool not(Args args)
    template not(alias predicate)
    bool
    not
    (
    Args...
    )
    (
    Args args
    )
    if (
    is(typeof(predicate(args) == true))
    )
  2. bool not()
  3. bool not()
  4. template not()

Members

Functions

not
bool not(Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
not
bool not()
Undocumented in source. Be warned that the author may not have intended to support it.
not
bool not()
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

assert (not (false));
assert (not!false);

auto a = false;

assert (not (a));
assert (not!a);

enum b = false;
assert (not (b));
assert (not!b);

auto c () {return false;}

assert (not (c));
assert (not!c);

auto d (int x){return x == 1;}

assert (not (d(0)));
assert (not!d (0));

alias e = not!d;

assert (e(0));
assert (not!e (1));

assert (not!(x => x % 2 == 0)(1));

Meta