mirror of
https://github.com/SerenityOS/serenity
synced 2026-04-25 17:15:42 +02:00
AK: Remove MakeSigned<wchar_t> and MakeUnsigned<wchar_t>
The semantics of MakeSigned and MakeUnsigned for wchar_t are dubious since wchar_t is either always signed or never signed depending on the ABI. There is no way to manually make it signed or unsigned. STL's std::make_signed and std::make_unsigned return integer types of the same size for all character types. But I don't think that behavior is intuitive either.
This commit is contained in:
committed by
Tim Schumacher
parent
1442cb799f
commit
6112432066
@@ -262,12 +262,6 @@ template<>
|
||||
struct __MakeUnsigned<bool> {
|
||||
using Type = bool;
|
||||
};
|
||||
#if ARCH(AARCH64)
|
||||
template<>
|
||||
struct __MakeUnsigned<wchar_t> {
|
||||
using Type = wchar_t;
|
||||
};
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
using MakeUnsigned = typename __MakeUnsigned<T>::Type;
|
||||
|
||||
@@ -85,12 +85,6 @@ template<>
|
||||
struct __MakeSigned<char> {
|
||||
using Type = char;
|
||||
};
|
||||
#if ARCH(AARCH64)
|
||||
template<>
|
||||
struct __MakeSigned<wchar_t> {
|
||||
using Type = void;
|
||||
};
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
using MakeSigned = typename __MakeSigned<T>::Type;
|
||||
|
||||
Reference in New Issue
Block a user