sparrow 0.9.0
Loading...
Searching...
No Matches
sparrow::sequence_view< T, Extent > Class Template Reference

The class sequence_view describes an object that can refer to a constant contiguous sequence of T with the first element of the sequence at position zero. More...

#include <sequence_view.hpp>

Inheritance diagram for sparrow::sequence_view< T, Extent >:
[legend]
Collaboration diagram for sparrow::sequence_view< T, Extent >:
[legend]

Public Types

using base_type = std::span<T, Extent>
 
using value_type = typename base_type::value_type
 

Public Member Functions

 operator std::vector< value_type > () const noexcept
 

Detailed Description

template<class T, std::size_t Extent = std::dynamic_extent>
class sparrow::sequence_view< T, Extent >

The class sequence_view describes an object that can refer to a constant contiguous sequence of T with the first element of the sequence at position zero.

It is similar to string_view, but for arbitrary T. You can consider it as a span or range supporting const operations only, and comparison operators.

Definition at line 37 of file sequence_view.hpp.

Member Typedef Documentation

◆ base_type

template<class T, std::size_t Extent = std::dynamic_extent>
using sparrow::sequence_view< T, Extent >::base_type = std::span<T, Extent>

Definition at line 41 of file sequence_view.hpp.

◆ value_type

template<class T, std::size_t Extent = std::dynamic_extent>
using sparrow::sequence_view< T, Extent >::value_type = typename base_type::value_type

Definition at line 42 of file sequence_view.hpp.

Member Function Documentation

◆ operator std::vector< value_type >()

template<class T, std::size_t Extent = std::dynamic_extent>
sparrow::sequence_view< T, Extent >::operator std::vector< value_type > ( ) const
inlineexplicitnoexcept

Definition at line 46 of file sequence_view.hpp.


The documentation for this class was generated from the following file: