- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following simple code shows a strange behavior compiled by icpc:
#include <algorithm> #include <complex> #include <vector> struct Float { float _f; }; struct Float2 { float _f1; float _f2; }; // using objType = float; // Uncommenting this line will cause compilation to fail in line 22 (call to std::copy () in A::copyVect ()) // using objType = Float; // Same for this line // using objType = Float2; // And for thils line too using objType = std::complex<float>; // For this line compilation succeeds though it should fail as well class A { public: void copyVect (std::vector<objType> &vectSrc) const { std::copy (vectSrc.begin (), vectSrc.end (), _vect.begin ()); } public: std::vector<objType> _vect; }; int main() { return 0; }
Compilation was done using the command:
icpc-4.8 -std=c++11 stdcopy.cpp -o stdcopy
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This issue is fixed in the latest icc 17.0.1 compiler. Please try with that.
#icpc -v
icpc version 17.0.1 (gcc version 4.8.5 compatibility)
Thanks,
Reddy

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