[libcxx-commits] [PATCH] D143610: [libc++] Implement P2136R3 std::invoke_r
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 11 07:33:41 PST 2023
Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.
In general LGTM, but some questions.
================
Comment at: libcxx/include/__functional/invoke.h:550
+ if constexpr (is_void_v<_Result>) {
+ static_cast<void>(std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...));
+ } else {
----------------
Why not return the void value? This is valid nowadays.
================
Comment at: libcxx/test/std/utilities/function.objects/func.invoke/invoke_r.pass.cpp:130
+ // Note: We don't test that `std::invoke_r` works with all kinds of callable types here,
+ // since that is extensively tested in the `std::invoke` tests.
+
----------------
These tests are also testing references, to non-temporaries, return types?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143610/new/
https://reviews.llvm.org/D143610
More information about the libcxx-commits
mailing list