RedSpah / xxhash_cpp

Port of the xxhash library to C++17.
BSD 2-Clause "Simplified" License
165 stars 35 forks source link

The project doesn't compile in Clang in Visual studio #13

Closed TheNicker closed 4 years ago

TheNicker commented 4 years ago

Please refer to: include/xxhash.hpp#L159

Possible fix: should declare __m256i only when AVX is enabled by the compiler.

#if XXH_VECTOR == 2
        template <>
        struct vec_type<256>
        {
            using type = __m256i;
        };
#endif

Please note that the above code will not work as-is, some code restructuring is needed.

RedSpah commented 4 years ago

Moved the use of the types __m256i and __m128i to the intrin namespace, guarded behind ifdef blocks. This should hopefully fix the issue.