[libcxx-commits] [libcxx] [libc++][span] LWG4243: `as_bytes`/`as_writable_bytes` is broken with `span<volatile T>` (PR #200993)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 1 21:01:30 PDT 2026
================
@@ -9,12 +9,12 @@
// <span>
-// template <class ElementType, size_t Extent>
-// span<const byte,
-// Extent == dynamic_extent
-// ? dynamic_extent
-// : sizeof(ElementType) * Extent>
+// template<class ElementType, size_t Extent>
+// span<const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
// as_bytes(span<ElementType, Extent> s) noexcept;
+//
+// Constraints:
+// is_volatile_v<ElementType> is false.
----------------
frederick-vs-ja wrote:
I think we should test this positively in this file with `requires`.
https://github.com/llvm/llvm-project/pull/200993
More information about the libcxx-commits
mailing list