aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__format/format_error.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__format/format_error.h')
-rw-r--r--libcxx/include/__format/format_error.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/libcxx/include/__format/format_error.h b/libcxx/include/__format/format_error.h
index 67ff41cbc3d8..002d1a40a226 100644
--- a/libcxx/include/__format/format_error.h
+++ b/libcxx/include/__format/format_error.h
@@ -11,11 +11,8 @@
#define _LIBCPP___FORMAT_FORMAT_ERROR_H
#include <__config>
-#include <stdexcept>
-
-#ifdef _LIBCPP_NO_EXCEPTIONS
#include <cstdlib>
-#endif
+#include <stdexcept>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -31,7 +28,14 @@ public:
: runtime_error(__s) {}
_LIBCPP_HIDE_FROM_ABI explicit format_error(const char* __s)
: runtime_error(__s) {}
- virtual ~format_error() noexcept;
+ // TODO FMT Remove when format is no longer experimental.
+ // Avoids linker errors when building the Clang-cl Windows DLL which doesn't
+ // support the experimental library.
+# ifndef _LIBCPP_INLINE_FORMAT_ERROR_DTOR
+ ~format_error() noexcept override;
+# else
+ ~format_error() noexcept override {}
+# endif
};
_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void