This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59361] New: cannot expand parenthesized pack expression
- From: "eric.niebler at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 01 Dec 2013 16:10:05 +0000
- Subject: [Bug c++/59361] New: cannot expand parenthesized pack expression
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59361
Bug ID: 59361
Summary: cannot expand parenthesized pack expression
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
The following compiles with clang but doesn't with g++ 4.8.2 with -std=gnu++11:
template<bool ...Bs>
struct and_
{
constexpr static bool value{true};
};
template<typename T>
struct true_
{
constexpr operator bool() const { return true; }
};
template<typename ...Ts>
constexpr bool foo(Ts...)
{
return and_<(true_<Ts>())...>::value;
}
int main()
{
}
The error I get is:
test.cpp: In function âconstexpr bool foo(Ts ...)â:
test.cpp:16:34: error: expected parameter pack before â...â
return and_<(true_<Ts>())...>::value;
^
test.cpp:16:37: error: template argument 1 is invalid
return and_<(true_<Ts>())...>::value;
^