https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611

--- Comment #3 from Nikolas Klauser <nikolasklauser at berlin dot de> ---
I did some more digging and it looks like nobody can agree on what the right
result is.

This is the result of the question whether the listed operation on struct S {
<operation> noexcept(false) = default; } is noexcept:

operation            | is the type_trait used? | GCC | Clang | MSVC
---------------------+-------------------------+-----+-------+-----
default construction | yes                     | yes | no    | no
                     | no                      | yes | no    | yes
copy construction    | yes                     | yes | no    | no
                     | no                      | no  | no    | yes
move construction    | yes                     | yes | no    | no
                     | no                      | no  | no    | yes
copy assignment      | yes                     | yes | no    | yes
                     | no                      | yes | no    | yes
move assignment      | yes                     | yes | no    | yes
                     | no                      | yes | no    | yes

When the type trait is not used that means noexcept(operation) is used.

So GCC and MSVC seem to agree on the assignments that they should always be
noexcept, but disagree with themselves and each other on construction while
clang always considers things marked noexcept(false) to not be noexcept. Do you
have any suggestions how we should continue here? Clearly there is somewhere a
bug; both in GCC and MSVC (since they disagree with themselves) and maybe
clang.

Reply via email to