[libcxx-commits] [libcxx] [libc++] Fix missing 'get_new_handler()' for Windows builds (PR #150182)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Dec 27 05:39:17 PST 2025
================
@@ -15,14 +15,10 @@
# pragma GCC system_header
#endif
-#if defined(_LIBCPP_ABI_VCRUNTIME)
-# include <new.h>
-#else
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
-typedef void (*new_handler)();
+using new_handler = void (*)();
_LIBCPP_EXPORTED_FROM_ABI new_handler set_new_handler(new_handler) _NOEXCEPT;
-_LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT;
+[[__nodiscard__]] _LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT;
----------------
Zingam wrote:
Please add a test for `nodiscard` before committing.
https://github.com/llvm/llvm-project/pull/150182
More information about the libcxx-commits
mailing list