diff --git a/src/entt/entity/table.hpp b/src/entt/entity/table.hpp index bb8b2f9e4..a9bf3ef73 100644 --- a/src/entt/entity/table.hpp +++ b/src/entt/entity/table.hpp @@ -356,6 +356,17 @@ public: return {std::get>(payload).rend()...}; } + /** + * @brief Appends a row to the end of a table. + * @tparam Args Types of arguments to use to construct the row data. + * @param args Parameters to use to construct the row data. + * @return A reference to the newly created row data. + */ + template + std::tuple emplace(Args &&...args) { + return std::forward_as_tuple(std::get>(payload).emplace_back(std::forward(args))...); + } + /** * @brief Returns the row data at specified location. * @param pos The row for which to return the data.