| 1 |
From 6aefb01b0f1547d05dd7eaa549c6f2f435a3b468 Mon Sep 17 00:00:00 2001 |
| 2 |
From: Tim Blechmann <[email protected]> |
| 3 |
Date: Sun, 11 May 2025 10:26:58 +0200 |
| 4 |
Subject: [PATCH] tl::expected: disable exceptions with qt's macros |
| 5 |
|
| 6 |
Change-Id: Ifee3f2800e03f7ecd5c9c218acfd3d7359cd6919 |
| 7 |
--- |
| 8 |
src/corelib/global/qexpected_p.h | 5 +++++ |
| 9 |
1 file changed, 5 insertions(+) |
| 10 |
|
| 11 |
diff --git a/src/corelib/global/qexpected_p.h b/src/corelib/global/qexpected_p.h |
| 12 |
index a54aea1f7d7..45c6196c947 100644 |
| 13 |
--- a/src/corelib/global/qexpected_p.h |
| 14 |
+++ b/src/corelib/global/qexpected_p.h |
| 15 |
@@ -34,6 +34,7 @@ |
| 16 |
#include <QtCore/private/qglobal_p.h> |
| 17 |
#include <QtCore/qassert.h> |
| 18 |
+#include <QtCore/qtconfiginclude.h> |
| 19 |
#include <QtCore/qtconfigmacros.h> |
| 20 |
|
| 21 |
#include <exception> |
| 22 |
#include <functional> |
| 23 |
@@ -46,6 +47,10 @@ |
| 24 |
#define TL_EXPECTED_EXCEPTIONS_ENABLED |
| 25 |
#endif |
| 26 |
|
| 27 |
+#if defined(TL_EXPECTED_EXCEPTIONS_ENABLED) && defined(QT_NO_EXCEPTIONS) |
| 28 |
+# undef TL_EXPECTED_EXCEPTIONS_ENABLED |
| 29 |
+#endif |
| 30 |
+ |
| 31 |
#if (defined(_MSC_VER) && _MSC_VER == 1900) |
| 32 |
#define TL_EXPECTED_MSVC2015 |
| 33 |
#define TL_EXPECTED_MSVC2015_CONSTEXPR |
| 34 |
-- |
| 35 |
2.49.0 |
| 36 |
|