Obtains a view to the object representation of the elements of the span s
.
If N
is std::dynamic_extent
, the extent of the returned span S
is also std::dynamic_extent
; otherwise it is sizeof(T) * N
.
as_writable_bytes
only participates in overload resolution if std::is_const_v<T>
is false
.
{reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()}
.{reinterpret_cast<std::byte*>(s.data()), s.size_bytes()}
.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/container/span/as_bytes