21 Containers library [containers]

21.7 Views [views]

21.7.2 Header <span> synopsis [span.syn]

namespace std {
  // constants
  inline constexpr ptrdiff_t dynamic_extent = -1;

  // [views.span], class template span
  template<class ElementType, ptrdiff_t Extent = dynamic_extent>
    class span;

  // [span.objectrep], views of object representation
  template<class ElementType, ptrdiff_t Extent>
    span<const byte,
         Extent == dynamic_extent ? dynamic_extent
                                  : static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent>
      as_bytes(span<ElementType, Extent> s) noexcept;

  template<class ElementType, ptrdiff_t Extent>
    span<byte,
         Extent == dynamic_extent ? dynamic_extent
                                  : static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent>
      as_writable_bytes(span<ElementType, Extent> s) noexcept;
}