Fix LWG#2489: mem_fn() should be noexcept
llvm-svn: 251257
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 3b72a6ef6343e073529fb7a70c30001af7bb40a7
diff --git a/include/functional b/include/functional
index 1328648..dbe9b01 100644
--- a/include/functional
+++ b/include/functional
@@ -1249,7 +1249,7 @@
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 @@
template<class _Rp, class _Tp>
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);
}