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

"error : expected an integer constant" for Enum

$
0
0

This C++ code (Windows) will erroneously produce this error:

enum { ALIGN=16 }; __declspec(align(ALIGN)) float arr[4];

Enums are constexprs, so "ALIGN" is definitely a constant.


Viewing all articles
Browse latest Browse all 1616

Trending Articles



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