Closed asbai closed 5 years ago
Actually making a C++11 compatible version is quiet simple. I can make a PR after confirming LICENSE of the code snippet.
I accept pull requests :)
Ported to C++11 by @cloudhan. Thanks again!
Sorry for reopen it, but due to GCC not support is_trivially_copyable
until version 5. So even if we specify -std=c++11, we still can't use this great container on GCC 4.9 and earlier toolchains.
To solve this problem, we have added the following macro definition to it:
#if defined(__GNUC__) && __GNUC__ < 5
# define is_trivially_copyable is_trivial
#endif
And this patch works well on GCC 4.9.
I've added a travis build for g++4.9 and added a similar workaround, but with __has_trivial_copy
. (see https://github.com/martinus/robin-hood-hashing/commit/888b2a3cd5bbb84ca986183828c0db851faf1101#diff-d2088bf6a93bf905b42d89a70f3acdabR149) Can you check if the latest version https://github.com/martinus/robin-hood-hashing/blob/master/src/include/robin_hood.h works for you?
hi @martinus , thanks for your quick response. I have compiled and tested on gcc 4.9.4 (linux_x64) and gcc 4.9.2 (msw_x64) for your new version. And everything seems to work very well. :-)
Awesome
A large number of development environments still do not have C++14 support, especially in many embedded environments that only support C++03.
Can you consider porting this powerful and efficient container to these older versions?
Thanks :-)