Function Vector.opEquals
Compares the contents of a vector with another vector, range or null.
bool opEquals
(
typeof(null) nil
) const pure nothrow @nogc scope @safe;
bool opEquals(R)
(
scope R rhs
) const nothrow scope
if (isBtlInputRange!R);
bool opEquals(V)
(
auto scope const ref V rhs
) const nothrow scope
if (isVector!V);
Returns true
if they are equal, false
otherwise
Examples
Vector!(int, 6) vec = Vector!(int, 6) .build(1, 2, 3);
assert(vec != null);
assert(null != vec);
assert(vec == [1, 2, 3]);
assert([1, 2, 3] == vec);
assert(vec == typeof(vec) .build(1, 2, 3));
assert(typeof(vec) .build(1, 2, 3) == vec);
import std .range : only;
assert(vec == only(1, 2, 3));
assert(only(1, 2, 3) == vec);