Warum wählt MSVC eine lange Länge als Typ für -2147483648 aus?
Mein Schnipsel:
auto i = -2147483648;
int j = 3;
std::swap(i, j); // Compile error about mismatched types here.
Der Compiler gibt an, dass das Literali
ist einlong long
. Warum das? -2147483648 passt in einint
auf MSVC x64.
Mein Compiler ist MSVC, das Ziel sind 64 Bit.