A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/algorithm/../ranges/../container/span/as_bytes.html below:

std::as_bytes, std::as_writable_bytes - cppreference.com

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.

[edit] Return value 1)

A span constructed with

{reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()}

.

2)

A span constructed with

{reinterpret_cast<std::byte*>(s.data()), s.size_bytes()}

.

[edit] Example

Possible output:

 3.14159 = { D8 0F 49 40 }
-3.14159 = { D8 0F 49 C0 }
[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4