- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Compiler 19.4.
The following code compiles cleanly on MSVC and GCC:
#include
#include
struct MyClass{
std::unique_ptr<:STRING> node;
};
int main(){
throw MyClass();
}
But when compiled with ICC 19.4, it leads to:
1>Main.obj : : error LNK2001: unresolved external symbol "public: __cdecl MyClass::MyClass(struct MyClass const &)" (??0MyClass@@QEAA@AEBU0@@Z)
1>C:\Users\Kotori\Desktop\Test Project\x64\Release\Test Project.exe : : error LNK1120: 1 unresolved externals
It looks like the compiler is trying to call the implicitly deleted copy-constructor instead of the move-constructor.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
seems like #include ... are missing header files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Argh, I forgot to format as code. It should be this:
#include <memory> #include <string> struct MyClass{ std::unique_ptr<std::string> node; }; int main(){ throw MyClass(); }
It seems only repro on Windows. I'm unable to repro it on Godbolt - which I presume is Linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I reproduced it on Windows. Let me take a look at it and will get back to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've reported it to our developer. The internal bug number is: CMPLRIL0-31912
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