mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
AK: Fix ambiguity in AK::Optional specialization
The specialization for the destructor of `AK::Optional` is ambiguous when `T` is neither TriviallyDestructible nor Destructible. The fix adds an additional check for `Destructible` when generating the destructor of `AK::Optional`, since it calls the destructor of `T`, and therefore already required `T` to be `Destructible` anyway.
This commit is contained in:
parent
e76064e67f
commit
e636f3976d
|
|
@ -171,7 +171,7 @@ public:
|
|||
}
|
||||
|
||||
ALWAYS_INLINE ~Optional()
|
||||
requires(!IsTriviallyDestructible<T>)
|
||||
requires(!IsTriviallyDestructible<T> && IsDestructible<T>)
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user