-
Notifications
You must be signed in to change notification settings - Fork 501
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
In C++23, std::aligned_storage
was deprecated with P1413R3.
Using it leads to a compiler warning with MSVC:
api\include\opentelemetry\nostd\internal\absl\meta\type_traits.h(117,50): warning C4996: 'std::aligned_storage<_Len,_Align>': warning STL4034: std::aligned_storage and std::aligned_storage_t are deprecated in C++23. Prefer alignas(T) std::byte t_buff[sizeof(T)]. You can define _SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING or _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS to suppress this warning.
While std::aligned_storage
isn't actually used for anything in opentelemetry-cpp
or its dependencies, it is referenced in that one file: api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h
.
That file uses it to define the no-std version of aligned_storage_t
, which doesn't appear to be used anywhere.
Proposal
Remove aligned_storage
from nostd
.
This is exactly what Abseil did as well, in abseil/abseil-cpp@4213346.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working