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 (span< U > o) noexcept
 
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U (*)[], T (*)[]>>>
 multi_span (std::initializer_list< 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 195 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 204 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 206 of file multi_span.h.

◆ difference_type

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

Definition at line 200 of file multi_span.h.

◆ element_type

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

Definition at line 197 of file multi_span.h.

◆ index_type

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

Definition at line 199 of file multi_span.h.

◆ iterator

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

Definition at line 203 of file multi_span.h.

◆ pointer

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

Definition at line 201 of file multi_span.h.

◆ reference

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

Definition at line 202 of file multi_span.h.

◆ reverse_iterator

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

Definition at line 205 of file multi_span.h.

◆ value_type

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

Definition at line 198 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 208 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 ( span< U >  o)
inlinenoexcept

Definition at line 213 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< span< U > >  i_spans)
inlinenoexcept

Definition at line 218 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 229 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 252 of file multi_span.h.

◆ begin() [2/2]

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

Definition at line 251 of file multi_span.h.

◆ cbegin()

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

Definition at line 255 of file multi_span.h.

◆ cend()

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

Definition at line 265 of file multi_span.h.

◆ crbegin()

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

Definition at line 275 of file multi_span.h.

◆ crend()

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

Definition at line 285 of file multi_span.h.

◆ diag()

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

Definition at line 301 of file multi_span.h.

◆ empty()

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

Definition at line 297 of file multi_span.h.

◆ end() [1/2]

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

Definition at line 262 of file multi_span.h.

◆ end() [2/2]

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

Definition at line 259 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 289 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 272 of file multi_span.h.

◆ rbegin() [2/2]

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

Definition at line 269 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 282 of file multi_span.h.

◆ rend() [2/2]

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

Definition at line 279 of file multi_span.h.

◆ size()

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

Definition at line 294 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 327 of file multi_span.h.


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