http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59498
Bug ID: 59498
Summary: Pack expansion error in template alias
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ldionne.2 at gmail dot com
GCC Version
-----------
gcc-4.9 (GCC) 4.9.0 20131201 (experimental)
Installed with Homebrew.
System
------
OS X 10.8.5
Command line to trigger the bug
-------------------------------
gcc-4.9 -std=c++11 -Wall -Wextra -pedantic -o /dev/null -c
template_alias_bug.cpp
Minimal code to reproduce
-------------------------
template <typename T, typename ...>
using alias = T;
template <typename ...T>
using variadic_alias = alias<T...>;
using Fail = variadic_alias<int>;
int main() { }
Error message
-------------
template_alias_bug.cpp:9:34: error: pack expansion argument for non-pack
parameter 'T' of alias template 'template<class T, class ...> using alias = T'
using variadic_alias = alias<T...>;
^
template_alias_bug.cpp:5:11: note: declared here
template <typename T, typename ...>
^
template_alias_bug.cpp:11:14: error: expected type-specifier before
'variadic_alias'
using Fail = variadic_alias<int>;
^
Possibly related
----------------
Bug 58856
Comments
--------
Clang compiles the code just fine and I don't see any obvious reason why that
would be invalid C++11 (I could be mistaken), so I think that's a GCC bug.