libcopp 2.3.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rc_ptr.cpp
Go to the documentation of this file.
1// Copyright 2025 owent
2// Licenses under the MIT License
3
5
6#include <cstdlib>
7
8LIBCOPP_COPP_NAMESPACE_BEGIN
9namespace memory {
10
12
14#if defined(LIBCOPP_MACRO_ENABLE_EXCEPTION) && LIBCOPP_MACRO_ENABLE_EXCEPTION
15 throw std::bad_weak_ptr();
16#else
17 abort();
18#endif
19}
20
21} // namespace memory
22LIBCOPP_COPP_NAMESPACE_END
virtual LIBCOPP_COPP_API ~__rc_ptr_counted_data_base() noexcept
Definition rc_ptr.cpp:11
static LIBCOPP_COPP_API void throw_bad_weak_ptr()
Definition rc_ptr.cpp:13