periscop / clay

Clay, the Chunky Loop Alteration wizardrY
2 stars 5 forks source link

#define bool short results in compilation error with c++11 #16

Closed ftynse closed 8 years ago

ftynse commented 8 years ago

If clay/util.h is included before anything involving standard hash function in C++11 (e.g. unordered_set), the compilation fails due to re-specialization of std::hash<short>.

Hacky solutions: #undef bool after including clay/util.h or use different order of includes.

Proper solution: avoid using #define bool short in clay, resort to int as in C89, see https://github.com/ftynse/clay/commit/ccec5a69feea1cebe57187f8150140b43a636d17