This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/86561] New: a function definition must occur in a standalone declaration
- From: "zhonghao at pku dot org.cn" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Jul 2018 05:20:39 +0000
- Subject: [Bug c++/86561] New: a function definition must occur in a standalone declaration
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86561
Bug ID: 86561
Summary: a function definition must occur in a standalone
declaration
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: ---
The code is as follow:
struct S { int f(), g() = delete; };
g++ accepts the code, but clang++ rejects it:
error: '= delete' is a function definition and must occur in a
standalone declaration
struct S { int f(), g() = delete; };
^
1 error generated.