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

Internal access violation in compiler

$
0
0

Try this:

struct X
{
int i;
X(int i) : i(i) {}
~X() {} // This destructor causes access violation in Intel compiler while compiling.
};

vector f()
{
// Causes access violation in Intel compiler, if
// - X has a destructor, and
// - explicit cast int to X is called. With implicit cast it works.
// return { 1, 2 }; // Ok.
return { X(1), X(2) }; // Access violation.
}

It will result in a compiler error saying "error : access violation".
I use this version: Intel(R) C++ Intel(R) 64 Compiler XE for Intel(R) 64, version 14.0.3 Package ID: w_ccompxe_2013_sp1.3.202,
the previous version had the same issue.

Cheers,
Martin


Viewing all articles
Browse latest Browse all 1616

Trending Articles



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