|
Last change
on this file since 8fd0675f was b57ba05, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago |
|
Update headers in C++ files
|
-
Property mode
set to
100644
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * SPDX-FileCopyrightText: 2019 Jaroslav Jindrak
|
|---|
| 3 | *
|
|---|
| 4 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #ifndef LIBCPP_BITS_NEW
|
|---|
| 8 | #define LIBCPP_BITS_NEW
|
|---|
| 9 |
|
|---|
| 10 | #include <cstddef>
|
|---|
| 11 | #include <exception>
|
|---|
| 12 |
|
|---|
| 13 | namespace std
|
|---|
| 14 | {
|
|---|
| 15 |
|
|---|
| 16 | class bad_alloc: public std::exception
|
|---|
| 17 | {
|
|---|
| 18 | public:
|
|---|
| 19 | bad_alloc() = default;
|
|---|
| 20 | bad_alloc(const bad_alloc&) = default;
|
|---|
| 21 | bad_alloc& operator=(const bad_alloc&) = default;
|
|---|
| 22 | virtual const char* what() const noexcept override;
|
|---|
| 23 | virtual ~bad_alloc() = default;
|
|---|
| 24 | };
|
|---|
| 25 |
|
|---|
| 26 | struct nothrow_t {};
|
|---|
| 27 | extern const nothrow_t nothrow;
|
|---|
| 28 |
|
|---|
| 29 | using new_handler = void (*)();
|
|---|
| 30 |
|
|---|
| 31 | new_handler set_new_handler(new_handler);
|
|---|
| 32 | new_handler get_new_handler() noexcept;
|
|---|
| 33 |
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | void* operator new(std::size_t);
|
|---|
| 37 | void* operator new(std::size_t, void*);
|
|---|
| 38 | void* operator new(std::size_t, const std::nothrow_t&) noexcept;
|
|---|
| 39 | void* operator new[](std::size_t);
|
|---|
| 40 | void* operator new[](std::size_t, const std::nothrow_t&) noexcept;
|
|---|
| 41 |
|
|---|
| 42 | void operator delete(void*) noexcept;
|
|---|
| 43 | void operator delete(void*, std::size_t) noexcept;
|
|---|
| 44 | void operator delete[](void*) noexcept;
|
|---|
| 45 | void operator delete[](void*, std::size_t) noexcept;
|
|---|
| 46 |
|
|---|
| 47 | #endif
|
|---|
| 48 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.