aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__expected/bad_expected_access.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__expected/bad_expected_access.h')
-rw-r--r--libcxx/include/__expected/bad_expected_access.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/libcxx/include/__expected/bad_expected_access.h b/libcxx/include/__expected/bad_expected_access.h
index 361eab4b6018..27f01d9350ee 100644
--- a/libcxx/include/__expected/bad_expected_access.h
+++ b/libcxx/include/__expected/bad_expected_access.h
@@ -10,14 +10,16 @@
#define _LIBCPP___EXPECTED_BAD_EXPECTED_ACCESS_H
#include <__config>
+#include <__exception/exception.h>
#include <__utility/move.h>
-#include <exception>
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
#if _LIBCPP_STD_VER >= 23
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -33,14 +35,14 @@ protected:
_LIBCPP_HIDE_FROM_ABI bad_expected_access(bad_expected_access&&) = default;
_LIBCPP_HIDE_FROM_ABI bad_expected_access& operator=(const bad_expected_access&) = default;
_LIBCPP_HIDE_FROM_ABI bad_expected_access& operator=(bad_expected_access&&) = default;
- ~bad_expected_access() override = default;
+ _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~bad_expected_access() override = default;
public:
// The way this has been designed (by using a class template below) means that we'll already
// have a profusion of these vtables in TUs, and the dynamic linker will already have a bunch
// of work to do. So it is not worth hiding the <void> specialization in the dylib, given that
// it adds deployment target restrictions.
- const char* what() const noexcept override { return "bad access to std::expected"; }
+ _LIBCPP_HIDE_FROM_ABI_VIRTUAL const char* what() const noexcept override { return "bad access to std::expected"; }
};
template <class _Err>
@@ -61,4 +63,6 @@ _LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER >= 23
+_LIBCPP_POP_MACROS
+
#endif // _LIBCPP___EXPECTED_BAD_EXPECTED_ACCESS_H