I have a struct with many members of the same type, like this
struct VariablePointers {
VariablePtr active;
VariablePtr wasactive;
VariablePtr filename;
For clang and gcc you can compile with -Werror=missing-field-initializers
that turns the warning on missing field initializers to an error. godbolt
Edit: For MSVC, there seems to be no warning emitted even at level /Wall
, so I don't think it is possible to warn on missing initializers with this compiler. godbolt