[cfe-dev] warn when ctor-initializer leaves uninitialized data?

Jordan Rose jediknil at belkadan.com
Mon Apr 9 16:52:49 PDT 2012


On Apr 9, 2012, at 19:51, David Blaikie wrote:

> Have you tried/got tests with non-trivial types that don't need to be
> explicitly listed in the ctor to be safe?
> 
> struct foo { foo(); };
> struct bar { foo f; bar() { } }; // don't tell me that 'f' needs to be
> in the init list

And likewise for those that do:

struct pod { int a, b; }
struct composite { pod p; composite() {} };

Jordy



More information about the cfe-dev mailing list