diff options
Diffstat (limited to 'lib/collection.h')
-rw-r--r-- | lib/collection.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/collection.h b/lib/collection.h index 91a36c2..22dcc52 100644 --- a/lib/collection.h +++ b/lib/collection.h @@ -35,6 +35,14 @@ public: return objects[idx]; } + template<typename T = Object> + requires(std::is_same_v<T, Object> || (std::is_base_of_v<Others, T> || ...)) + [[nodiscard]] auto + size() const noexcept + { + return containerFor<T>().size(); + } + template<typename T = Object, typename... Params> auto create(Params &&... params) |