Used std::forward for PlacementNew function

Former-commit-id: e77b64bb90d849d856d93426a68b4d76cb499971
This commit is contained in:
Lynix 2014-07-28 12:20:47 +02:00
parent 4a1d7bc503
commit 35c0bc7087
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ inline void* NzOperatorNew(std::size_t size)
template<typename T, typename... Args> template<typename T, typename... Args>
T* NzPlacementNew(void* ptr, Args... args) T* NzPlacementNew(void* ptr, Args... args)
{ {
return new (ptr) T(args...); return new (ptr) T(std::forward<Args>(args)...);
} }
#include <Nazara/Core/DebugOff.hpp> #include <Nazara/Core/DebugOff.hpp>