[libcxx-commits] [PATCH] D151629: [libc++][ranges] Implement P2494R2 (Relaxing range adaptors to allow for move only types)

Jonathan Wakely via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 5 13:43:17 PDT 2023


jwakely added inline comments.


================
Comment at: libcxx/include/__ranges/movable_box.h:44
+concept __movable_box_object =
+#if _LIBCPP_STD_VER >= 23
+  move_constructible<_Tp>
----------------
ldionne wrote:
> var-const wrote:
> > Is there a reason not to apply the new behavior to old language versions retroactively? Would this change break any existing code?
> > 
> > (Also tagging @ldionne )
> https://github.com/cplusplus/papers/issues/1156 is not super clear as to whether this should be treated as a DR.
> 
> @jwakely @CaseyCarter what did you folks do here? Did you apply P2494R2 (`copyable-box` => `movable-box`) as a DR to C++20, or do you consider it as a C++23 feature?
> https://github.com/cplusplus/papers/issues/1156 is not super clear as to whether this should be treated as a DR.

Good, I prefer to leave that to implementors where there's no compelling reason it has to be a DR. IMHO there's no defect here, this is a design change. It's an improvement, but the previous design was sound, not buggy.

> @jwakely @CaseyCarter what did you folks do here? Did you apply P2494R2 (`copyable-box` => `movable-box`) as a DR to C++20, or do you consider it as a C++23 feature?

We didn't do it yet, but I think it looks harmless to apply the change to C++20 instead of making it conditional.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151629



More information about the libcxx-commits mailing list