deepEquals

Compares two values and returns true if they are equal.

This differs from built-in == in two respects.

1. Dynamic arrays are compared by value, even when they are struct members.

2. Floating point numbers which are NaN are considered equal. This preserves the important property that deepEquals(x, x) is true for all x.

Classes are compared in the normal way, using opEquals.

bool
deepEquals
(
T
)
(
T a
,
T b
)

Parameters

a T

Struct to be compared with b

b T

Struct to be compared with a

Return Value

Type: bool

true if equal

Meta