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.

llvm-svn: 294133
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: e29b1ed50b145e5b1adc87bb5e91377df5d32839
diff --git a/src/optional.cpp b/src/optional.cpp
index f2fbfdf..baee026 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