summaryrefslogtreecommitdiff
path: root/src/optional.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2017-02-05 20:06:38 +0000
committerMarshall Clow <mclow.lists@gmail.com>2017-02-05 20:06:38 +0000
commite2261bde80c7e23419eec6dac308f88d246fe989 (patch)
tree5e5bf6df66a0ca8f90fb3126a8730bf5aa5141b2 /src/optional.cpp
parent7566869dabd82699f26c8c95f18de331ec3950ce (diff)
Change the base class of std::bad_optional_access. This is a (subtle) ABI change, and is in response to http://http://wg21.link/LWG2806, which I *expect* to be adopted in Kona. I am making this change now in anticipation, and will get it into 4.0, because (a) 4.0 is the first release with std::optional, and (b) I don't want to make an ABI-change later, when the user base should be significantly larger. Note that I didn't change std::experimental::bad_optional_access, because that's still specified to derive from std::logic_error.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/optional.cpp')
-rw-r--r--src/optional.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/optional.cpp b/src/optional.cpp
index f2fbfdfec..baee026ac 100644
--- a/src/optional.cpp
+++ b/src/optional.cpp
@@ -13,12 +13,16 @@
namespace std
{
-bad_optional_access::~bad_optional_access() _NOEXCEPT = default;
+bad_optional_access::~bad_optional_access() = default;
+
+const char* bad_optional_access::what() const _NOEXCEPT {
+ return "bad_optional_access";
+ }
} // std
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
-bad_optional_access::~bad_optional_access() _NOEXCEPT = default;
+bad_optional_access::~bad_optional_access() = default;
_LIBCPP_END_NAMESPACE_EXPERIMENTAL