Extend the coverage of tests/lib/cpp/cxx/ to more .h files.
3 commits, see commit messages for details.
This is a subset of #70403, see that PR for more context.
The extra coverage catches issues like disordered designated initializers in .h files; see fix below.
C++20 now supports designated initializers but in a way much more restricted than C. tests/lib/cpp/cxx/testcase.yaml has the unique ability to test multiple CONFIG_STD_CPPxx version at once, very convenient.
In a surprising twist, gcc in C++20 mode can fail to compile code that worked in C++17 mode because the latter accepted whatever designated initializers C99 accepted...
Extend the coverage of
tests/lib/cpp/cxx/
to more .h files.3 commits, see commit messages for details.
This is a subset of #70403, see that PR for more context.
The extra coverage catches issues like disordered designated initializers in .h files; see fix below.
C++20 now supports designated initializers but in a way much more restricted than C.
tests/lib/cpp/cxx/testcase.yaml
has the unique ability to test multiple CONFIG_STD_CPPxx version at once, very convenient.In a surprising twist, gcc in C++20 mode can fail to compile code that worked in C++17 mode because the latter accepted whatever designated initializers C99 accepted...