mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add type alias for AK::Optional
This commit is contained in:
parent
67884f6747
commit
99e1d8a359
Notes:
sideshowbarker
2024-07-18 20:15:52 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/99e1d8a3590 Pull-request: https://github.com/SerenityOS/serenity/pull/6349 Reviewed-by: https://github.com/awesomekling
1 changed files with 2 additions and 0 deletions
|
@ -36,6 +36,8 @@ namespace AK {
|
|||
template<typename T>
|
||||
class alignas(T) [[nodiscard]] Optional {
|
||||
public:
|
||||
using ValueType = T;
|
||||
|
||||
ALWAYS_INLINE Optional() = default;
|
||||
|
||||
ALWAYS_INLINE Optional(const T& value)
|
||||
|
|
Loading…
Reference in a new issue