Constructs a mutable Span<T> from a pointer and a size.

Synopsis

Declared in <absl/types/span.h>

template<
    int& ExplicitArgumentBarrier...,
    typename T>
constexpr
Span<T>
MakeSpan(
    T* ptr,
    size_t size) noexcept;

Return Value

A span over size elements starting at ptr.

Parameters

Name

Description

ptr

Pointer to the first element.

size

Number of elements.

Created with MrDocs