compact_vector icon indicating copy to clipboard operation
compact_vector copied to clipboard

Compilation fails with GCC 12

Open Bouncner opened this issue 2 years ago • 0 comments

The library fails to compile under GCC 12:

In file included from ./unittests/test_compact_vector.hpp:11,
[9](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:10)
                 from unittests/test_compact_vector.cc:1:
[10](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:11)
./include/compact_iterator.hpp: In member function ‘void compact::iterator_imp::common<Derived, IDX, BITS, W, UB>::set_bits(W, unsigned int)’:
[11](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:12)
./include/compact_iterator.hpp:631:25: error: expected ‘template’ keyword before dependent template name [-Werror=missing-template-keyword]
[12](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:13)
  631 |     gs<W, BITS, W, UB>::set<TS>(x, self.m_ptr, bits, self.m_offset);
[13](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:14)
      |                         ^~~
[14](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:15)
In file included from ./unittests/test_compact_vector.hpp:11,
[15](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:16)
                 from unittests/test_dyn.cc:1:
[16](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:17)
./include/compact_iterator.hpp: In member function ‘void compact::iterator_imp::common<Derived, IDX, BITS, W, UB>::set_bits(W, unsigned int)’:
[17](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:18)
./include/compact_iterator.hpp:631:25: error: expected ‘template’ keyword before dependent template name [-Werror=missing-template-keyword]
[18](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:19)
  631 |     gs<W, BITS, W, UB>::set<TS>(x, self.m_ptr, bits, self.m_offset);
[19](https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235#step:5:20)
      |                         ^~~

Here is a fork with an adapted GitHub action (Ubuntu 22.04 and GCC 12): https://github.com/Bouncner/compact_vector/actions/runs/4211320950/jobs/7309591235

Bouncner avatar Feb 18 '23 13:02 Bouncner