Cyan4973 / xxHash

Extremely fast non-cryptographic hash algorithm
http://www.xxhash.com/
Other
9.16k stars 777 forks source link

Issue with #define restrict #226

Closed redorav closed 5 years ago

redorav commented 5 years ago

Hi,

Line 63 of xxh3.h defines out a C++ keyword and leaves it defined in the header. This is a problem when interacting with other code. Could it add an #undef restrict somewhere or, better yet, use an XXHASH_RESTRICT type of macro to use as a define instead?

It makes matters worse when restrict isn't actually a reserved keyword in C++, as you can actually use it as an identifier which is what's tripping up my code at the moment.

Thanks!

Cyan4973 commented 5 years ago

Agreed

Cyan4973 commented 5 years ago

This issue should now be fixed in dev branch