The full paper P2781R9 is implemented in three steps: 1. Prepare libstdc++ by moving internal code we need later. 2. Implement constant_wrapper and cw. 3. Implement the change to the CTAD for span/mdspan.
Luc Grosheintz (3): libstdc++: Move _Index_tuple, _Build_index_tuple to <type_traits>. libstdc++: Implement constant_wrapper, cw from P2781R9. libstdc++: Adjust span/mdspan CTAD for P2781R9. libstdc++-v3/include/bits/utility.h | 20 - libstdc++-v3/include/bits/version.def | 8 + libstdc++-v3/include/bits/version.h | 10 + libstdc++-v3/include/std/span | 3 +- libstdc++-v3/include/std/type_traits | 393 ++++++++++++ libstdc++-v3/src/c++23/std.cc.in | 4 + .../testsuite/20_util/constant_wrapper/adl.cc | 42 ++ .../testsuite/20_util/constant_wrapper/ex.cc | 45 ++ .../20_util/constant_wrapper/generic.cc | 252 ++++++++ .../20_util/constant_wrapper/instantiate.cc | 575 ++++++++++++++++++ .../20_util/constant_wrapper/op_comma_neg.cc | 14 + .../20_util/constant_wrapper/version.cc | 11 + .../23_containers/mdspan/extents/misc.cc | 20 +- .../testsuite/23_containers/mdspan/mdspan.cc | 20 +- .../testsuite/23_containers/span/deduction.cc | 10 + 15 files changed, 1393 insertions(+), 34 deletions(-) create mode 100644 libstdc++-v3/testsuite/20_util/constant_wrapper/adl.cc create mode 100644 libstdc++-v3/testsuite/20_util/constant_wrapper/ex.cc create mode 100644 libstdc++-v3/testsuite/20_util/constant_wrapper/generic.cc create mode 100644 libstdc++-v3/testsuite/20_util/constant_wrapper/instantiate.cc create mode 100644 libstdc++-v3/testsuite/20_util/constant_wrapper/op_comma_neg.cc create mode 100644 libstdc++-v3/testsuite/20_util/constant_wrapper/version.cc -- 2.51.0