summaryrefslogtreecommitdiffstats
path: root/lib/libcxx/src/any.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-02-04 16:55:44 +0000
committerpatrick <patrick@openbsd.org>2019-02-04 16:55:44 +0000
commit76c648e7a477ffb2a882ad5ffe523269bd9a3f6a (patch)
tree29d319d598650bab04e4f58e5e8769567e33091e /lib/libcxx/src/any.cpp
parentImport libc++abi 7.0.1. (diff)
downloadwireguard-openbsd-76c648e7a477ffb2a882ad5ffe523269bd9a3f6a.tar.xz
wireguard-openbsd-76c648e7a477ffb2a882ad5ffe523269bd9a3f6a.zip
Import libc++ 7.0.1.
Diffstat (limited to 'lib/libcxx/src/any.cpp')
-rw-r--r--lib/libcxx/src/any.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/libcxx/src/any.cpp b/lib/libcxx/src/any.cpp
index 45b2337eb35..3795258bb06 100644
--- a/lib/libcxx/src/any.cpp
+++ b/lib/libcxx/src/any.cpp
@@ -8,7 +8,6 @@
//===----------------------------------------------------------------------===//
#include "any"
-#include "experimental/any"
namespace std {
const char* bad_any_cast::what() const _NOEXCEPT {
@@ -16,8 +15,21 @@ const char* bad_any_cast::what() const _NOEXCEPT {
}
}
+
+#include <experimental/__config>
+
+// Preserve std::experimental::any_bad_cast for ABI compatibility
+// Even though it no longer exists in a header file
_LIBCPP_BEGIN_NAMESPACE_LFTS
+
+class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
+{
+public:
+ virtual const char* what() const _NOEXCEPT;
+};
+
const char* bad_any_cast::what() const _NOEXCEPT {
return "bad any cast";
}
+
_LIBCPP_END_NAMESPACE_LFTS