std::as_bytes, std::as_writable_bytes - cppreference.com
提供: cppreference.com
<tbody> </tbody>
|
|
(1) | |
|
|
(2) | |
スパン s の要素のオブジェクト表現に対するビューを取得します。
N が std::dynamic_extent の場合、返されるスパンのエクステント S も std::dynamic_extent です。 そうでなければ、 S は sizeof(T) * N です。
as_writable_bytes は、 std::is_const_v<T> が false の場合にのみ、オーバーロード解決に参加します。
戻り値
1) {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()} で構築されたスパン。
2) {reinterpret_cast<std::byte*>(s.data()), s.size_bytes()} で構築されたスパン。