[Bug c++/78722] New: noexcept and function pointers
michele.caini at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 7 21:29:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78722
Bug ID: 78722
Summary: noexcept and function pointers
Product: gcc
Version: 6.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: michele.caini at gmail dot com
Target Milestone: ---
Consider the following code:
void f() noexcept {}
void func(void(*ptr)() noexcept) {
static_assert(noexcept(ptr()), "!");
}
int main() {
func(&f);
}
GCC 6.2 wrongly rejects it.
GCC 7 accepts it instead.
More information about the Gcc-bugs
mailing list