[#absl-MakeSpan-01] = xref:absl.adoc[absl]::MakeSpan :relfileprefix: ../ :mrdocs: `MakeSpan` overloads == Synopses Declared in `<absl/types/span.h>` Constructs a mutable `Span` from a view container. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename C> constexpr decltype(absl::MakeSpan(span_internal::GetData(c), c.size())) xref:absl/MakeSpan-08.adoc[MakeSpan](C& c) noexcept requires span_internal::IsView<C>::value; ---- [.small]#xref:absl/MakeSpan-08.adoc[_» more..._]# Constructs a mutable `Span` from a non‐view container. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename C> constexpr decltype(absl::MakeSpan(span_internal::GetData(c), c.size())) xref:absl/MakeSpan-03.adoc[MakeSpan](C& c) noexcept requires !span_internal::IsView<C>::value; ---- [.small]#xref:absl/MakeSpan-03.adoc[_» more..._]# Constructs a mutable `Span` from a non‐view container. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename C> constexpr decltype(absl::MakeSpan(span_internal::GetData(c), c.size())) xref:absl/MakeSpan-09.adoc[MakeSpan](C& c) noexcept requires !span_internal::IsView<C>::value; ---- [.small]#xref:absl/MakeSpan-09.adoc[_» more..._]# Constructs a mutable `Span<T>` from a C array. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename T, size_t N> constexpr xref:absl/Span.adoc[Span<T>] xref:absl/MakeSpan-0e2.adoc[MakeSpan](T(& array)[]) noexcept; ---- [.small]#xref:absl/MakeSpan-0e2.adoc[_» more..._]# Constructs a mutable `Span<T>` from a `[begin, end)]` pointer pair. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename T> xref:absl/Span.adoc[Span<T>] xref:absl/MakeSpan-0f.adoc[MakeSpan]( T* begin, T* end) noexcept; ---- [.small]#xref:absl/MakeSpan-0f.adoc[_» more..._]# Constructs a mutable `Span<T>` from a pointer and a size. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename T> constexpr xref:absl/Span.adoc[Span<T>] xref:absl/MakeSpan-0e4.adoc[MakeSpan]( T* ptr, size_t size) noexcept; ---- [.small]#xref:absl/MakeSpan-0e4.adoc[_» more..._]# == Return Value * A span over the elements of `c`. * A span over all elements of `array`. * A span over the range `[begin, end)]`. * A span over `size` elements starting at `ptr`. == Parameters [cols="1,4"] |=== | Name| Description | *c* | The container whose data the span refers to. | *array* | The array whose elements the span refers to. | *begin* | Pointer to the first element. | *end* | Pointer just past the last element. | *ptr* | Pointer to the first element. | *size* | Number of elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#