[#absl-MakeConstAnySpan-0f] = xref:absl.adoc[absl]::MakeConstAnySpan :relfileprefix: ../ :mrdocs: `MakeConstAnySpan` overloads == Synopses Declared in `<absl/types/any_span.h>` Constructs a const `AnySpan` from a view container or array. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename Container, typename T = any_span_internal::ElementType<Container const>> xref:absl/AnySpan.adoc[AnySpan<T const>] xref:absl/MakeConstAnySpan-0e.adoc[MakeConstAnySpan](Container const& c) requires absl::type_traits_internal::IsView<Container>::value; ---- [.small]#xref:absl/MakeConstAnySpan-0e.adoc[_» more..._]# Constructs a const `AnySpan` from a non‐view container or array. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename Container, typename T = any_span_internal::ElementType<Container const>> xref:absl/AnySpan.adoc[AnySpan<T const>] xref:absl/MakeConstAnySpan-05.adoc[MakeConstAnySpan](Container const& c) requires !absl::type_traits_internal::IsView<Container>::value; ---- [.small]#xref:absl/MakeConstAnySpan-05.adoc[_» more..._]# Constructs a const `AnySpan` from a pointer and a size. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename T> xref:absl/AnySpan.adoc[AnySpan<T const>] xref:absl/MakeConstAnySpan-08.adoc[MakeConstAnySpan]( T const* ptr, std::size_t size); ---- [.small]#xref:absl/MakeConstAnySpan-08.adoc[_» more..._]# == Return Value * A read‐only `AnySpan` over the elements of `c`. * A read‐only `AnySpan` over `size` elements starting at `ptr`. == Parameters [cols="1,4"] |=== | Name| Description | *c* | The container whose elements the span refers to. | *ptr* | Pointer to the first element. | *size* | Number of elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#