diff --git a/include/functional b/include/functional index 13286482..dbe9b01b 100644 --- a/include/functional +++ b/include/functional @@ -1249,7 +1249,7 @@ private: type __f_; public: - _LIBCPP_INLINE_VISIBILITY __mem_fn(type __f) : __f_(__f) {} + _LIBCPP_INLINE_VISIBILITY __mem_fn(type __f) _NOEXCEPT : __f_(__f) {} #ifndef _LIBCPP_HAS_NO_VARIADICS // invoke @@ -1364,7 +1364,7 @@ public: template inline _LIBCPP_INLINE_VISIBILITY __mem_fn<_Rp _Tp::*> -mem_fn(_Rp _Tp::* __pm) +mem_fn(_Rp _Tp::* __pm) _NOEXCEPT { return __mem_fn<_Rp _Tp::*>(__pm); } diff --git a/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp b/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp index 4096bd81..f371223e 100644 --- a/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp +++ b/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp @@ -69,4 +69,7 @@ int main() test0(std::mem_fn(&A::test0)); test1(std::mem_fn(&A::test1)); test2(std::mem_fn(&A::test2)); +#if __has_feature(cxx_noexcept) + static_assert((noexcept(std::mem_fn(&A::test0))), ""); // LWG#2489 +#endif } diff --git a/www/cxx1z_status.html b/www/cxx1z_status.html index 5f582f1c..c12785a4 100644 --- a/www/cxx1z_status.html +++ b/www/cxx1z_status.html @@ -175,14 +175,14 @@ 2466allocator_traits::max_size() default behavior is incorrectKonaComplete 2469Wrong specification of Requires clause of operator[] for map and unordered_mapKona 2473basic_filebuf's relation to C FILE semanticsKonaComplete - 2476scoped_allocator_adaptor is not assignableKonaPatch Ready + 2476scoped_allocator_adaptor is not assignableKonaComplete 2477Inconsistency of wordings in std::vector::erase() and std::deque::erase()KonaComplete 2483throw_with_nested() should use is_finalKonaComplete 2484rethrow_if_nested() is doubly unimplementableKonaComplete 2485get() should be overloaded for const tuple&&Kona 2486mem_fn() should be required to use perfect forwardingKona 2487bind() should be const-overloaded, not cv-overloadedKonaComplete - 2489mem_fn() should be noexceptKonaPatch Ready + 2489mem_fn() should be noexceptKonaComplete 2492Clarify requirements for compKonaComplete 2495There is no such thing as an Exception Safety elementKona