]> 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)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 25 Jul 2024 10:53:06 +0000 (11:53 +0100)
commit6d86486292acbeeeda16b4f69455143391845706
tree94f8ff76f5600d0e8f0eca31d06bc0b785a51281
parent75618d2fd72ccc1c0d76646ef3bb03cb137afdd2
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