[libcxx-commits] [PATCH] D132509: [libc++] Use _Lazy in tuple constructors
Hui via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 23 23:35:15 PDT 2022
huixie90 added a comment.
Thanks for the fix!
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp:25
+ LargeTuple t2 = tuple; // copy constructor
+ LargeTuple t3 = std::move(tuple); // move constructor
+ LargeTuple t4; // default constructor
----------------
I think this would call the move constructor `tuple(tuple&&) = default;`, which is always going to pass. Those constructors we manually write take a different types of tuple. Would be worth to create a type that is convertible from integral_constant and test tuple of those constructed from `LargeTuple`?
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp:30
+ swap(t3, t4); // swap
+ // equality (t3 == t4) does not work
}
----------------
Why does `t3 == t4` not work?
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp:31
+ // equality (t3 == t4) does not work
}
----------------
The new move constructor takes `const Tuple<...>&&`. It would be good to have a test for that too
```
LargeTuple t5(std::move(std::as_const(t3)));
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132509/new/
https://reviews.llvm.org/D132509
More information about the libcxx-commits
mailing list