It's an unsigned integer. That is used a lot in the standard such as the size of a container. I suppose I could have done unsignedconst size = 2; or even something like std::uint32_t const size = 2;
Though this will compile as well intconst size = 2; I jsut prefer to make it unsigned if it is positive.
They are different.
In the first the size of the array is implicitly taken from the initializer list. One has to count the members of the list.
The second, however decouples array size from the list size. This is legal:
1 2
std::size_t const size = 42;
int anArray[size] = {1, 2};
You still have to count the list in order to know how all elements of the array are initialized. The big bonus here is that the constant 'size' is available when the array is used.