You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In c++23, std::aligned_storage is being deprecated (The proposed alternative is to use std::array<std::byte>). This causes compiler errors with for example clang-17 or 18 with c++23 flags see below.
...
[build] build/vcpkg_installed/x64-linux/include/rigtorp/MPMCQueue.h:108:17: error: 'aligned_storage<4, 4>' is deprecated [-Werror,-Wdeprecated-declarations]
[build] 108 | typename std::aligned_storage<sizeof(T), alignof(T)>::type storage;
[build] | ^
[build] /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/allocator.h:193:38: note: in instantiation of template class 'rigtorp::mpmc::Slot<int>' requested here
[build] 193 | if (__builtin_mul_overflow(__n, sizeof(_Tp), &__n))
[build] | ^
[build] build/vcpkg_installed/x64-linux/include/rigtorp/MPMCQueue.h:129:25: note: in instantiation of member function 'std::allocator<rigtorp::mpmc::Slot<int>>::allocate' requested here
[build] 129 | slots_ = allocator_.allocate(capacity_ + 1);
[build] | ^
[build] utilities/include/utilities/parallel_helpers.h:28:18: note: in instantiation of member function 'rigtorp::mpmc::Queue<int>::Queue' requested here
[build] 28 | auto tasks = rigtorp::MPMCQueue<TaskArgT>(n_tasks);
[build] | ^
...
[build] 1 error generated.
We are getting MPMCqueue with the newest release of vcpkg. To work around this, we just add warning suppressions around it, but getting a real fix for this would be nice.
The text was updated successfully, but these errors were encountered:
anders-wind
changed the title
aligned_storage is deprecated
std::aligned_storage is deprecated
Apr 30, 2024
Yes we are running with c++23 flags, so yes the deprecation of std::alligned_storage in c++ 23 is the causing issue, not clang-18 or 17 per se. I just wanted to include the information.
In c++23, std::aligned_storage is being deprecated (The proposed alternative is to use
std::array<std::byte>
). This causes compiler errors with for example clang-17 or 18 with c++23 flags see below.We are getting MPMCqueue with the newest release of vcpkg. To work around this, we just add warning suppressions around it, but getting a real fix for this would be nice.
The text was updated successfully, but these errors were encountered: