Steven Schveighoffer <[email protected]> wrote:
During default struct construction, no constructors are run (they aren't allowed anyways) and no invariants are run. What would be the point of running an invariant during default construction? The only think it could possibly do is make code like this:

S s;

Fail without -release, and pass with -release. I don't see the value in that.

Ah, but I do. If it is an error to create an uninitialized struct of
type S, then the above code is a bug, is it not?

--
Simen

Reply via email to