mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00: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
Notes:
github-actions[bot]
2024-10-27 12:27:25 +00:00
Author: https://github.com/yyny Commit: https://github.com/LadybirdBrowser/ladybird/commit/e636f3976d4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1980
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ public:
|
|||
}
|
||||
|
||||
ALWAYS_INLINE ~Optional()
|
||||
requires(!IsTriviallyDestructible<T>)
|
||||
requires(!IsTriviallyDestructible<T> && IsDestructible<T>)
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue