table: ::empty function

This commit is contained in:
Michele Caini
2024-04-18 16:44:30 +02:00
parent 32bd18bf08
commit dd4a291272

View File

@@ -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;
};