You don't even need to define a constructor
struct foo {
bool a = true;
bool b = true;
bool c;
} bar;
To commentors belowclarify: why wouldn't I be able to use athese are called brace-or-equal-initializer here? Isn't this the same as below, a struct definition followed by an instantiationinitializers (because you may also use brace initialization instead of an object?equal sign). This is not only for aggregates: you can use this in normal class definitions. This was added in C++11.
struct foo {
bool a = true;
bool b = true;
bool c;
};
foo bar;