Function operator==

Summary

#include <src/entt/entity/entity.hpp>

(1) template <typename Entity>
    constexpr bool operator==(const Entity entity, const null_t other)

(2) template <typename Entity>
    constexpr bool operator==(const Entity entity, const tombstone_t other)

Function overload

Synopsis

#include <src/entt/entity/entity.hpp>

template <typename Entity>
constexpr bool operator==(const Entity entity, const null_t other)

Description

Compares a null object and an entity identifier of any type.

Template Parameters

Entity - Type of entity identifier.

Parameters

entity - Entity identifier with which to compare.

other - A null object yet to be converted.

Returns
False if the two elements differ, true otherwise.

Source

Lines 218-221 in src/entt/entity/entity.hpp.

template<typename Entity>
[[nodiscard]] constexpr bool operator==(const Entity entity, const null_t other) ENTT_NOEXCEPT {
    return other.operator==(entity);
}

Synopsis

#include <src/entt/entity/entity.hpp>

template <typename Entity>
constexpr bool operator==(const Entity entity, const tombstone_t other)

Description

Compares a tombstone object and an entity identifier of any type.

Template Parameters

Entity - Type of entity identifier.

Parameters

entity - Entity identifier with which to compare.

other - A tombstone object yet to be converted.

Returns
False if the two elements differ, true otherwise.

Source

Lines 309-312 in src/entt/entity/entity.hpp.

template<typename Entity>
[[nodiscard]] constexpr bool operator==(const Entity entity, const tombstone_t other) ENTT_NOEXCEPT {
    return other.operator==(entity);
}





Add Discussion

Log in to comment