Skip to content

Conversation

@AlexGuteniev
Copy link
Contributor

@AlexGuteniev AlexGuteniev commented Dec 22, 2025

The goal of the change is mostly clarity. Bit cast is a vocabulary function.

_Bit_cast was invented too late, otherwise _Atomic_reinterpret_as should have been _Bit_cast all along.

In addition to size checks, _Atomic_reinterpret_as also check for integrality, but that's an arbitrary requirement we don't really need to enforce.

Bit cast has some triviality check, which spotted unwrapped _Storage_for on lines 927 and 1062 (944 and 1080 before the change), fixed as a separate commit.

@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Dec 31, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Jan 7, 2026
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Jan 7, 2026
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@BillyONeal
Copy link
Member

_Bit_cast was invented too late, otherwise _Atomic_reinterpret_as should have been _Bit_cast all along.

I keep yelling at the engineers to invent me a time machine but I'm guessing they never succeed as they didn't deliver it to me yesterday

@StephanTLavavej StephanTLavavej merged commit e7d5bf7 into microsoft:main Jan 8, 2026
45 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Jan 8, 2026
@StephanTLavavej
Copy link
Member

0️⃣ 1️⃣ 0️⃣

@AlexGuteniev AlexGuteniev deleted the atomic-bits branch January 8, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants