The resulting tokens comprise the controlling constant expression
which is evaluated according to the rules of
[expr.const]
using arithmetic that has at least the ranges specified
in
[support.limits]. For the purposes of this token conversion and evaluation
all signed and unsigned integer types
act as if they have the same representation as, respectively,
intmax_t or
uintmax_t (
[cstdint])
. [
Note 3:
Thus on an
implementation where
std::numeric_limits<int>::max() is
0x7FFF
and
std::numeric_limits<unsigned int>::max() is
0xFFFF,
the integer literal
0x8000 is signed and positive within a
#if
expression even though it is unsigned in
translation phase
7. —
end note]
This includes interpreting
character-literals, which may involve
converting escape sequences into execution character set members
. Whether the numeric value for these
character-literals
matches the value obtained when an identical
character-literal
occurs in an expression
(other than within a
#if
or
#elif
directive)
is
implementation-defined
. [
Note 4:
Thus, the constant expression in the following
#if
directive and
if statement (
[stmt.if])
is not guaranteed to evaluate to the same value in these two
contexts:
#if 'z' - 'a' == 25
if ('z' - 'a' == 25)
—
end note]
Also, whether a single-character
character-literal may have a negative
value is
implementation-defined
. Each subexpression with type
bool
is subjected to integral promotion before processing continues
.