- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the test case. I reproduced this with icpc 16.0 and g++ 4.9.0 and I submitted this issue to the development team (DPD200376943).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any news if this issue has been fixed yet?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page