mrdocs::operator==
Equality operators
Synopses
Equality operator
constexpr
bool
operator==(
ArrayView a,
ArrayView b) noexcept
requires requires (const T& x, const T& y) { { x == y } ‐> std::convertible_to<bool>; };
Compares two Optional values for equality. Returns true if both are engaged and their contained values are equal, or both are disengaged.
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator==(
Optional<T> const& lhs,
Optional<U> const& rhs);
Checks if the Optional is disengaged (equal to std::nullopt). Returns true if the Optional does not contain a value.
template<typename T>
[[nodiscard]]
constexpr
bool
operator==(
Optional<T> const& lhs,
std::nullopt_t rhs) noexcept;
Compares an engaged Optional to a value for equality. Returns true if the Optional is engaged and its value equals rhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator==(
Optional<T> const& lhs,
U const& rhs);
Compares a value to an engaged Optional for equality. Returns true if the Optional is engaged and its value equals lhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator==(
T const& lhs,
Optional<U> const& rhs);
Equality comparison of two polymorphic objects.
template<class Base>
requires detail::CanVisitCompare<Base>
bool
operator==(
Polymorphic<Base> const& lhs,
Polymorphic<Base> const& rhs);
Equality for any described type.
template<typename T>
requires DescribedComparable<T>
bool
operator==(
T const& a,
T const& b);
Equality for two polymorphic names.
bool
operator==(
Polymorphic<Name> const& lhs,
Polymorphic<Name> const& rhs);
Equality for two polymorphic types.
bool
operator==(
Polymorphic<Type> const& lhs,
Polymorphic<Type> const& rhs);
Equality for polymorphic template arguments.
bool
operator==(
Polymorphic<TArg> const& a,
Polymorphic<TArg> const& b);
Equality for two polymorphic attributes.
bool
operator==(
Polymorphic<Attribute> const& lhs,
Polymorphic<Attribute> const& rhs);
Equality helper for polymorphic template parameters.
bool
operator==(
Polymorphic<TParam> const& lhs,
Polymorphic<TParam> const& rhs);
Equality operator
constexpr
bool
operator==(
ParseResult const& lhs,
ParseResult const& rhs) = default;
Equality operator
constexpr
bool
operator==(
Iterator const& it,
std::default_sentinel_t rhs) noexcept;
Return Value
-
trueif both optionals are engaged and equal, or both are disengaged; otherwise,false. -
trueif the optional is disengaged; otherwise,false. -
trueif the optional is engaged and equal torhs; otherwise,false. -
trueif the optional is engaged and equal tolhs; otherwise,false. -
true when objects compare equal.
Created with MrDocs