wchar_t 在 Apple 目标上的标志是什么?
What are the signs of wchar_t on Apple targets?
AFAICT wchar_t
在 Apple 目标上始终为 32 位宽。
wchar_t
的符号是什么:
- x86 Apple Darwin(32 位 MacOSX)
- x86_64 Apple Darwin(64 位 MacOSX)
- ARM iOS(32 位)
- AArch64 iOS(64 位)
?
ISO/IEC 9899:2017 §7.20.3/4:
If wchar_t
(see 7.19) is defined as a signed integer type, the value of WCHAR_MIN
shall be no greater than −127 and the value of WCHAR_MAX
shall be no less than 127; otherwise, wchar_t
is defined as an unsigned integer type, and the value of WCHAR_MIN
shall be 0 and the value of WCHAR_MAX
shall be no less than 255.
所以看WCHAR_MIN
会告诉你。
In iOS, as with other Darwin platforms, both char
and wchar_t
are signed types.
AFAICT wchar_t
在 Apple 目标上始终为 32 位宽。
wchar_t
的符号是什么:
- x86 Apple Darwin(32 位 MacOSX)
- x86_64 Apple Darwin(64 位 MacOSX)
- ARM iOS(32 位)
- AArch64 iOS(64 位)
?
ISO/IEC 9899:2017 §7.20.3/4:
If
wchar_t
(see 7.19) is defined as a signed integer type, the value ofWCHAR_MIN
shall be no greater than −127 and the value ofWCHAR_MAX
shall be no less than 127; otherwise,wchar_t
is defined as an unsigned integer type, and the value ofWCHAR_MIN
shall be 0 and the value ofWCHAR_MAX
shall be no less than 255.
所以看WCHAR_MIN
会告诉你。
In iOS, as with other Darwin platforms, both
char
andwchar_t
are signed types.