We switched to C ++ 17 and so Clang ++ 5.0 to get its features. But we encounter problems with /usr/include/c++/v1/unordered_map which calls /usr/include/c++/v1/__hash_table file. It seems that Clang raise previous declaration in this file.
For your information, with GCC-5.4 this compiles very well. Here is the output error:
In file included from /usr/include/c++/v1/unordered_map:369:
/usr/include/c++/v1/__hash_table:1132:43: error: conflicting types for '__hash_table<_Tp, _Hash,
_Equal, _Alloc>'
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table()
^
/usr/include/c++/v1/__hash_table:839:5: note: previous declaration is here
__hash_table()
^
/usr/include/c++/v1/__hash_table:1200:43: error: conflicting types for '__hash_table<_Tp, _Hash,
_Equal, _Alloc>'
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
^
/usr/include/c++/v1/__hash_table:853:5: note: previous declaration is here
__hash_table(__hash_table&& __u)
^
In the file, we simply do #include <unordered_map>.
I have tried both libstdc ++ and libc ++, but both give me the same error while with GCC no.
Has anyone ever had this problem? And how to solve it?