template<class ElementType, size_t Extent>
span<const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
as_bytes(span<ElementType, Extent> s) noexcept;
Effects: Equivalent to:
return R{reinterpret_cast<const byte*>(s.data()), s.size_bytes()};
where
R is the return type
. template<class ElementType, size_t Extent>
span<byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
as_writable_bytes(span<ElementType, Extent> s) noexcept;
Constraints:
is_const_v<ElementType> is
false. Effects: Equivalent to:
return R{reinterpret_cast<byte*>(s.data()), s.size_bytes()};
where
R is the return type
.