diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-06-27 00:40:41 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-06-27 00:40:41 +0000 |
| commit | 9372d8bc613b2ec6fa2dbaa63d84ecc1ffaf70fc (patch) | |
| tree | 779853d5156b902eb0c1e0365bbb6f8b0c77c3a6 /libcxx/include/functional | |
| parent | 06e9017d7b199fc91840ecdf21b67a7006c5004f (diff) | |
| download | bcm5719-llvm-9372d8bc613b2ec6fa2dbaa63d84ecc1ffaf70fc.tar.gz bcm5719-llvm-9372d8bc613b2ec6fa2dbaa63d84ecc1ffaf70fc.zip | |
Implement P0358r1. Fixes for not_fn.
llvm-svn: 273837
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>> |

