diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index e0fba83309..5a714fee2f 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -316,6 +316,60 @@ inline constexpr T&& forward(typename RemoveReference::Type&& param) noexcept return static_cast(param); } +template +struct MakeUnsigned { +}; + +template<> +struct MakeUnsigned { + typedef unsigned char type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned short type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned long type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned long long type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned char type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned short type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned long type; +}; + +template<> +struct MakeUnsigned { + typedef unsigned long long type; +}; + } using AK::ceil_div; @@ -324,6 +378,7 @@ using AK::Conditional; using AK::exchange; using AK::forward; using AK::IsSame; +using AK::MakeUnsigned; using AK::max; using AK::min; using AK::move;