This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/65575] [c++-concepts] Parse error for requires clause on functions that return a reference type
- From: "tom at honermann dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Mar 2015 19:43:47 +0000
- Subject: [Bug c++/65575] [c++-concepts] Parse error for requires clause on functions that return a reference type
- Auto-submitted: auto-generated
- References: <bug-65575-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65575
--- Comment #5 from Tom Honermann <tom at honermann dot net> ---
r221733 seems to address the case in comment 2 for me.
I have one more for you. This one is a little different (no return type
involved), so let me know if you want me to open a different bug for it.
$ cat t3.cpp
struct S {
S() = default requires true;
};
$ svn info # From my local svn gcc repo.
Path: .
URL: svn://gcc.gnu.org/svn/gcc/branches/c++-concepts
Repository Root: svn://gcc.gnu.org/svn/gcc
Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
Revision: 221742
Node Kind: directory
Schedule: normal
Last Changed Author: asutton
Last Changed Rev: 221733
Last Changed Date: 2015-03-27 10:44:22 -0400 (Fri, 27 Mar 2015)
$ g++ -c -std=c++1z t3.cpp
t3.cpp:2:11: error: expected â;â at end of member declaration
S() = default requires true;
^
t3.cpp:2:19: error: expected unqualified-id before ârequiresâ
S() = default requires true;
^