mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +00:00
AK+LibIPC: Make all enums codable
If an enum has a supported underlying type we can provide encoding and decoding for the enum as well.
This commit is contained in:
parent
60f84f3154
commit
e42484bb65
3 changed files with 25 additions and 0 deletions
|
@ -26,6 +26,9 @@ concept Signed = IsSigned<T>;
|
|||
template<typename T>
|
||||
concept Unsigned = IsUnsigned<T>;
|
||||
|
||||
template<typename T>
|
||||
concept Enum = IsEnum<T>;
|
||||
|
||||
template<typename T, typename U>
|
||||
concept SameAs = IsSame<T, U>;
|
||||
|
||||
|
@ -52,6 +55,7 @@ concept IteratorFunction = requires(Func func, Args... args)
|
|||
}
|
||||
|
||||
using AK::Concepts::Arithmetic;
|
||||
using AK::Concepts::Enum;
|
||||
using AK::Concepts::FloatingPoint;
|
||||
using AK::Concepts::Integral;
|
||||
using AK::Concepts::IteratorFunction;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue