diff options
Diffstat (limited to 'libcxx/include/functional')
| -rw-r--r-- | libcxx/include/functional | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libcxx/include/functional b/libcxx/include/functional index a13772f31ae..581f965b2b8 100644 --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -2618,18 +2618,33 @@ public: template <class ..._Args> _LIBCPP_INLINE_VISIBILITY - auto operator()(_Args&& ...__args) + auto operator()(_Args&& ...__args) & noexcept(noexcept(!_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...))) -> decltype(!_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...)) { return !_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...); } template <class ..._Args> _LIBCPP_INLINE_VISIBILITY - auto operator()(_Args&& ...__args) const + auto operator()(_Args&& ...__args) && + noexcept(noexcept(!_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...))) + -> decltype(!_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...)) + { return !_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...); } + + template <class ..._Args> + _LIBCPP_INLINE_VISIBILITY + auto operator()(_Args&& ...__args) const& noexcept(noexcept(!_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...))) -> decltype(!_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...)) { return !_VSTD::invoke(__fd, _VSTD::forward<_Args>(__args)...); } + + template <class ..._Args> + _LIBCPP_INLINE_VISIBILITY + auto operator()(_Args&& ...__args) const&& + noexcept(noexcept(!_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...))) + -> decltype(!_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...)) + { return !_VSTD::invoke(_VSTD::move(__fd), _VSTD::forward<_Args>(__args)...); } + private: template <class _RawFunc, class = enable_if_t<!is_same<decay_t<_RawFunc>, __not_fn_imp>::value>> |

