]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Implement LWG 3836 for std::optional bool conversions
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)
commit0e3c6a936568c859e4653854f0cd4206f390d56e
tree561677ccb612bcf5110b1f85bd2ad9e2efc9479a
parentab1a0e683d8a10bcd59aab38e44bbce57c35bb49
libstdc++: Implement LWG 3836 for std::optional bool conversions

libstdc++-v3/ChangeLog:

* include/std/optional (optional): Constrain constructors to
prevent problematic bool conversions, as per LWG 3836.
* testsuite/20_util/optional/cons/lwg3836.cc: New test.
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/cons/lwg3836.cc [new file with mode: 0644]