[libcxx-commits] [PATCH] D102135: [libcxx][ranges] adds _`copyable-box`_
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 5 12:58:37 PDT 2021
cjdb added inline comments.
================
Comment at: libcxx/include/__ranges/copyable_box.h:40-41
+
+template<class _Tp>
+concept __copy_constructible_object = copy_constructible<_Tp> && is_object_v<_Tp>;
+
----------------
Please move this to `<concepts>`: I plan to use this elsewhere! Also, it should be:
```
template<class _Tp>
concept destructible_object = destructible<_Tp> && is_object_v<_Tp>;
template<class _Tp>
concept move_constructible_object = move_constructible<_Tp> && destructible_object<_Tp>;
template<class _Tp>
concept copy_constructible_object = copy_constructible<_Tp> && move_constructible_object<_Tp>;
```
(If we need `constructible_object_from`, I'll add that later.)
================
Comment at: libcxx/include/__ranges/copyable_box.h:47
+ class __copyable_box {
+ optional<_Tp> __val_;
+
----------------
Can this be `[[no_unique_address]]`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102135/new/
https://reviews.llvm.org/D102135
More information about the libcxx-commits
mailing list