libstdc++: Add std::to_underlying for C++23
authorJonathan Wakely <jwakely@redhat.com>
Thu, 25 Feb 2021 11:20:17 +0000 (11:20 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 25 Feb 2021 11:53:58 +0000 (11:53 +0000)
commit7244879b883cb3405bdd98f051d50a2f36394e79
treee2808cc9c9c17d6982d096a20dbc80ed457474ca
parenta21b99e8cebc990f7b62ed1ebadb582082e922b6
libstdc++: Add std::to_underlying for C++23

Implement P1682R2 as just approved for C++23.

libstdc++-v3/ChangeLog:

* include/std/utility (to_underlying): Define.
* include/std/version (__cpp_lib_to_underlying): Define.
* testsuite/20_util/to_underlying/1.cc: New test.
* testsuite/20_util/to_underlying/version.cc: New test.
libstdc++-v3/include/std/utility
libstdc++-v3/include/std/version
libstdc++-v3/testsuite/20_util/to_underlying/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/to_underlying/version.cc [new file with mode: 0644]