sparrow 0.3.0
Loading...
Searching...
No Matches
sparrow::vector_view< T > Class Template Reference

The class vector_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 <vector_view.hpp>

Inheritance diagram for sparrow::vector_view< T >:
[legend]
Collaboration diagram for sparrow::vector_view< T >:
[legend]

Public Types

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

Public Member Functions

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

Detailed Description

template<class T>
class sparrow::vector_view< T >

The class vector_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 34 of file vector_view.hpp.

Member Typedef Documentation

◆ base_type

template<class T>
using sparrow::vector_view< T >::base_type = std::span<T>

Definition at line 38 of file vector_view.hpp.

◆ value_type

template<class T>
using sparrow::vector_view< T >::value_type = typename base_type::value_type

Definition at line 39 of file vector_view.hpp.

Member Function Documentation

◆ operator std::vector< value_type >()

template<class T>
sparrow::vector_view< T >::operator std::vector< value_type > ( ) const
inlineexplicitnoexcept

Definition at line 43 of file vector_view.hpp.


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