Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

template aliases bug

rnickb
Beginner
217 Views

The following code compiles fine with clang and gcc (-std=c++14) but fails with icc 2016.

#include <type_traits>                                                           
#include <utility>                                                               
#include <tuple>                                                                 
                                                                                 
template<class Integer, Integer... Ix>                                           
using IntegerSequence = std::tuple<std::integral_constant<Integer, Ix>...>;      
                                                                                 
template<std::size_t... Indexes>                                                 
using IndexSequence = IntegerSequence<std::size_t, Indexes...>;                  
                                                                                 
template<std::size_t... Indexes>                                                 
int f(IndexSequence<Indexes...>) {                                               
  return 0;                                                                      
}                                                                                
                                                                                 
int main() {                                                                     
  f(IndexSequence<3,7,8>());                                                     
  return 0;                                                                      
}

 

0 Kudos
1 Reply
Kittur_G_Intel
Employee
217 Views

Hi Ryan,
Thanks, I've filed this issue with the developers and will touch base with you as soon as I've an update accordingly.
_Kittur

0 Kudos
Reply