[libcxx-commits] [PATCH] D60368: Add bind_front function (P0356R5)

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Nov 29 06:34:27 PST 2020


curdeius added inline comments.


================
Comment at: libcxx/include/functional:2981
 invoke_result_t<_Fn, _Args...>
-invoke(_Fn&& __f, _Args&&... __args)
+_LIBCPP_CONSTEXPR_AFTER_CXX17 invoke(_Fn&& __f, _Args&&... __args)
     noexcept(is_nothrow_invocable_v<_Fn, _Args...>)
----------------
I guess you should add tests for constexpr to https://github.com/llvm/llvm-project/blob/master/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp.


================
Comment at: libcxx/include/functional:2991
 
-template <class _DecayFunc>
-class _LIBCPP_TEMPLATE_VIS __not_fn_imp {
-  _DecayFunc __fd;
-
-public:
-    __not_fn_imp() = delete;
-
-    template <class ..._Args>
-    _LIBCPP_INLINE_VISIBILITY
-    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) &&
-            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)...); }
+#endif
 
----------------
Spurious #endif?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60368/new/

https://reviews.llvm.org/D60368



More information about the libcxx-commits mailing list