[PATCH] libstdc++: Constraint std::as_bytes to disallow span<volatile T>

Jonathan Wakely jwakely@redhat.com
Tue Mar 10 16:49:08 GMT 2026


On Tue, 10 Mar 2026 at 16:34, Tomasz Kaminski <tkaminsk@redhat.com> wrote:
>
>
>
> On Tue, Mar 10, 2026 at 5:25 PM Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>> Implement the accepted resolution of LWG 4243.
>>
>> libstdc++-v3/ChangeLog:
>>
>>         * include/std/span (as_bytes, as_writable_bytes): Add
>>         constraints to disallow volatile elements, as per LWG 4243.
>>         * testsuite/23_containers/span/lwg4243.cc: New test.
>> ---
>>
>> Tested x86_64-linux.
>
> LGTM.

The tests were incorrect, please see PATCH v2 instead which is what I tested.



More information about the Libstdc++ mailing list