Function operator==
Summary
#include <src/entt/core/hashed_string.hpp>
(1) template <typename Char>
constexpr bool operator==(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
#include <src/entt/core/type_info.hpp>
(2) constexpr bool operator==(const type_info &lhs, const type_info &rhs)
#include <src/entt/entity/entity.hpp>
(3) template <typename Entity>
constexpr bool operator==(const Entity entity, const null_t other)
(4) template <typename Entity>
constexpr bool operator==(const Entity entity, const tombstone_t other)
#include <src/entt/entity/handle.hpp>
(5) template <typename... Args, typename... Other>
bool operator==(const basic_handle< Args... > &lhs, const basic_handle< Other... > &rhs)
#include <src/entt/resource/resource.hpp>
(6) template <typename Res, typename Other>
bool operator==(const resource< Res > &lhs, const resource< Other > &rhs)
Function overload
Synopsis
#include <src/entt/core/hashed_string.hpp>
template <typename Char>
constexpr bool operator==(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
Description
Compares two hashed strings.
- Template Parameters
Char
- Character type.- Parameters
lhs
- A valid hashed string.rhs
- A valid hashed string.- Returns
- True if the two hashed strings are identical, false otherwise.
Source
Lines 235-238 in src/entt/core/hashed_string.hpp.
template<typename Char>
[[nodiscard]] constexpr bool operator==(const basic_hashed_string<Char> &lhs, const basic_hashed_string<Char> &rhs) ENTT_NOEXCEPT {
return lhs.value() == rhs.value();
}
Synopsis
#include <src/entt/core/type_info.hpp>
constexpr bool operator==(const type_info &lhs, const type_info &rhs)
Description
Compares the contents of two type info objects.
- Parameters
lhs
- A type info object.rhs
- A type info object.- Returns
- True if the two type info objects are identical, false otherwise.
Source
Lines 188-190 in src/entt/core/type_info.hpp.
[[nodiscard]] inline constexpr bool operator==(const type_info &lhs, const type_info &rhs) ENTT_NOEXCEPT {
return lhs.hash() == rhs.hash();
}
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 identifier of any type.
- Template Parameters
Entity
- Type of identifier.- Parameters
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 223-226 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 identifier of any type.
- Template Parameters
Entity
- Type of identifier.- Parameters
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 302-305 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);
}
Synopsis
#include <src/entt/entity/handle.hpp>
template <typename... Args, typename... Other>
bool operator==(const basic_handle< Args... > &lhs, const basic_handle< Other... > &rhs)
Description
Compares two handles.
- Template Parameters
Args
- Scope of the first handle.Other
- Scope of the second handle.- Parameters
lhs
- A valid handle.rhs
- A valid handle.- Returns
- True if both handles refer to the same registry and the same entity, false otherwise.
Source
Lines 305-308 in src/entt/entity/handle.hpp.
template<typename... Args, typename... Other>
[[nodiscard]] bool operator==(const basic_handle<Args...> &lhs, const basic_handle<Other...> &rhs) ENTT_NOEXCEPT {
return lhs.registry() == rhs.registry() && lhs.entity() == rhs.entity();
}
Synopsis
#include <src/entt/resource/resource.hpp>
template <typename Res, typename Other>
bool operator==(const resource< Res > &lhs, const resource< Other > &rhs)
Description
Compares two handles.
- Template Parameters
Res
- Type of resource managed by the first handle.Other
- Type of resource managed by the second handle.- Parameters
lhs
- A valid handle.rhs
- A valid handle.- Returns
- True if both handles refer to the same resource, false otherwise.
Source
Lines 168-171 in src/entt/resource/resource.hpp.
template<typename Res, typename Other>
[[nodiscard]] bool operator==(const resource<Res> &lhs, const resource<Other> &rhs) ENTT_NOEXCEPT {
return (std::addressof(*lhs) == std::addressof(*rhs));
}