[Bug c++/86602] New: need to check for a placeholder in argument to noexcept
zhonghao at pku dot org.cn
gcc-bugzilla@gcc.gnu.org
Fri Jul 20 06:57:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86602
Bug ID: 86602
Summary: need to check for a placeholder in argument to
noexcept
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
g++ accepts this invalid code:
void f();
void f(int);
bool b = noexcept(f);
[over.over]p1: "An overloaded function name shall not be used without arguments
in contexts other than those listed."
clang++ rejects it:
code1.cpp:3:19: error: reference to overloaded function could not be resolved;
did you mean to call it with no arguments?
bool b = noexcept(f);
^
()
code1.cpp:2:6: note: possible target for call
void f(int);
^
code1.cpp:1:6: note: possible target for call
void f();
^
1 error generated.
More information about the Gcc-bugs
mailing list