microsoft / microsoft/react-native-windows

JsiAbiApi uses deprecated std::aligned_storage

Open
#10,390 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Build Infrastructure Engineering Improvement Candidate enhancement Workstream: Developer Experience
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with JSI/JsiAbiApi.h at the referenced lines 258 and 281, then reproduce the C++23 build using the reported XamlObject.cpp compilation. Done means the header no longer triggers the reported std::aligned_storage deprecation errors while preserving the existing build behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.