Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

icc bug with nested parameter packs

rnickb
Beginner
149 Views

The below code compiles fine with gcc and clang but gives this error with icc 2016:

main.cpp(11): error: parameter pack "IX2" was referenced but not expanded

    KA(const A<IX2>&... ax) {

               ^

 

compilation aborted for main.cpp (code 2)

template<int I>                                                                  
struct A {};                                                                     
                                                                                 
template<int... IX>                                                              
struct KA {                                                                      
  template<int... IX2>                                                           
  KA(const A<IX2>&... ax) {                                                      
  }                                                                              
};                                                                               
                                                                                 
int main() {                                                                     
  return 0;                                                                      
}   

 

0 Kudos
0 Replies
Reply