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

Problem with static constexpr member and Parameter pack expansion in initializer list

Raffael_C_
Beginner
421 Views

Hi,

I think I might have found a bug in the Intel Compiler XE2014 Version 14.0.1.139 (Both linux and windows). I've attached a simple piece of code which reproduces the problem in the hope that it can be fixed. The code compiles fine under linux using clang 3.3 and gcc 4.8.1.

I get essentially the following two error messages from Intel:

[bash] constexprMember.cpp(21): error: expression must have a constant value

static constexpr std::array<bool, LENGTH> boolArray{{ VALUES_ARG...}}; 

 

constexprMember.cpp(24): error: expression must have a constant value

static constexpr std::array<bool, LENGTH> boolArray = helper<0>::template getValues<arrayHelper>::boolArray;[/bash]

Raffael

0 Kudos
2 Replies
Feilong_H_Intel
Employee
421 Views

Hi Raffael,

I've reproduce the problem you reported, and entered it to our problem-tracking database.  Thank you for your report.

Thanks.

0 Kudos
Feilong_H_Intel
Employee
421 Views

icc 14.0 update 3 contains a fix for this issue.  FYI.

0 Kudos
Reply