bazel /
crubit /
a2be2a22915ac441a251d0f61f87dd9aa167cd84 Allow direct field initialization of structs if, and only if, the it is an aggregate.
In C++14 mode (which we, apparently, currently test with[0]) this is a pure restriction: it disallows direct initialization if there is e.g. a constructor.
In C++17 and up, it allows direct initialization of derived classes, which were previously forbidden.
This was harder to debug than I expected, because I A) didn't know that derived classes could only become aggregates starting in C++20, B) didn't know we built in C++14 mode. (This is definitely a bug, filed b/232984274).
[0]: in particular, `getLangOpts()` in gdb reports:
```
...
CPlusPlus = 1, CPlusPlus11 = 1, CPlusPlus14 = 1, CPlusPlus17 = 0, CPlusPlus20 = 0, CPlusPlus2b = 0,
...
```
PiperOrigin-RevId: 449630728
15 files changed