operator new overloading and template functions
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:
This compiles, but I can't find a syntax to call the templated new. Maybe there isn't any...
template <class T>
inline void* operator new(size_t size, MemoryPool& rPool)
There might another way to get type information inside the operator new definition...