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

intel c++ compiler 2016 and variable templates

rnickb
Beginner
243 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
243 Views
How about Relaxing requirements on constexpr functions N3652 ? It is not supported too.
0 Kudos
Reply