diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index 0d95585aa0..d94b6f754a 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -362,6 +362,60 @@ struct MakeUnsigned { typedef unsigned long long type; }; +template +struct MakeSigned { +}; + +template<> +struct MakeSigned { + typedef char type; +}; + +template<> +struct MakeSigned { + typedef short type; +}; + +template<> +struct MakeSigned { + typedef int type; +}; + +template<> +struct MakeSigned { + typedef long type; +}; + +template<> +struct MakeSigned { + typedef long long type; +}; + +template<> +struct MakeSigned { + typedef char type; +}; + +template<> +struct MakeSigned { + typedef short type; +}; + +template<> +struct MakeSigned { + typedef int type; +}; + +template<> +struct MakeSigned { + typedef long type; +}; + +template<> +struct MakeSigned { + typedef long long type; +}; + template inline constexpr T exchange(T& slot, U&& value) { @@ -378,6 +432,7 @@ using AK::Conditional; using AK::exchange; using AK::forward; using AK::IsSame; +using AK::MakeSigned; using AK::MakeUnsigned; using AK::max; using AK::min;