Files
2025-10-25 03:02:53 +03:00

14 lines
2.6 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[span.syn]
# 23 Containers library [[containers]](./#containers)
## 23.7 Views [[views]](views#span.syn)
### 23.7.2 Contiguous access [[views.contiguous]](views.contiguous#span.syn)
#### 23.7.2.1 Header <span> synopsis [span.syn]
[🔗](#header:%3cspan%3e)
#include <initializer_list> // see [[initializer.list.syn]](initializer.list.syn "17.11.2Header <initializer_­list> synopsis")// mostly freestandingnamespace std {// constantsinline constexpr size_t [dynamic_extent](#lib:dynamic_extent "23.7.2.1Header <span> synopsis[span.syn]") = numeric_limits<size_t>::max(); template<class T>concept [*integral-constant-like*](#concept:integral-constant-like "23.7.2.1Header <span> synopsis[span.syn]") = // *exposition only* is_integral_v<remove_cvref_t<decltype(T::value)>> &&!is_same_v<bool, remove_const_t<decltype(T::value)>> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4Concept convertible_­to[concept.convertible]")<T, decltype(T::value)> &&[equality_comparable_with](concept.equalitycomparable#concept:equality_comparable_with "18.5.4Concept equality_­comparable[concept.equalitycomparable]")<T, decltype(T::value)> && bool_constant<T() == T::value>::value && bool_constant<static_cast<decltype(T::value)>(T()) == T::value>::value; template<class T>constexpr size_t [*maybe-static-ext*](#concept:maybe-static-ext "23.7.2.1Header <span> synopsis[span.syn]") = dynamic_extent; // *exposition only*template<[*integral-constant-like*](#concept:integral-constant-like "23.7.2.1Header <span> synopsis[span.syn]") T>constexpr size_t [*maybe-static-ext*](#concept:maybe-static-ext "23.7.2.1Header <span> synopsis[span.syn]")<T> = {T::value}; // [[views.span]](views.span "23.7.2.2Class template span"), class template spantemplate<class ElementType, size_t Extent = dynamic_extent>class span; // partially freestandingtemplate<class ElementType, size_t Extent>constexpr bool ranges::enable_view<span<ElementType, Extent>> = true; template<class ElementType, size_t Extent>constexpr bool ranges::enable_borrowed_range<span<ElementType, Extent>> = true; // [[span.objectrep]](span.objectrep "23.7.2.3Views of object representation"), views of object representationtemplate<class ElementType, size_t Extent> span<const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent> as_bytes(span<ElementType, Extent> s) noexcept; template<class ElementType, size_t Extent> span<byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent> as_writable_bytes(span<ElementType, Extent> s) noexcept;}