Hi everyone!
I got this issue when compiling my code, and I have minimized it into a several-line demonstration:
struct Obj { Obj() = default; Obj( const Obj& ) = default; Obj& operator=( const Obj&) = default; ~Obj() = default; // <-- delete this fun and everything works. but how?? }; template <typename Type> class TestType { public: void foo( Type valueToCompare ) {} }; int main() { TestType<Obj> obj; obj.foo( Obj() ); return 1; }
This would cause a "error : access violation void foo( Type valueToCompare ) {}" during compiling. And if you remove the default destructor specification, the error would mysteriously disappear.
I'm using ICC 2015 update 4.