>>107481976
You should just use clang-tidy and enable the cppcoreguidelines-pro-type-member-init, which will tell you to fix your shit, the following will generate an error:
class Test
{
public:
int a;
bool b;
};
int main(int, char **)
{
Test test;
return test.a;
}
<source>:10:5: warning: uninitialized record type: 'test' [cppcoreguidelines-pro-type-member-init
class Test
{
public:
int a = 0;
bool b = true;
};
int main(int, char **)
{
Test test;
return test.a;
}
But the following will not