- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code returns error on compiling with intel 2016.1.056, on Linux.
#include <chrono>
#include <map>
#include <memory>
#include <thread>
#include <utility>
int main() {
typedef std::unique_ptr<int> intPointer;
intPointer p(new int(10));
std::map<int, std::unique_ptr<int>> m;
m.insert(std::make_pair(5, std::move(p)));
auto start = std::chrono::system_clock::now();
if (std::chrono::system_clock::now() - start < std::chrono::seconds(2))
{
std::thread t;
}
}
Returns error on compile using:
icpc test.cpp -std=c++11 -Wl,-rpath,/share/apps/intel/2016.1.056/advisor_xe_2016/lib64
the error:
In file included from /share/apps/gcc/6.3.0/include/c++/6.3.0/map(60),
from test.cpp(2):
/share/apps/gcc/6.3.0/include/c++/6.3.0/bits/stl_tree.h(1437): error: identifier "_Compare" is undefined
&& is_nothrow_move_assignable<_Compare>::value)
^In file included from /share/apps/gcc/6.3.0/include/c++/6.3.0/map(60),
from test.cpp(2):
/share/apps/gcc/6.3.0/include/c++/6.3.0/bits/stl_tree.h(1778): error: identifier "_Compare" is undefined
_GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Compare>::value)
^
While compiling with gcc goes well.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Eassa
Are you using gcc6.3 on Mac OS X? Intel C++ compiler 16.0 does not support gcc 6 yet.
Please upgrade to Intel C++ Compiler 17.0 to try.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reply,
That make sense, it's on Linux though, but the compatibility problem is valid.

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