This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67810] New: Non-expression recognized as fold expression
- From: "Casey at Carter dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Oct 2015 20:54:44 +0000
- Subject: [Bug c++/67810] New: Non-expression recognized as fold expression
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67810
Bug ID: 67810
Summary: Non-expression recognized as fold expression
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: Casey at Carter dot net
Target Milestone: ---
r228351 fails to compile this correct program:
template <class...>
constexpr bool Test = true;
template <typename...Ts, bool = (Test<Ts&&...>)>
void f();
with error:
~/gcc6-r228351/bin/g++ -std=c++14 -c foo.cpp
foo.cpp:4:41: warning: fold-expressions only available with -std=c++1z or
-std=gnu++1z
template <typename...Ts, bool = (Test<Ts&&...>)>
^
foo.cpp:4:47: error: expected binary operator before â)â token
template <typename...Ts, bool = (Test<Ts&&...>)>
^
foo.cpp:5:1: error: expected primary-expression before âvoidâ
void f();
^
foo.cpp:5:1: error: expected â>â before âvoidâ
foo.cpp:5:9: error: expected unqualified-id before â;â token
void f();
^