[libcxx-commits] [PATCH] D143299: [libc++] Reorganize exception_guard
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 13 08:50:47 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG201b2b5674e1: [libc++] Reorganize exception_guard (authored by ldionne).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143299/new/
https://reviews.llvm.org/D143299
Files:
libcxx/include/__utility/exception_guard.h
Index: libcxx/include/__utility/exception_guard.h
===================================================================
--- libcxx/include/__utility/exception_guard.h
+++ libcxx/include/__utility/exception_guard.h
@@ -58,7 +58,6 @@
// }
//
-#ifndef _LIBCPP_NO_EXCEPTIONS
template <class _Rollback>
struct __exception_guard_exceptions {
__exception_guard_exceptions() = delete;
@@ -91,9 +90,6 @@
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__exception_guard_exceptions);
-template <class _Rollback>
-using __exception_guard = __exception_guard_exceptions<_Rollback>;
-#else // _LIBCPP_NO_EXCEPTIONS
template <class _Rollback>
struct __exception_guard_noexceptions {
__exception_guard_noexceptions() = delete;
@@ -125,9 +121,13 @@
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__exception_guard_noexceptions);
+#ifdef _LIBCPP_NO_EXCEPTIONS
template <class _Rollback>
using __exception_guard = __exception_guard_noexceptions<_Rollback>;
-#endif // _LIBCPP_NO_EXCEPTIONS
+#else
+template <class _Rollback>
+using __exception_guard = __exception_guard_exceptions<_Rollback>;
+#endif
template <class _Rollback>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __exception_guard<_Rollback> __make_exception_guard(_Rollback __rollback) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143299.497010.patch
Type: text/x-patch
Size: 1227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230213/a7e73475/attachment.bin>
More information about the libcxx-commits
mailing list