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(); ^