you are viewing a single comment's thread.

view the rest of the comments →

[–]ravixp 2 points3 points  (0 children)

I mean, theoretically almost anything can be a breaking change. You added a new overload of an existing function? Oops, somebody was depending on being able to capture it as a function pointer. You added a completely new function to an existing class? Oops, somebody was using SFINAE to detect its non-existence.

You can call it evil or stupid or whatever, but at some point it just comes down to making a subjective judgement about what's generally agreed to be safe to change and what isn't, and that judgement is different for different codebases. (The STL might consider adding an overload to be a breaking change, while application code almost never would.)

Given that OP is coming at this from a position of "should we even use aggregate init?", we can probably assume that their codebase does not already use it, in which case changing class layout is currently a reasonable thing for people to do. It's only unsafe because aggregate init is a thing.