Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7650 Discussions

valid c++ variadic code causes segfault with icc

rnickb
Beginner
165 Views

This code compiles fine with gcc and clang, but causes a segfault with icc 2016 (used -std=c++14)

 

#include <tuple>
#include <type_traits>
#include <utility>

template<class... Tx>
void f(const std::tuple<Tx...>& t,
  std::enable_if_t<Tx() || true, int>... indexes) {
}

int main() {
  auto t = std::make_tuple(3, 4.0);
  f(t, 1 ,2);
  return 0;
}

 

0 Kudos
2 Replies
Kittur_G_Intel
Employee
165 Views

Hi,
I've filed this issue with the developers and will update you as soon as the release with the fix is out, appreciate much.
​_Kittur

Kittur_G_Intel
Employee
165 Views

Hi,
This issue is fixed in the latest product release (16.0) which you can download from the https://registrationcenter.intel.com, thx.

_Kittur

Reply