meow_hash_cpp
meow_hash_cpp copied to clipboard
does not work with gcc and clang
This rewrite is not as functional as original code. It does not compile with gcc and clang.
First error - intrin.h is not available on non-Windows platforms. After changing intrin.h to x86intrin.h, following errors happen (test.cpp only includes mewo_hash.hpp, nothing else):
$ clang++ -std=c++17 test.cpp
In file included from test.cpp:1:
./meow_hash.hpp:137:33: error: expected a qualified name after 'typename'
using hash_type32_t = typename hash_type_t<32>;
^
./meow_hash.hpp:138:33: error: expected a qualified name after 'typename'
using hash_type64_t = typename hash_type_t<64>;
^
./meow_hash.hpp:139:34: error: expected a qualified name after 'typename'
using hash_type128_t = typename hash_type_t<128>;
^
./meow_hash.hpp:140:34: error: expected a qualified name after 'typename'
using hash_type256_t = typename hash_type_t<256>;
^
./meow_hash.hpp:141:34: error: expected a qualified name after 'typename'
using hash_type512_t = typename hash_type_t<512>;
^
./meow_hash.hpp:175:37: error: declaration of 'N' shadows template parameter
hash_type_t<N>& operator[](size_t N)
^
./meow_hash.hpp:144:19: note: template parameter is declared here
template <size_t N>
^
./meow_hash.hpp:180:43: error: declaration of 'N' shadows template parameter
const hash_type_t<N>& operator[](size_t N) const
^
./meow_hash.hpp:144:19: note: template parameter is declared here
template <size_t N>
^
7 errors generated.
Similar errors also from gcc.
Tried with clang 7.0.0, and gcc 8.2.
Shucks. I'll try to set up CI for this project to alleviate this in the future, thank you for testing this for me.