[libcxx-commits] [PATCH] D62454: SFINAE on pair/tuple assignment operators 2729
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 17 11:47:22 PST 2021
ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.
So you added tests for `std::tuple::operator=(std::pair const&)` and `std::tuple::operator=(std::pair&&)`, but not for:
- `pair& operator=(const pair& p);`
- `template<class U, class V> pair& operator=(const pair<U, V>& p);`
- `pair& operator=(pair&& p) noexcept(see below);`
- `template<class U, class V> pair& operator=(pair<U, V>&& p);`
- `tuple& operator=(const tuple& u);`
- `tuple& operator=(tuple&& u) noexcept(see below);`
- `template <class... UTypes> tuple& operator=(const tuple<UTypes...>& u);`
- `template <class... UTypes> tuple& operator=(tuple<UTypes...>&& u);`
The list is taken from the issue you linked. Is it because those constructors are already tested in these cases?
Also, the LWG issue says:
> `std::is_copy_assignable<std::pair<int, std::unique_ptr<int>>>::value` is `true`, and should be `false`.
Can you please add a test with `unique_ptr` to the tests for the constructors that should support it? I'm a big fan of just copy-pasting simple things that we know should work properly and test that they do indeed work as intended. This avoids bad surprises.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62454/new/
https://reviews.llvm.org/D62454
More information about the libcxx-commits
mailing list