Some more stdlib (array and vector, untested so far).
This commit is contained in:
30
stdlib/include/new
Normal file
30
stdlib/include/new
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#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)
|
||||
Reference in New Issue
Block a user