Function to_integral

Synopsis

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

template <typename Entity>
constexpr auto to_integral(const Entity entity) noexcept

Description

Converts an entity type to its underlying type.

Template Parameters:

Entity - The value type.

Parameters:

entity - The value to convert.

Return
The integral representation of the given value.

Source

Lines 92-95 in src/entt/entity/entity.hpp.

template<typename Entity>
[[nodiscard]] constexpr auto to_integral(const Entity entity) ENTT_NOEXCEPT {
    return static_cast<typename entt_traits<Entity>::entity_type>(entity);
}





Add Discussion

Log in to comment