What does $\ll$ mean?
LL
is the suffix for long-long, which is 64-bit on most (all?) C/C++ implementations. So 0LL
is a 64-bit literal with the value of 0.
This is similar to L
being the suffix for a long literal, which on most 32- and 64-bit C/C++ implementations is the same size as a non-long int
. (On 16-bit implementations, the size of int
is usually 16 bits, and so the L
suffix would indicate a 32-bit integer literal in contrast to the default of 16 bits.)
It is specified in Paragraph 2.14.2 of the C++11 Standard:
2.14.2 Integer literals
[...]
long-long-suffix: one of
ll LL
Paragraph 2.14.2/2, and in particular Table 6, goes on specifying the meaning of the suffix for decimal, octal, and hexadecimal constants, and the types they are given.
Since 0
is an octal literal, the type of 0LL
is long long int
:
#include <type_traits>
int main()
{
// Won't fire
static_assert(std::is_same<decltype(0LL), long long int>::value, "Ouch!");
}