[libcxx-commits] [PATCH] D116974: [libc++] Add ranges::in_fun_result

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 11 07:22:03 PST 2022


Quuxplusone accepted this revision.
Quuxplusone added inline comments.


================
Comment at: libcxx/include/algorithm:26
+  template <class I, class F>
+    struct in_fun_result; // since C++20
 }
----------------
var-const wrote:
> Quuxplusone wrote:
> > `in_out_result` isn't listed here; and `in_in_out_result` either isn't listed, or merge-conflicts.
> `in_out_result` is at the bottom of synopsis (around line 655). I don't have a very strong opinion on where in the synopsis these should be listed, but they should all be together; I'd slightly prefer having them in the end because I feel that these are helper types that don't really need to be in the spotlight.
@philnik thanks for moving `in_out_result` up! :)


================
Comment at: libcxx/test/std/algorithms/algorithms.results/in_fun_result.pass.cpp:72
+  {
+    std::ranges::in_fun_result<int, double> res{10L, 0.};
+    assert(res.in == 10);
----------------
`s/10L/10/`, right?


================
Comment at: libcxx/test/std/algorithms/algorithms.results/no_unique_address.compile.pass.cpp:24
 struct Empty {};
 
 static_assert(sizeof(std::ranges::in_in_result<Empty, int>) == sizeof(int));
----------------
var-const wrote:
> Can you please move the corresponding tests in `in_out_result.compile.pass.cpp` to this file for consistency? (not necessarily in this patch)
This was marked "Done", but not done. Since you moved the synopsis comment for `in_out_result`, I think it would be nice to also move the mentioned tests in this same commit. But if it happens in a followup, also cool.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116974



More information about the libcxx-commits mailing list