Tessil / hat-trie

C++ implementation of a fast and memory efficient HAT-trie
MIT License
792 stars 114 forks source link

windows conflict with windows.h #49

Closed yangxingpping closed 2 years ago

yangxingpping commented 2 years ago

include

include

include

include "tsl/htrie_map.h"

int main() { std::cout << "Hello World!\n"; }

tsl\array-hash\array_growth_policy.h(96,48): warning C4003: not enough arguments for function-like macro invocation 'max' tsl\array-hash\array_growth_policy.h(96,48): error C2589: '(': illegal token on right side of '::' tsl\array-hash\array_growth_policy.h(133): message : see reference to class template instantiation 'tsl::ah::power_of_two_growth_policy' being compiled tsl\array-hash\array_growth_policy.h(185,61): warning C4003: not enough arguments for function-like macro invocation 'max' tsl\array-hash\array_growth_policy.h(185,61): error C2589: '(': illegal token on right side of '::' tsl\array-hash\array_growth_policy.h(192): message : see reference to class template instantiation 'tsl::ah::mod_growth_policy' being compiled tsl\array-hash\array_growth_policy.h(185,61): error C2059: syntax error: '('

https://stackoverflow.com/questions/2789481/problem-calling-stdmax

maybe add macro NOMINMAX in CMakeLists.txt

Tessil commented 2 years ago

Sorry I prefer to not add such overarching macro to the CMakeLists, I'll leave it to the users.