[libc++] Falsely rejected code for std::unique_ptr
because __compressed_pair
requires different types.
#91266
Labels
std::unique_ptr
because __compressed_pair
requires different types.
#91266
Uh oh!
There was an error while loading. Please reload this page.
As shown in https://godbolt.org/z/4K6q9bo3e, only libc++ refuses to compile the following code
I've not found anywhere in the draft saying this should be rejected.
__compressed_pair
require the two template arguments to be distinct and the_CanBeEmptyBase
traits? If they make it unable to compress, then an uncompressed layout is automatically produced, with no need to be explicitly rejected. And the indices used by__compressed_pair_elem
suggest that it handles same types correctly.__compressed_pair
, is it a good solution to changeunique_ptr
into use something likeconditional_t<same_as<pointer, deleter_type>, __compressed_pair<<pointer, deleter_type>, ...>
?The text was updated successfully, but these errors were encountered: