mrdocs::operator==

Equality for two polymorphic names.

Synopsis

bool
operator==(
    Polymorphic<Name> const& lhs,
    Polymorphic<Name> const& rhs);

Description

Declared here, next to operator<=>, and defined out of line in Name.cpp. It must be visible wherever Polymorphic<Name> is compared, so that equality_comparable<Polymorphic<Name>> holds (for example when an Optional<Polymorphic<Name>> member is compared through the reflected operator<=>). Keeping the body out of line also keeps it away from the kind registration hazard that a header‐inline body would hit (see Name.cpp).

Return Value

true if the objects are equal, false otherwise

Parameters

Name

Description

lhs

The left operand

rhs

The right operand

Created with MrDocs