That line is a bit field declaration and it declares a data member with an explicit bit-level size
Example from cppreference:
#include <iostream>
struct S {
// three-bit unsigned field,
// allowed values are 0...7
unsigned int b : 3;
};
int main()
{
S s = {7};
++s.b; // unsigned overflow
std::cout << s.b << '\n'; // output: 0
}
Notice that in the example above the unsigned overflow is defined behavior (same doesn't apply if b
were declared as a signed type)
The documentation you links also states that
Boolean types can be represented either with the C++ bool keyword or as a bitfield
Regarding why should I care I recommend reading this other question