[libcxx-commits] [PATCH] D151629: [libc++][ranges] Implement P2494R2 (Relaxing range adaptors to allow for move only types)
Casey Carter via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 14 17:37:37 PDT 2023
CaseyCarter added inline comments.
================
Comment at: libcxx/include/__ranges/movable_box.h:44
+concept __movable_box_object =
+#if _LIBCPP_STD_VER >= 23
+ move_constructible<_Tp>
----------------
jwakely wrote:
> 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.
>
>
We did _not_ apply to C++20 (https://github.com/microsoft/STL/pull/2965/files#diff-522242e575c221b356ad37137cf877b2a4b4a5de24333f834cf4f981560dd7ecR49-R56), but I could very easily be convinced that we should.
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