not

Inverts a constraint

  1. struct not(OtherConstraint)
  2. struct not(alias otherConstraint)
    @safe
    @constraint
    struct not (
    alias otherConstraint
    ) {}

Members

Functions

check
bool check(T actual)
Undocumented in source. Be warned that the author may not have intended to support it.
errorMessage
string errorMessage()
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

struct Data
{
    @not!notNaN // <-- must be NaN
    float value = float.nan;
}
struct Data
{
    @not!notNegative // <-- must *not* be non-negative
    int value;
}

Meta