I think we may have just out-C++ed libc++

This commit is contained in:
Steven Dee (Jōshin) 2024-06-15 19:24:09 -07:00
parent a3f913b20b
commit 95b09d0756
No known key found for this signature in database

View file

@ -54,13 +54,6 @@ struct SetsGDeleter
}
};
struct FinalDeleter final
{
void operator()(auto*) const noexcept
{
}
};
struct StatefulDeleter
{
char state;
@ -69,8 +62,19 @@ struct StatefulDeleter
}
};
struct FinalDeleter final
{
void operator()(auto*) const noexcept
{
}
};
static_assert(sizeof(Ptr<int, SetsGDeleter>) == sizeof(int*));
// not everyone uses [[no_unique_address]]...
static_assert(!std::is_same_v<Ptr<int>, ctl::unique_ptr<int>> ||
sizeof(Ptr<int, FinalDeleter>) == sizeof(int*));
struct SetsGCtor
{
SetsGCtor()