31 lines
559 B
Plaintext
31 lines
559 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 std::exception
|
|
{
|
|
public:
|
|
bad_alloc() noexcept = default;
|
|
bad_alloc(const bad_alloc&) noexcept = default;
|
|
|
|
const char * what() const noexcept override;
|
|
};
|
|
}
|
|
|
|
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)
|