Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

template aliases bug

$
0
0

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;
}

 


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>