mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 08:20:28 +00:00
I think we may have just out-C++ed libc++
This commit is contained in:
parent
a3f913b20b
commit
95b09d0756
1 changed files with 11 additions and 7 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue