Equality operators
Declared in <cptr/allocator.hpp>
Same address, between a ptr and a strict_ptr to the same type, which would otherwise be ambiguous: each converts to the other.
template<bool S>
requires (S != Strict)
constexpr
bool
operator==(
basic_ptr a,
basic_ptr<T, Cage, S> const& b) noexcept;
» more...
Same address as the raw pointer b, as get() == b. Takes any U* that converts implicitly to T*.
template<class U>
requires std::is_convertible_v<U*, T*>
constexpr
bool
operator==(
basic_ptr a,
U* b) noexcept;
» more...
True if null, for a literal 0 or NULL. Any other integer does not compile.
constexpr
bool
operator==(
basic_ptr a,
detail::null_literal rhs) noexcept;
» more...
True if null. A template, as are the overloads below, so that only one of them takes a literal 0.
template<class N>
requires std::is_null_pointer_v<N>
constexpr
bool
operator==(
basic_ptr a,
N rhs) noexcept;
» more...
Same address. Compares the offsets, without touching the cage base.
constexpr
bool
operator==(
basic_ptr a,
basic_ptr b) noexcept;
» more...
Same address.
constexpr
bool
operator==(
nonnull_ptr a,
nonnull_ptr b) noexcept;
» more...
Always true: memory from one fancy_allocator for a cage can be freed by any other for the same cage.
template<class U>
constexpr
bool
operator==(
fancy_allocator const& lhs,
fancy_allocator<U, Cage> const& rhs) noexcept;
» more...
Always true: memory from one allocator for a cage can be freed by any other for the same cage.
template<class U>
constexpr
bool
operator==(
allocator const& lhs,
allocator<U, Cage> const& rhs) noexcept;
» more...
Both pointers equal.
constexpr
bool
operator==(
ptr_pair const& lhs,
ptr_pair const& rhs) noexcept = default;
» more...
Same pointer and same payload.
constexpr
bool
operator==(
ptr_with_payload const& lhs,
ptr_with_payload const& rhs) noexcept = default;
» more...
Same pointer and same tag.
constexpr
bool
operator==(
tagged_ptr lhs,
tagged_ptr rhs) noexcept = default;
» more...