36 lines
		
	
	
		
			607 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			607 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
 | |
| #if !defined(BAD_APPLE_OS_NEW_INCLUDED)
 | |
| #define BAD_APPLE_OS_NEW_INCLUDED
 | |
| 
 | |
| #include <cstddef>
 | |
| #include <exception>
 | |
| 
 | |
| namespace std
 | |
| {
 | |
| class bad_alloc : public exception
 | |
| {
 | |
| public:
 | |
|     bad_alloc() noexcept = default;
 | |
|     bad_alloc(const bad_alloc&) noexcept = default;
 | |
| 
 | |
|     const char * what() const noexcept override;
 | |
| };
 | |
| 
 | |
| class bad_array_new_length : public bad_alloc
 | |
| {
 | |
| 
 | |
| };
 | |
| }
 | |
| 
 | |
| inline void* operator new(std::size_t, void* placement) noexcept
 | |
| {
 | |
|     return placement;
 | |
| }
 | |
| 
 | |
| inline void* operator new[](std::size_t, void* placement) noexcept
 | |
| {
 | |
|     return placement;
 | |
| }
 | |
| 
 | |
| #endif // !defined(BAD_APPLE_OS_NEW_INCLUDED)
 |