efficient / libcuckoo

A high-performance, concurrent hash table
Other
1.61k stars 275 forks source link

Fix GCC build breakage when defining LIBCUCKOO_THREAD_LOCAL. #30

Closed toojays closed 8 years ago

toojays commented 8 years ago

fe3728d5 broke the GCC build like:

In file included from ../../src/cuckoohash_map.hh:30:0, from insert_throughput.cc:24: ../../src/cuckoohash_util.hh:45:34: error: missing binary operator before token "(" (clang && !has_feature(cxx_thread_local))) ^ Under GCC, "__clang && !__has_feature(cxx_thread_local)" would evaluate to "0 && !0(0)", which is syntactically bogus.

This commit rewrites the logic used to define LIBCUCKOO_THREAD_LOCAL such that __has_feature() is only evaluated when building with Clang.