mattreecebentley / plf_colony

An unordered C++ data container providing fast iteration/insertion/erasure while maintaining pointer/iterator validity to non-erased elements regardless of insertions/erasures. Provides higher-performance than std:: library containers for high-modification scenarios with unordered data.
https://plflib.org/colony.htm
zlib License
398 stars 33 forks source link

PLF_COLONY_TYPE_TRAITS_SUPPORT misguessed with clang on CentOS 7 #6

Closed TBBle closed 7 years ago

TBBle commented 7 years ago

It might be an unusual combination, but while build-testing the SG14 repo, I found that I had to disable PLF_COLONY_TYPE_TRAITS_SUPPORT on one of my platforms.

The specific combination is clang (4.0 in this case) with libstdc++4.8 (on CentOS7), where the latter lacks std::is_trivially_copyable.

I believe it's not possible to detect this, due to libstdc++ versioning ~breakage~ missteps.

So this is basically a request for an inverse or other way of overriding the PLF_COLONY_TYPE_TRAITS_SUPPORT to force it to not be defined if the build system says so.

mattreecebentley commented 7 years ago

I think the easiest way to deal with that is to undef clang and define GNUC = 4 and __GNUC_MINOR__ = 4, before the header inclusion. It's not really designed to match all edge-cases - to do that I'd have to use something like boost.config - which's 72 headers! But hopefully it matches the bulk of cases.

mattreecebentley commented 7 years ago

Should be working now