Contrary to popular belief, -2147483648 is not a literal: C++ does not support negative literal values.
It is, in fact, a compile-time evaluable constant expression consisting of a unary negation of the literal 2147483648.
On MSVC x64, which has 32 bit int
s and long
s, 2147483648 is too big for either of those so it fails over to the long long
type that you observe.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…