- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to compile code c++ using Intel parallel studio xe 2016 update3 on Red Hat.
The code compiles fine under windows using VS2015 and on Linux using GCC.
The line causing problems is the following
std::unique_ptr<MyClass> myClass = std::make_unique<MyClass>();
The error generated is namespace "std" has no member "make_unique".
I've added -std=c++14 to the options which I believe is the standard option.
Any suggestions?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel does not distribute its own standard libraries, it uses whatever is on the system.
So the -std=c++14 will only enable c++14 compiler features, it won't change the header files.
So you need to be on a system with a version of GNU that supports std:::make_unique which I believe is GNU 4.9 or later.
https://isocpp.org/blog/2014/04/gcc-4.9.0
When you say it "compiles fine with Linux under GCC" do you mean on a different Linux operating system than the one you are using to compiler with icpc? Do a "gcc -v".

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page