Iros
 
Loading...
Searching...
No Matches
as_bytes.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace di::vocab {
7namespace detail {
9 template<typename T, size_t N, size_t S = N == dynamic_extent ? dynamic_extent : sizeof(T) * N>
11 return { reinterpret_cast<Byte const*>(span.data()), span.size_bytes() };
12 }
13 };
14}
15
16constexpr inline auto as_bytes = detail::AsBytesFunction {};
17}
18
19namespace di {
20using vocab::as_bytes;
21}
Definition span_forward_declaration.h:10
std::byte Byte
Definition byte.h:63
Definition erasure_cast.h:7
Definition lazy.h:165
constexpr auto as_bytes
Definition as_bytes.h:16
Definition zstring_parser.h:9
Definition as_bytes.h:8
auto operator()(Span< T, N > span) const -> Span< Byte const, S >
Definition as_bytes.h:10