libstdc++: Prepare mapping layout tests for padded layouts.
Using the existing tests for padded layouts requires the following
changes:
* The padded layouts are template classes. In order to be able to use
partially specialized templates, functions need to be converted to
structs.
* The layout mapping tests include a check that only applies if
is_exhaustive is static. This commit introduces a concept to check if
is_exhaustive is a static member function.
* Fix a test to not use a hard-coded layout_left.
The test empty.cc contains indentation mistakes that are fixed.
libstdc++-v3/ChangeLog:
* testsuite/23_containers/mdspan/layouts/empty.cc: Fix indent.
* testsuite/23_containers/mdspan/layouts/mapping.cc
(test_stride_1d): Fix test.
(test_stride_2d): Rewrite using a struct.
(test_stride_3d): Ditto.
(has_static_is_exhaustive): New concept.
(test_mapping_properties): Update test.
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com> Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>