What you are looking for is a great redirect, i.e. your AllocateObject function should be completely transparent when it comes to copying side effects.
This includes both std::forward (as already mentioned, and nijansen), and the use of generic links in the parameter list:
template <class T, typename... Arguments> inline T* AllocateObject(Arguments&&... args) // ^^ universal references { return new (InternalAllocate(sizeof(T))) T(std::forward<Arguments>(args)...);
source share