table: ::size function

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

View File

@@ -137,6 +137,14 @@ public:
(std::get<container_for<Row>>(payload).shrink_to_fit(), ...);
}
/**
* @brief Returns the number of rows in a table.
* @return Number of rows.
*/
[[nodiscard]] size_type size() const noexcept {
return std::get<0>(payload).size();
}
private:
container_type payload;
};