We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RUST_CXX_NO_EXCEPTIONS
1 parent 33b5c9e commit 000101dCopy full SHA for 000101d
src/cxx.cc
@@ -75,7 +75,9 @@ inline namespace cxxbridge1 {
75
76
template <typename Exception>
77
void panic [[noreturn]] (const char *msg) {
78
-#if defined(RUST_CXX_NO_EXCEPTIONS)
+// Do not attempt to throw if the compiler explicitly does not support it.
79
+// If __cpp_attributes is not set, the compiler may not implement feature-test macros.
80
+#if defined(RUST_CXX_NO_EXCEPTIONS) || (defined(__cpp_attributes) && !defined(__cpp_exceptions))
81
std::cerr << "Error: " << msg << ". Aborting." << std::endl;
82
std::terminate();
83
#else
0 commit comments