Some more stdlib (array and vector, untested so far).

This commit is contained in:
2024-01-12 00:13:45 +01:00
parent 164f05bd59
commit ff3214fa5a
23 changed files with 577 additions and 9 deletions

30
stdlib/include/new Normal file
View 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)