22 Containers library [containers]

22.7 Views [views]

22.7.2 Header <span> synopsis [span.syn]

namespace std {
  // constants
  inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max();

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

  // [span.objectrep], views of object representation
  template<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;

  // [span.tuple], tuple interface
  template<class T> class tuple_size;
  template<size_t I, class T> class tuple_element;
  template<class ElementType, size_t Extent>
    struct tuple_size<span<ElementType, Extent>>;
  template<class ElementType>
    struct tuple_size<span<ElementType, dynamic_extent>>;       // not defined
  template<size_t I, class ElementType, size_t Extent>
    struct tuple_element<I, span<ElementType, Extent>>;
  template<size_t I, class ElementType, size_t Extent>
    constexpr ElementType& get(span<ElementType, Extent>) noexcept;
}