Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "std::aligned_storage is deprecated",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
8 changes: 6 additions & 2 deletions vnext/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ struct JsiAbiRuntime : facebook::jsi::Runtime {
~ValueRef() noexcept;
operator facebook::jsi::Value const &() const noexcept;

using StoreType = std::aligned_storage_t<sizeof(DataPointerValue)>;
struct alignas(std::max_align_t) StoreType {
std::byte buffer[sizeof(DataPointerValue)];
};
static void InitValueRef(JsiValueRef const &data, facebook::jsi::Value *value, StoreType *store) noexcept;

private:
Expand All @@ -307,7 +309,9 @@ struct JsiAbiRuntime : facebook::jsi::Runtime {
~PropNameIDRef() noexcept;
operator facebook::jsi::PropNameID const &() const noexcept;

using StoreType = std::aligned_storage_t<sizeof(DataPointerValue)>;
struct alignas(std::max_align_t) StoreType {
std::byte buffer[sizeof(DataPointerValue)];
};

private:
StoreType m_pointerStore{};
Expand Down
Loading