[Bug c++/106968] New: ignored noexcept(false) in explicitly-defaulted functions
fchelnokov at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 19 12:26:30 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106968
Bug ID: 106968
Summary: ignored noexcept(false) in explicitly-defaulted
functions
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: fchelnokov at gmail dot com
Target Milestone: ---
This code is accepted in Clang and MSVC:
```
#include <type_traits>
struct A {
A(A &&) noexcept(false) = default;
};
static_assert(!std::is_nothrow_move_constructible_v<A>);
```
but in GCC static assertion fails, online demo: https://godbolt.org/z/x3Gz46Exe
More information about the Gcc-bugs
mailing list