I have seen the :
operator (is this the appropriate term?) used in multiple places in c++ code. Exemple
struct { u32 G:1; u8 T;} a;
Does it mean initialize G
? If so why we don't use the usual =
operator, or the ()
like in int a(32)
;
I'm aware of the :
when used in constructors is this related ?
Thank you.
Some says it's a possible duplicate to this questions : What does a colon following a C++ constructor name do? I guess no because the mentioned questions asks about constructors, here we're not talking about constructors. Maybe number of bits?