diff --git a/AK/Traits.h b/AK/Traits.h index e6a973ae649..6d90fb0733b 100644 --- a/AK/Traits.h +++ b/AK/Traits.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include @@ -41,6 +42,12 @@ requires(IsPointer) struct Traits : public GenericTraits { static constexpr bool is_trivial() { return true; } }; +template +struct Traits : public GenericTraits { + static unsigned hash(T value) { return Traits>::hash(to_underlying(value)); } + static constexpr bool is_trivial() { return Traits>::is_trivial(); } +}; + } using AK::GenericTraits;