4#include <system/span.h>
6namespace System {
namespace Runtime {
namespace InteropServices {
19 return Span<uint8_t>(span.data_ptr(), span.get_Length() *
sizeof(T));
23 template <
typename TFrom,
typename TTo>
26 return Span<TTo>((TTo*)span.data_ptr(), span.get_Length() *
sizeof(TFrom) /
sizeof(TTo));
Provides memory marshalling implementation. For compatibility with translated code only,...
Definition: memory_marshal.h:13
static Span< TTo > Cast(const Span< TFrom > &span)
Casts a Span of one primitive type TFrom to another primitive type TTo.
Definition: memory_marshal.h:24
static Span< uint8_t > AsBytes(const Span< T > &span)
Casts a Span of one primitive type T to Span of bytes.
Definition: memory_marshal.h:17
Represents a contiguous region of arbitrary memory similar to C++20's std::span.
Definition: span.h:364
Definition: db_command.h:9