diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-02-11 13:25:42 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-02-11 13:25:42 +0000 |
| commit | e392b74caad5d93946653d4656f1b354fa0ef713 (patch) | |
| tree | 0432181d8ae0e410bfb961f7d0a14a6b60b68b6c /include | |
| parent | 7c24d4db412189cf83de2bb328543564c8ad9224 (diff) | |
Notes
Diffstat (limited to 'include')
| -rw-r--r-- | include/optional | 6 | ||||
| -rw-r--r-- | include/variant | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/include/optional b/include/optional index c002cc729059..8f47986242ca 100644 --- a/include/optional +++ b/include/optional @@ -160,14 +160,12 @@ namespace std // purposefully not using versioning namespace { class _LIBCPP_EXCEPTION_ABI bad_optional_access - : public logic_error + : public exception { public: - _LIBCPP_INLINE_VISIBILITY - bad_optional_access() : logic_error("bad optional access") {} - // Get the key function ~bad_optional_access() into the dylib virtual ~bad_optional_access() _NOEXCEPT; + virtual const char* what() const _NOEXCEPT; }; } // std diff --git a/include/variant b/include/variant index f623cddc2002..bbd4bf4895ad 100644 --- a/include/variant +++ b/include/variant @@ -574,7 +574,7 @@ private: constexpr decltype(auto) operator()(_Alts&&... __alts) const { __std_visit_exhaustive_visitor_check< _Visitor, - decltype(_VSTD::forward<_Alts>(__alts).__value)...>(); + decltype((_VSTD::forward<_Alts>(__alts).__value))...>(); return __invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), _VSTD::forward<_Alts>(__alts).__value...); } |
