From 853f301b0fc50e2e17d3e7bb9992e57dfd14f90c Mon Sep 17 00:00:00 2001 From: Richard Thier Date: Fri, 30 Aug 2024 10:30:35 +0200 Subject: [PATCH] added list.emplace(..) for the C++ variant - bogus implementation for now --- TurboList.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TurboList.hpp b/TurboList.hpp index 53ffaf0..6e53c7e 100644 --- a/TurboList.hpp +++ b/TurboList.hpp @@ -94,6 +94,12 @@ public: } } + template + inline void emplace(Args&&... args) { + // FIXME: placement new needed + insert(T(std::forward(args)...)); + } + inline uint32_t size() noexcept { return end; }