Skip to content

GH-55763 : Use std::bit_cast in SafeCopy - #55770

Open
starsgitw wants to merge 1 commit into
apache:mainfrom
starsgitw:fix-55763-safe-copy-bit-cast
Open

starsgitw wants to merge 1 commit into
apache:mainfrom
starsgitw:fix-55763-safe-copy-bit-cast

Conversation

@starsgitw

Copy link
Copy Markdown

Rationale

Fixes #55763.

Changes
Replace the AlignedStorage and std::memcpy implementation in SafeCopy with C++20 std::bit_cast.
Remove unnecessary temporary storage and manual destruction.
Add the required header.

Testing

Not run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++] util: making SafeCopy call c++20's std::bit_cast

1 participant