[DEV] add placement new if not define

This commit is contained in:
Edouard DUPIN 2017-10-14 11:12:46 +02:00
parent b8ad01984d
commit 467341b7df

View File

@ -24,3 +24,16 @@ void operator delete[] (void* ptr) {
free(ptr);
}
*/
// it is define bu generic "include <new>" ==> no double define of placement new
#ifndef _NEW
// Default placement versions of operator new (use char* instead of void* to permit no multiple definition).
inline void* operator new(size_t, char* _p) throw() {
ETK_VECTOR_DEBUG("plop\n");
return _p;
}
inline void operator delete (void*, char*) throw() {
}
#endif