-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Description
Hello,
due to backward compatibility reasons we build boost with -mmacosx-version-min=10.8
. This results in a compilation error in boost/core/uncaught_exceptions.hpp
due to unavailability of the API in older macOS versions despite libc++
announces support. Locally I applied the following patch to fix compilation:
diff --git a/boost/core/uncaught_exceptions.hpp b/boost/core/uncaught_exceptions.hpp
index 27e2491bda..ff71e1925b 100644
--- a/boost/core/uncaught_exceptions.hpp
+++ b/boost/core/uncaught_exceptions.hpp
@@ -32,6 +32,16 @@
#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS
#endif
+// At least macOS 10.12 or iOS 10.0 is required
+#if defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) && defined(__APPLE__)
+# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
+# undef BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS
+# endif
+# if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 100000
+# undef BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS
+# endif
+#endif
+
#if !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS)
// cxxabi.h availability macro
But I guess Boost already provides a more elegant way to check for availability like a Boost.Config Feature Check
.
Thanks,
Gregor
Metadata
Metadata
Assignees
Labels
No labels