[PATCH] D150525: [libc++][memory] P1132R8: out_ptr - a scalable output pointer abstraction
Hristo Hristov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 22:35:14 PDT 2023
H-G-Hristov marked 10 inline comments as done.
H-G-Hristov added a comment.
@philnik I resolved most of the comments. I think the patch is ready for another round of reviews.
I believe named requirements need to be implemented as concepts. I am not convinced that my first iteration of `Cpp17NullablePointer` is entirely correct, so I hope for feedback.
The concepts and other type traits stuff which were added, should probably be refactored and moved to other locations too. In this or in another (follow-up) patch. Please suggest.
Thank you for the initial review.
================
Comment at: libcxx/include/__memory/inout_ptr.h:62
+ [&](auto&&... __args) {
+ __s_ = _Smart{static_cast<_SP>(__p_), std::forward<_Args>(__args)...};
+ },
----------------
philnik wrote:
> This shouldn't use curly braces. Otherwise an implicit conversion is impossible. regression test!
Curly braces fixed, there is no test yet.
TODO: Test
================
Comment at: libcxx/include/__memory/out_ptr.h:64
+ std::move(__a_));
+ };
+ }
----------------
philnik wrote:
> This isn't ill-formed in the else case!
Added a `static_assert` in the `else` path. I hope that's the correct approach.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150525/new/
https://reviews.llvm.org/D150525
More information about the llvm-commits
mailing list