diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-10-13 22:32:28 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-10-14 09:08:01 +0100 |
commit | 476f305b6cf11deec79a55cd5d30e1c13fad5bc0 (patch) | |
tree | afad676765eb43f4a2287ac67c402579ec6d336a /gcc/bitmap.c | |
parent | ee9fa8a57920e6ceb49bbf0929604a34ee5cabb4 (diff) | |
download | gcc-476f305b6cf11deec79a55cd5d30e1c13fad5bc0.zip gcc-476f305b6cf11deec79a55cd5d30e1c13fad5bc0.tar.gz gcc-476f305b6cf11deec79a55cd5d30e1c13fad5bc0.tar.bz2 |
libstdc++: Add missing constexpr to std::optional (P2231R1)
This implements the changes in P2231R1 which make std::optional fully
constexpr in C++20.
libstdc++-v3/ChangeLog:
* include/bits/stl_construct.h (_Construct): Use
std::construct_at when constant evaluated.
* include/std/optional (_Storage, _Optional_payload, optional):
Add constexpr as specified by P2231R1.
* include/std/version (__cpp_lib_optional): Update value for
C++20.
* testsuite/20_util/optional/requirements.cc: Check feature test
macro.
* testsuite/20_util/optional/constexpr/assign.cc: New test.
* testsuite/20_util/optional/constexpr/cons/conv.cc: New test.
* testsuite/20_util/optional/constexpr/modifiers.cc: New test.
* testsuite/20_util/optional/constexpr/swap.cc: New test.
* testsuite/20_util/optional/version.cc: New test.
Diffstat (limited to 'gcc/bitmap.c')
0 files changed, 0 insertions, 0 deletions