Re[2]: operator new+operator delete только для одного cpp фа
От: Masterkent  
Дата: 10.05.11 14:31
Оценка:
nen777w:

А>>У меня есть глобально переопределенный operator new и operator delete

А>>Но для пары CPP файлов мне надо вернуть обычный new и delete , не мои, а старые системые. Как это сделать?

N>перенести ваш new, delete под namespace, а там где нужен глобальный писать ::new, ::delete


3.7.3.1/1:

An allocation function shall be a class member function or a global function; a program is ill-formed if an allocation function is declared in a namespace scope other than global scope or declared static in global scope.

3.7.3.2/1:

Deallocation functions shall be class member functions or global functions; a program is ill-formed if deallocation functions are declared in a namespace scope other than global scope or declared static in global scope.

 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.