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

intel c++ compiler 2016 and variable templates

rnickb
Beginner
140 Views

what's going on with variable templates? icc 2016 says they're supported (https://software.intel.com/en-us/articles/intel-c-compiler-160-for-linux-release-notes#cpp14), but when I try to compile the following code it fails with "-std=c++14". The code works with clang 3.7.

template<class T>                                                                  
constexpr int value_of = T::value;                                                 
                                                                                   
int main() {                                                                       
  return 0;                                                                        
}  

 

0 Kudos
1 Reply
Gomes_T_
Beginner
140 Views
How about Relaxing requirements on constexpr functions N3652 ? It is not supported too.
Reply