every

This overload enables, when possible, lvalue return.

  1. CommonType!T every(T a)
  2. auto ref every(T a)
    version(none)
    ref
    every
    (
    T...
    )
    (
    ref T a
    )
    if (
    T.length != 0 &&
    allSame!T
    )

Examples

immutable p = 1, q = 2;
assert(every(p, q) == 2);

int x = 1, y = 2;
every(x, y) = 3;
assert(x == 1);
assert(y == 3);

Meta