mpoeter / xenium

A C++ library providing various concurrent data structures and reclamation schemes.
https://mpoeter.github.io/xenium/
MIT License
488 stars 46 forks source link

Can't compile with clang++ #30

Closed alex-lt-kong closed 11 months ago

alex-lt-kong commented 12 months ago

Hi,

I am using Ubuntu 22.04.3 LTS with Clang 14.0.0. Xenium queue development files are installed from apt install libxenium-dev. Tried compiling ramalhete queue with clang++, it complains the below:

/usr/include/xenium/reclamation/generic_epoch_based.hpp:290:68: error: implicit instantiation of undefined template 'std::array<xenium::reclamation::detail::orphan_list<>, 3>'
    inline static std::array<detail::orphan_list<>, number_epochs> orphans;
                                                                   ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/tuple:1595:45: note: template is declared here
  template<typename _Tp, size_t _Nm> struct array;
                                            ^
1 error generated.
make[2]: *** [src/CMakeFiles/main.dir/build.make:76: src/CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: src/CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Using g++ 11.4 is okay though.

mpoeter commented 11 months ago

Thank you for reporting that! There was an include missing - I just pushed several changes, including a fix and an update for the CI so that it builds with newer compilers. Unfortunately I am not the maintainer of the libxenium-dev package. Could you instead use the code from the repo directly (e.g. as a submodule)?

alex-lt-kong commented 11 months ago

Hi @mpoeter , thanks for the response. Let me check the newer version.