Merge "Add standard throw() spec to delete operators."
This commit is contained in:
commit
9e307af982
2 changed files with 10 additions and 10 deletions
|
@ -38,11 +38,11 @@ void* operator new[](std::size_t size) {
|
|||
return p;
|
||||
}
|
||||
|
||||
void operator delete(void* ptr) {
|
||||
void operator delete(void* ptr) throw() {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void* ptr) {
|
||||
void operator delete[](void* ptr) throw() {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
@ -54,10 +54,10 @@ void* operator new[](std::size_t size, const std::nothrow_t&) {
|
|||
return malloc(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr, const std::nothrow_t&) {
|
||||
void operator delete(void* ptr, const std::nothrow_t&) throw() {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void* ptr, const std::nothrow_t&) {
|
||||
void operator delete[](void* ptr, const std::nothrow_t&) throw() {
|
||||
free(ptr);
|
||||
}
|
||||
|
|
|
@ -13,19 +13,19 @@ namespace std {
|
|||
|
||||
void* operator new(std::size_t);
|
||||
void* operator new[](std::size_t);
|
||||
void operator delete(void*);
|
||||
void operator delete[](void*);
|
||||
void operator delete(void*) throw();
|
||||
void operator delete[](void*) throw();
|
||||
void* operator new(std::size_t, const std::nothrow_t&);
|
||||
void* operator new[](std::size_t, const std::nothrow_t&);
|
||||
void operator delete(void*, const std::nothrow_t&);
|
||||
void operator delete[](void*, const std::nothrow_t&);
|
||||
void operator delete(void*, const std::nothrow_t&) throw();
|
||||
void operator delete[](void*, const std::nothrow_t&) throw();
|
||||
|
||||
inline void* operator new(std::size_t, void* p) { return p; }
|
||||
inline void* operator new[](std::size_t, void* p) { return p; }
|
||||
|
||||
// these next two are not really required, since exceptions are off
|
||||
inline void operator delete(void*, void*) { }
|
||||
inline void operator delete[](void*, void*) { }
|
||||
inline void operator delete(void*, void*) throw() { }
|
||||
inline void operator delete[](void*, void*) throw() { }
|
||||
|
||||
} // extern C++
|
||||
|
||||
|
|
Loading…
Reference in a new issue