react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

JsiAbiApi uses deprecated std::aligned_storage

Open asklar opened this issue 1 year ago • 1 comments

https://github.com/microsoft/react-native-windows/blob/f08219491c7b224f485dd6be8152c5515a56cf29/vnext/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h#L258

trying to build this in an app targeting c++23, breaks the build.

1>F:\react-native-xaml\examplenuget\windows\packages\Microsoft.ReactNative.Cxx.0.65.7\tools\Microsoft.ReactNative.Cxx\JSI\JsiAbiApi.h(257,28): error C4996: 'std::aligned_storage_t': 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 acknowledge that you have received this warning. (compiling source file XamlObject.cpp)
1>F:\react-native-xaml\examplenuget\windows\packages\Microsoft.ReactNative.Cxx.0.65.7\tools\Microsoft.ReactNative.Cxx\JSI\JsiAbiApi.h(281,28): error C4996: 'std::aligned_storage_t': 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 acknowledge that you have received this warning. (compiling source file XamlObject.cpp)

asklar avatar Aug 11 '22 00:08 asklar

fyi @vmoroz

asklar avatar Aug 11 '22 01:08 asklar