check_signedness
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
check_signedness(type, headers = nil, opts = nil, &b)
public
Returns the signedness of the given type. You may optionally specify additional headers to search in for the type.
If the type is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the type name, in uppercase, prepended with SIGNEDNESS_OF_, followed by the type name, followed by
X where “X” is positive integer if the type is unsigned
and a negative integer if the type is signed.
For example, if size_t is defined as unsigned, then check_signedness(‘size_t’) would return +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler. The SIGNEDNESS_OF_INT=-1 macro would be set for check_signedness(‘int’)