Fixed variadic arguments not being moved

Former-commit-id: 1130a384e982a792d04dc9490a12797cb73bc349
This commit is contained in:
Lynix
2015-02-28 23:59:26 +01:00
parent adb268fec8
commit 655be2864f
8 changed files with 15 additions and 11 deletions

View File

@@ -2,6 +2,8 @@
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <utility>
template<typename F>
NzFunctorWithoutArgs<F>::NzFunctorWithoutArgs(F func) :
m_func(func)
@@ -15,9 +17,9 @@ void NzFunctorWithoutArgs<F>::Run()
}
template<typename F, typename... Args>
NzFunctorWithArgs<F, Args...>::NzFunctorWithArgs(F func, Args&... args) :
NzFunctorWithArgs<F, Args...>::NzFunctorWithArgs(F func, Args&&... args) :
m_func(func),
m_args(args...)
m_args(std::forward<Args>(args)...)
{
}