mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
57f571f7283c72e958f59090f3699bf0111b6bfd
This is the subject of two NB comments on C++26 which seem likely to be approved. We're allowed to make this change as QoI anyway, even if it isn't approved for the standard, and it should apply to C++23 as well to avoid ABI changes between C++23 and C++26. As shown in the updates to the test, defaulted special members can have noexcept(false) even if they would be noexcept(true) by default. The new defaulted operator= overloads added by this commit have conditional noexcept-specifiers that match the conditions of the non-trivial assignments, propagating any noexcept(false) on trivial special members of the T and E types. We could strengthen the noexcept for the trivial operators, but propagating the conditions from the underlying types is probably what users expect, if they've bothered to put noexcept(false) on their defaulted special members. libstdc++-v3/ChangeLog: * include/std/expected (__expected::__trivially_replaceable) (__expected::__usable_for_assign) (__expected::__usable_for_trivial_assign) (__expected::__can_reassign_type): New concepts. (expected::operator=): Adjust constraints on existing overloads and add defaulted overload. (expected<cv void, E>::operator=): Likewise. * testsuite/20_util/expected/requirements.cc: Check for trivial and nothrow properties of assignments.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
30.7%
C
30.1%
Ada
14.4%
D
6.1%
Go
5.7%
Other
12.5%