diff --git a/src/entt/entity/table.hpp b/src/entt/entity/table.hpp index 336e36dd4..dde06cb7d 100644 --- a/src/entt/entity/table.hpp +++ b/src/entt/entity/table.hpp @@ -145,6 +145,14 @@ public: return std::get<0>(payload).size(); } + /** + * @brief Checks whether a table is empty. + * @return True if the table is empty, false otherwise. + */ + [[nodiscard]] bool empty() const noexcept { + return std::get<0>(payload).empty(); + } + private: container_type payload; };