I'm trying to make a templated version of a memory pool.
The nicest way to do this, would be to overload the new operator, allowing me to give the memory pool as a parameter of the operator.

Here is my current code:
Code:
template <class T>
inline void* operator new(size_t size, MemoryPool& rPool)
{
  return rPool.Allocate<T>(size);
}
This compiles, but I can't find a syntax to call the templated new. Maybe there isn't any...
There might another way to get type information inside the operator new definition...