This is a C++ compiler bug report. (If it should be submitted elsewhere let me know.)
With Intel C++ (2016.0.109) the following error is reported:
$ icpc -std=c++11 icpc-bug.cxx icpc-bug.cxx(12): error: parameter pack "TS" was referenced but not expanded template <typename... TS, TS... vals> ^ compilation aborted for icpc-bug.cxx (code 2) zsh: exit 2 icpc -std=c++11 icpc-bug.cxx $
with this code (which distilled to a small program that recreates the bug):
template <typename T, T value> struct bar { }; template <typename... T> struct foo { using type = bool; }; template <typename... TS, TS... vals> struct foo<bar<TS,vals>...> { using type = bool; }; int main() { foo<bar<int, 1>, bar<long, 3L>> f; }
This code is correct C++ and compiles with clang v3.5.0 and GCC (v4.8.x through to and v6 - 20150830).