Changeset bc7ec7c in mainline
- Timestamp:
- 2018-07-05T21:41:17Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2084bfcd
- Parents:
- ac47ba95
- git-author:
- Jaroslav Jindrak <dzejrou@…> (2017-10-13 17:52:51)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:17)
- Location:
- uspace/lib/cpp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/impl/new.hpp
rac47ba95 rbc7ec7c 60 60 void* operator new[](std::size_t, const std::nothrow_t&) noexcept; 61 61 62 void operator delete(void* ); 63 void operator delete[](void* ); 62 void operator delete(void*) noexcept; 63 void operator delete(void*, std::size_t) noexcept; 64 void operator delete[](void*) noexcept; 65 void operator delete[](void*, std::size_t) noexcept; 64 66 65 67 #endif -
uspace/lib/cpp/include/new
rac47ba95 rbc7ec7c 27 27 */ 28 28 29 #ifndef LIBCPP_NEW 30 #define LIBCPP_NEW 31 32 #include <exception> 33 34 namespace std 35 { 36 37 class bad_alloc: public std::exception 38 { 39 public: 40 bad_alloc() = default; 41 bad_alloc(const bad_alloc&); 42 bad_alloc& operator=(const bad_alloc&) = default; 43 virtual const char* what() const override; 44 virtual ~bad_alloc() = default; 45 }; 46 47 struct nothrow_t {}; 48 extern const nothrow_t nothrow; 49 50 using new_handler = void (*)(); 51 52 new_handler set_new_handler(new_handler); 53 new_handler get_new_handler() noexcept; 54 55 } 56 57 void* operator new(std::size_t); 58 void* operator new(std::size_t, const std::nothrow_t&) noexcept; 59 void* operator new[](std::size_t); 60 void* operator new[](std::size_t, const std::nothrow_t&) noexcept; 61 62 void operator delete(void* ); 63 void operator delete[](void* ); 64 65 #endif 29 #include <impl/new.hpp> -
uspace/lib/cpp/src/new.cpp
rac47ba95 rbc7ec7c 100 100 } 101 101 102 void operator delete(void* ptr) 102 void operator delete(void* ptr) noexcept 103 103 { 104 104 if (ptr) … … 106 106 } 107 107 108 void operator delete [](void* ptr)108 void operator delete(void* ptr, std::size_t ignored) noexcept 109 109 { 110 110 ::operator delete(ptr); 111 111 } 112 113 void operator delete[](void* ptr) noexcept 114 { 115 ::operator delete(ptr); 116 } 117 118 void operator delete[](void* ptr, std::size_t ignored) noexcept 119 { 120 ::operator delete(ptr); 121 }
Note:
See TracChangeset
for help on using the changeset viewer.