RoaringBitmap / CRoaring

Roaring bitmaps in C (and C++), with SIMD (AVX2, AVX-512 and NEON) optimizations: used by Apache Doris, ClickHouse, and StarRocks

Home Page:http://roaringbitmap.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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++