#pragma once #include #include #include namespace fesa { template class EntityId final { public: explicit constexpr EntityId(const std::int64_t value) : value_{value} { if (value < 0) { throw std::invalid_argument{"EntityId value must not be negative."}; } } [[nodiscard]] constexpr std::int64_t value() const noexcept { return value_; } auto operator<=>(const EntityId&) const = default; private: std::int64_t value_; }; } // namespace fesa