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.
/EHc
1 parent 48ef5e8 commit d1be7d5Copy full SHA for d1be7d5
include/usearch/index.hpp
@@ -120,8 +120,11 @@
120
121
extern "C" {
122
/// @brief Helper function to simplify debugging - trace just one symbol - `__usearch_raise_runtime_error`.
123
+/// Assuming the `extern C` block, the name won't be mangled.
124
inline static void __usearch_raise_runtime_error(char const* message) {
-#ifndef __cpp_exceptions
125
+ // On Windows we compile with `/EHc` flag, which specifies that functions
126
+ // with C linkage do not throw C++ exceptions.
127
+#if !defined(__cpp_exceptions) || defined(USEARCH_DEFINED_WINDOWS)
128
std::terminate();
129
#else
130
throw std::runtime_error(message);
0 commit comments