--- a/src/model.h Sun Jan 29 15:05:14 2017 +0200 +++ b/src/model.h Sun Jan 29 15:18:40 2017 +0200 @@ -57,6 +57,14 @@ return nullptr; } + template<typename T, typename... Args> + T* emplaceReplacementAt(int position, Args&& ...args) + { + T* replacement = constructObject<T>(args...); + setObjectAt(position, replacement); + return replacement; + } + protected: template<typename T, typename... Args> T* constructObject(Args&& ...args)