P3973R0 — bit_cast_as: Element type reinterpretation for std::simd (5 items) LEWG, SG1
Daniel Towner
This paper proposes std::bit_cast_as(), a free function that reinterprets std::simd objects at different element granularities by automatically inferring the output element count from the sizes of the source and target types, eliminating the need for manual count computation required by std::bit_cast. The facility provides compile-time size verification and relies on array-like layout guarantees for std::simd proposed in P3983R0. The design is also presented as naturally generalizing to std::array and std::span, with value types returning copies and view types returning reinterpreted views.

References — Anthropic Citations API

[1]
"using new_vec = resize_t>;" (§5.4) and "using new_type = rebind_t>;" (§5.3)"
[2] chars 18676–18791
"The bit representation interpretation requires that simd types have array-like layout as specified in P{array}. "
[3] chars 17835–18676
"Header synopsis additions ``` namespace std { template simd bit_cast_as(const simd& v) noexcept; } ``` ### 9.2...."
Summary: P3973R0 proposes bit_cast_as, a free function template that reinterprets the element type of a std::simd value while preserving its bit-level representation and total size, analogous to std::bit_cast but operating on SIMD vectors. Three defects were found in the proposed wording and code samples.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.