Open wg21bot opened 3 years ago
Mailing list review 2021-08-16 to 2021-09-13
Some interest to provide the fix proposed by the paper.
But several people also suggested to apply a similar constraint to the pointer constructor/assignment operators/reset
, or at the very least to see that explored in the paper.
Do we need a "destroying delete type trait"? The breaking changes proposed in the paper are somewhat serious and impact sensible code.
The following suggestion was provided to constrain the pointer-taking methods. One downside is that it would have false negative for incomplete types.
template<typename U>
requires (__is_default_delete<D>::value)
&& (!same_as<const volatile U, const volatile T>)
&& is_convertible_v<U*, T*>
&& (!has_virtual_destructor_v<T>)
unique_ptr(U*) = delete;
However we observed that the proposed design has similar issues as regard to incomplete types and we encourage the author to mention these breaking change in the next revision.
Suggestion
default_deleter
has_destroying_delete
type traitClosing due to more than 1 year of inactivity. Please re-open if further work is expected.
P2413R1 Remove unsafe conversions of unique_ptr\<T> (Lénárd Szolnoki)
P2413R1: Remove unsafe conversions of unique_ptr\<T>
2024-06-27 Library Evolution St. Louis Minutes
Champion: Lenard Szolnoki
Chair: Ben Craig & Fabio Fracassi
Minute Taker: Marc Hoemmen
POLL: The increased checking provided by P2413R1 is worth the known breaking changes and build time throughput costs
SF | WF | N | WA | SA |
---|---|---|---|---|
1 | 2 | 6 | 5 | 3 |
Attendance: 16 in person, 7 remote
# of Authors: 1
Author Position: SF
Outcome: No consensus to proceed
Comments:
Recommend reconsidering R0 solution.
P2413R0 Remove unsafe conversions of unique_ptr\<T> (Lénárd Szolnoki)