- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following compiles with g++ 4.8 and clang++ 3.3 but not with the intel compiler: i
[cpp]
struct A { };
template <int> struct B { };
constexpr int Z(A) { return 0; }
B<Z(A())> b;
int main(int, char**) { return 0; }
[/cpp]
Error:
[plain]
fsandrew@localhost 23$/opt/intel/bin/icc -std=c++11 constexprtest.cxx
constexprtest.cxx(5): error: expression must have a constant value
B<Z(A())> b;
^
constexprtest.cxx(5): error: expression must have a constant value
B<Z(A())> b;
^
compilation aborted for constexprtest.cxx (code 2)
[/plain]
I'm running icc version 13.1.3 (gcc version 4.7.0 compatibility), downloaded today.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested this against our beta update 1 build and it compiles without errror. This is fixed in the next release.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page