]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use concepts and conditional explicit in std::optional
authorJonathan Wakely <jwakely@redhat.com>
Tue, 23 Jul 2024 11:45:37 +0000 (12:45 +0100)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 28 Jul 2024 17:05:56 +0000 (19:05 +0200)
commita2a6695d8aa63e03bd52351c4435a88a8b78802a
tree295efa22dd1633804d78fef434dde372b32190ce
parent0e3c6a936568c859e4653854f0cd4206f390d56e
libstdc++: Use concepts and conditional explicit in std::optional

For C++20 mode we can improve compile times by using conditional
explicit to reduce the number of constructor overloads. We can also use
requires-clauses instead of SFINAE to implement constraints on the
constructors and assignment operators.

libstdc++-v3/ChangeLog:

* include/std/optional (optional): Use C++20 features to
simplify overload sets for constructors and assignment
operators.
libstdc++-v3/include/std/optional