Compiling croaring as C++ fails on Windows
SalvatorePreviti opened this issue · comments
Compiling CRoaring on Windows (tried on Windows 2019 in CI for roaring-node) causes a compilation error due to the use of (cast){initializer} used in C roaring source code.
(roaring_container_iterator_t){ ... } does not compile in Visual Studio when compiling in C++,
it fails with C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax
For reference, https://github.com/SalvatorePreviti/roaring-node/actions/runs/8102601181/job/22145475666
I think the solution is to replace (roaring_container_iterator_t){ ... } with roaring_container_iterator_t{ ... } when compiling in C++