Repository navigation
[GNATS 21669] Spurious diagnostic for noexcept in initializer lists #111
jhsedg
started this conversation in
Issue Triage - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Customer bug ID
(boost) identity.cpp, (gnats) 21669 is the reduced test below, 21669a is the full expanded test
Description
This reduced Boost test generates an unexpected diagnostic:
namespace std {
template class initializer_list {
int *a;
unsigned long b;
initializer_list(int *, long);
};
} // namespace std
struct {
template void operator()(std::initializer_list) noexcept;
} d;
struct e {
void operator()() const;
};
void e::operator()() const {
static_assert(noexcept(d({3})), "Noexcept identity");
}
[ellen@lin1 debug]$ $CPFE --c++17 --gnu_version 80100 -w /tmp/identiy_ourheaders.reduced.C
"/tmp/identiy_ourheaders.reduced.C", line 15: error: static assertion failed
with "Noexcept identity"
static_assert(noexcept(d({3})), "Noexcept identity");
^
1 error detected in the compilation of "/tmp/identiy_ourheaders.reduced.C".
[ellen@lin1 debug]$
All reactions