Fixes LWG issue 2875.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Do we have tests that shared_ptr isn't constructible from incompatible array types? If not, could we add some?
Otherwise, mostly LGTM.
libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp | ||
---|---|---|
71 | Nit: Please don't wrap here. |
Comment Actions
Do we have tests that shared_ptr isn't constructible from incompatible array types? If not, could we add some?
The __compatible_with trait removes the array extent. And (AFAIK) there are no array types that are convertible where their elements aren't. I'll make another patch to add tests that ensure we *can* construct a shared_ptr with array types that aren't convertible but where their elements are.