llvm-project/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign
Konstantin Varlamov b84da5ba6e [libc++] [test] Add tests for converting array types in shared_ptr.
The only possible kind of a conversion in initialization of a shared
pointer to an array is a qualification conversion (i.e., adding
cv-qualifiers). This patch adds tests for converting from `A[]` to
`const A[]` to the following functions:

```
template<class Y> explicit shared_ptr(Y* p);

template<class Y> shared_ptr(const shared_ptr<Y>& r);
template<class Y> shared_ptr(shared_ptr<Y>&& r);

template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r);
template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);

template<class Y> void reset(Y* p);
template<class Y, class D> void reset(Y* p, D d);
template<class Y, class D, class A> void reset(Y* p, D d, A a);
```

Similar tests for converting functions that involve a `weak_ptr` should
be added once LWG issue [3001](https://cplusplus.github.io/LWG/issue3001)
is implemented.

Differential Revision: https://reviews.llvm.org/D112048
2021-10-19 13:03:51 -04:00
..
auto_ptr_Y.pass.cpp
shared_ptr.pass.cpp
shared_ptr_Y.pass.cpp [libc++] [test] Add tests for converting array types in shared_ptr. 2021-10-19 13:03:51 -04:00
shared_ptr_Y_rv.pass.cpp [libc++] [test] Add tests for converting array types in shared_ptr. 2021-10-19 13:03:51 -04:00
shared_ptr_rv.pass.cpp
unique_ptr_Y.pass.cpp [libcxx] Allow shared_ptr's unique_ptr converting constructor to support array types. 2021-04-08 22:04:57 -07:00