Browse Source

Resolve warnings about deprecated throw(std::bad_alloc) in C++11.

Chris Rankin 6 years ago
parent
commit
635e3a3708
3 changed files with 4 additions and 4 deletions
  1. 2 2
      common/inc/stdc++/new
  2. 1 1
      sdk/cpprt/memory_manage/new1.cpp
  3. 1 1
      sdk/cpprt/memory_manage/new4.cpp

+ 2 - 2
common/inc/stdc++/new

@@ -51,8 +51,8 @@ namespace std
 	new_handler set_new_handler(new_handler handler) throw();
 };
 
-void* SGXAPI operator new (size_t) throw (std::bad_alloc);
-void* SGXAPI operator new[] (size_t) throw (std::bad_alloc);
+void* SGXAPI operator new (size_t);
+void* SGXAPI operator new[] (size_t);
 
 void* SGXAPI operator new (size_t, const std::nothrow_t&) throw();
 void* SGXAPI operator new (size_t, void*) throw();

+ 1 - 1
sdk/cpprt/memory_manage/new1.cpp

@@ -39,7 +39,7 @@
 //aligned to represent an object of that size
 //and returns a non-null pointer to the first byte of this block. 
 //On failure, it throws a bad_alloc exception.
-SGX_WEAK void* SGXAPI operator new(size_t dwBytes) throw(std::bad_alloc)
+SGX_WEAK void* SGXAPI operator new(size_t dwBytes)
 {
 	void* address =  malloc(dwBytes);
 	while ( address == NULL ){

+ 1 - 1
sdk/cpprt/memory_manage/new4.cpp

@@ -37,7 +37,7 @@
 #include "internal/se_cdefs.h"
 
 //Allocate storage space for array
-SGX_WEAK void* SGXAPI operator new[](size_t dwBytes) throw(std::bad_alloc)
+SGX_WEAK void* SGXAPI operator new[](size_t dwBytes)
 {
 	return operator new(dwBytes);
 }