[Bug c++/59361] New: cannot expand parenthesized pack expression
eric.niebler at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Dec 1 16:10:00 GMT 2013
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;
^
More information about the Gcc-bugs
mailing list