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

Bug related to initializer lists and initialization of static const members of a template class

$
0
0

Hi,

I think I found a bug in the Linux Version of the Intel c++ composer xe (version 14.0.2 20140120). Here is a small test case:

#include<vector>
#include<initializer_list>
template<class TYPE>
class ReferenceElement {
  static const std::vector<int> subEntityTypes_;
};
template<>
const std::vector<int> ReferenceElement<int>::subEntityTypes_{ 1 };
int main() {
  return 0;
}

This code snippet compiles fine with Clang 3.4 and gcc 4.8.2, but if I try it with the Intel compiler on linux I get the following error message:

main.cpp(11): error: expected a ";"
const std::vector<int> ReferenceElement<int>::subEntityTypes_{ 1 };

 

I hope this can be fixed eventually...

Raffael


Viewing all articles
Browse latest Browse all 1616

Trending Articles



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