kblib  0.2.3
General utilities library for modern C++
kblib::multi_span< T > Class Template Reference

#include <kblib/multi_span.h>

Public Types

using element_type = T
 
using value_type = std::remove_cv< T >
 
using index_type = std::ptrdiff_t
 
using difference_type = std::ptrdiff_t
 
using pointer = T *
 
using reference = T &
 
using iterator = multi_impl::mulspan_iterator< T >
 
using const_iterator = multi_impl::mulspan_iterator< const T >
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 

Public Member Functions

 multi_span () noexcept
 
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U (*)[], T (*)[]>>>
 multi_span (gsl::span< U > o) noexcept
 
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U (*)[], T (*)[]>>>
 multi_span (std::initializer_list< gsl::span< U >> i_spans) noexcept
 
template<typename Iterator >
 multi_span (Iterator begin, Iterator end) noexcept
 
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U (*)[], T (*)[]>>>
 multi_span (const multi_span< U > &)
 
 multi_span (const multi_span &)=default
 
 multi_span (multi_span &&) noexcept=default
 
auto operator= (const multi_span &) -> multi_span &=default
 
auto operator= (multi_span &&) noexcept -> multi_span &=default
 
 ~multi_span ()=default
 
auto begin () noexcept -> iterator
 
auto begin () const noexcept -> const_iterator
 
auto cbegin () const noexcept -> const_iterator
 
auto end () noexcept -> iterator
 
auto end () const noexcept -> const_iterator
 
auto cend () const noexcept -> const_iterator
 
auto rbegin () noexcept -> reverse_iterator
 
auto rbegin () const noexcept -> const_reverse_iterator
 
auto crbegin () const noexcept -> const_reverse_iterator
 
auto rend () noexcept -> reverse_iterator
 
auto rend () const noexcept -> const_reverse_iterator
 
auto crend () const noexcept -> const_reverse_iterator
 
reference operator[] (index_type i) const
 
auto size () const noexcept -> index_type
 
auto empty () const noexcept -> bool
 
auto diag (std::ostream &os) const noexcept -> void
 

Friends

template<typename U >
class multi_impl::mulspan_iterator
 

Detailed Description

template<typename T>
class kblib::multi_span< T >

Definition at line 183 of file multi_span.h.

Member Typedef Documentation

◆ const_iterator

template<typename T >
using kblib::multi_span< T >::const_iterator = multi_impl::mulspan_iterator<const T>

Definition at line 192 of file multi_span.h.

◆ const_reverse_iterator

template<typename T >
using kblib::multi_span< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 194 of file multi_span.h.

◆ difference_type

template<typename T >
using kblib::multi_span< T >::difference_type = std::ptrdiff_t

Definition at line 188 of file multi_span.h.

◆ element_type

template<typename T >
using kblib::multi_span< T >::element_type = T

Definition at line 185 of file multi_span.h.

◆ index_type

template<typename T >
using kblib::multi_span< T >::index_type = std::ptrdiff_t

Definition at line 187 of file multi_span.h.

◆ iterator

template<typename T >
using kblib::multi_span< T >::iterator = multi_impl::mulspan_iterator<T>

Definition at line 191 of file multi_span.h.

◆ pointer

template<typename T >
using kblib::multi_span< T >::pointer = T*

Definition at line 189 of file multi_span.h.

◆ reference

template<typename T >
using kblib::multi_span< T >::reference = T&

Definition at line 190 of file multi_span.h.

◆ reverse_iterator

template<typename T >
using kblib::multi_span< T >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 193 of file multi_span.h.

◆ value_type

template<typename T >
using kblib::multi_span< T >::value_type = std::remove_cv<T>

Definition at line 186 of file multi_span.h.

Constructor & Destructor Documentation

◆ multi_span() [1/7]

template<typename T >
kblib::multi_span< T >::multi_span ( )
inlinenoexcept

Definition at line 196 of file multi_span.h.

◆ multi_span() [2/7]

template<typename T >
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U (*)[], T (*)[]>>>
kblib::multi_span< T >::multi_span ( gsl::span< U >  o)
inlinenoexcept

Definition at line 201 of file multi_span.h.

◆ multi_span() [3/7]

template<typename T >
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U (*)[], T (*)[]>>>
kblib::multi_span< T >::multi_span ( std::initializer_list< gsl::span< U >>  i_spans)
inlinenoexcept

Definition at line 206 of file multi_span.h.

◆ multi_span() [4/7]

template<typename T >
template<typename Iterator >
kblib::multi_span< T >::multi_span ( Iterator  begin,
Iterator  end 
)
inlinenoexcept

Definition at line 218 of file multi_span.h.

◆ multi_span() [5/7]

template<typename T >
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U (*)[], T (*)[]>>>
kblib::multi_span< T >::multi_span ( const multi_span< U > &  )

◆ multi_span() [6/7]

template<typename T >
kblib::multi_span< T >::multi_span ( const multi_span< T > &  )
default

◆ multi_span() [7/7]

template<typename T >
kblib::multi_span< T >::multi_span ( multi_span< T > &&  )
defaultnoexcept

◆ ~multi_span()

template<typename T >
kblib::multi_span< T >::~multi_span ( )
default

Member Function Documentation

◆ begin() [1/2]

template<typename T >
auto kblib::multi_span< T >::begin ( ) const -> const_iterator
inlinenoexcept

Definition at line 241 of file multi_span.h.

◆ begin() [2/2]

template<typename T >
auto kblib::multi_span< T >::begin ( ) -> iterator
inlinenoexcept

Definition at line 240 of file multi_span.h.

◆ cbegin()

template<typename T >
auto kblib::multi_span< T >::cbegin ( ) const -> const_iterator
inlinenoexcept

Definition at line 244 of file multi_span.h.

◆ cend()

template<typename T >
auto kblib::multi_span< T >::cend ( ) const -> const_iterator
inlinenoexcept

Definition at line 254 of file multi_span.h.

◆ crbegin()

template<typename T >
auto kblib::multi_span< T >::crbegin ( ) const -> const_reverse_iterator
inlinenoexcept

Definition at line 264 of file multi_span.h.

◆ crend()

template<typename T >
auto kblib::multi_span< T >::crend ( ) const -> const_reverse_iterator
inlinenoexcept

Definition at line 274 of file multi_span.h.

◆ diag()

template<typename T >
auto kblib::multi_span< T >::diag ( std::ostream &  os) const -> void
inlinenoexcept

Definition at line 290 of file multi_span.h.

◆ empty()

template<typename T >
auto kblib::multi_span< T >::empty ( ) const -> bool
inlinenoexcept

Definition at line 286 of file multi_span.h.

◆ end() [1/2]

template<typename T >
auto kblib::multi_span< T >::end ( ) const -> const_iterator
inlinenoexcept

Definition at line 251 of file multi_span.h.

◆ end() [2/2]

template<typename T >
auto kblib::multi_span< T >::end ( ) -> iterator
inlinenoexcept

Definition at line 248 of file multi_span.h.

◆ operator=() [1/2]

template<typename T >
auto kblib::multi_span< T >::operator= ( const multi_span< T > &  ) -> multi_span &=default
default

◆ operator=() [2/2]

template<typename T >
auto kblib::multi_span< T >::operator= ( multi_span< T > &&  ) -> multi_span &=default
defaultnoexcept

◆ operator[]()

template<typename T >
reference kblib::multi_span< T >::operator[] ( index_type  i) const
inline

Definition at line 278 of file multi_span.h.

◆ rbegin() [1/2]

template<typename T >
auto kblib::multi_span< T >::rbegin ( ) const -> const_reverse_iterator
inlinenoexcept

Definition at line 261 of file multi_span.h.

◆ rbegin() [2/2]

template<typename T >
auto kblib::multi_span< T >::rbegin ( ) -> reverse_iterator
inlinenoexcept

Definition at line 258 of file multi_span.h.

◆ rend() [1/2]

template<typename T >
auto kblib::multi_span< T >::rend ( ) const -> const_reverse_iterator
inlinenoexcept

Definition at line 271 of file multi_span.h.

◆ rend() [2/2]

template<typename T >
auto kblib::multi_span< T >::rend ( ) -> reverse_iterator
inlinenoexcept

Definition at line 268 of file multi_span.h.

◆ size()

template<typename T >
auto kblib::multi_span< T >::size ( ) const -> index_type
inlinenoexcept

Definition at line 283 of file multi_span.h.

Friends And Related Function Documentation

◆ multi_impl::mulspan_iterator

template<typename T >
template<typename U >
friend class multi_impl::mulspan_iterator
friend

Definition at line 316 of file multi_span.h.


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