On Wed, Aug 12, 2020 at 12:24 PM Florian Weimer via Liaison <liaison@lists.isocpp.org> wrote:
I wonder if anyone has brought up the issue that for some standards,
member order are like parameter names in function declarations:
unspecified by the standard.

Ordering is part of the interface in C++, and users take advantage of that in subtle ways.

The following code is well defined in C++:

struct DrawArgs { int height, int width; };
void draw(DrawArgs );
//...
int x = 0;
draw({.height = ++x, .width = ++x}); 

If the author of DrawArgs decided to reorder height and width, it would currently be a compile-time error in C++.  If the ordering restriction is lifted, is this still well defined?  Is it a silent breaking change for user code?  And the hard question:  how much real code would this silently break?

This is not to say that WG21 won't lift the ordering constraint, rather, issues like the above need to be discussed as part of such a proposal.
--
 Nevin ":-)" Liber  <mailto:nevin@cplusplusguy.com>  +1-847-691-1404