CTRE Phoenix 6 C++ 25.0.0-beta-4
Loading...
Searching...
No Matches
ctre::phoenix6::swerve::span< ElementType, Extent > Class Template Reference

#include <ctre/phoenix6/swerve/utility/span.hpp>

Public Types

using element_type = ElementType
 
using value_type = typename std::remove_cv<ElementType>::type
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using pointer = element_type*
 
using const_pointer = const element_type*
 
using reference = element_type&
 
using const_reference = const element_type&
 
using iterator = pointer
 
using reverse_iterator = std::reverse_iterator<iterator>
 
template<std::size_t Offset, std::size_t Count = dynamic_extent>
using subspan_return_t
 

Public Member Functions

template<std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||E<=0), int >::type = 0>
constexpr span () noexcept
 
constexpr span (pointer ptr, size_type count)
 
constexpr span (pointer first_elem, pointer last_elem)
 
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< element_type(&)[N], ElementType >::value, int >::type = 0>
constexpr span (element_type(&arr)[N]) noexcept
 
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< std::array< value_type, N > &, ElementType >::value, int >::type = 0>
constexpr span (std::array< value_type, N > &arr) noexcept
 
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< const std::array< value_type, N > &, ElementType >::value, int >::type = 0>
constexpr span (const std::array< value_type, N > &arr) noexcept
 
template<typename Container , std::size_t E = Extent, typename std::enable_if< E==dynamic_extent &&detail::is_container< Container >::value &&detail::is_container_element_type_compatible< Container &, ElementType >::value, int >::type = 0>
constexpr span (Container &cont)
 
template<typename Container , std::size_t E = Extent, typename std::enable_if< E==dynamic_extent &&detail::is_container< Container >::value &&detail::is_container_element_type_compatible< const Container &, ElementType >::value, int >::type = 0>
constexpr span (const Container &cont)
 
constexpr span (const span &other) noexcept=default
 
template<typename OtherElementType , std::size_t OtherExtent, typename std::enable_if<(Extent==OtherExtent||Extent==dynamic_extent) &&std::is_convertible< OtherElementType(*)[], ElementType(*)[]>::value, int >::type = 0>
constexpr span (const span< OtherElementType, OtherExtent > &other) noexcept
 
 ~span () noexcept=default
 
constexpr spanoperator= (const span &other) noexcept=default
 
template<std::size_t Count>
constexpr span< element_type, Count > first () const
 
template<std::size_t Count>
constexpr span< element_type, Count > last () const
 
template<std::size_t Offset, std::size_t Count = dynamic_extent>
constexpr subspan_return_t< Offset, Count > subspan () const
 
constexpr span< element_type, dynamic_extentfirst (size_type count) const
 
constexpr span< element_type, dynamic_extentlast (size_type count) const
 
constexpr span< element_type, dynamic_extentsubspan (size_type offset, size_type count=dynamic_extent) const
 
constexpr size_type size () const noexcept
 
constexpr size_type size_bytes () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr reference operator[] (size_type idx) const
 
constexpr reference front () const
 
constexpr reference back () const
 
constexpr pointer data () const noexcept
 
constexpr iterator begin () const noexcept
 
constexpr iterator end () const noexcept
 
constexpr reverse_iterator rbegin () const noexcept
 
constexpr reverse_iterator rend () const noexcept
 

Static Public Attributes

static constexpr size_type extent = Extent
 

Member Typedef Documentation

◆ const_pointer

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::const_pointer = const element_type*

◆ const_reference

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::const_reference = const element_type&

◆ difference_type

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::difference_type = std::ptrdiff_t

◆ element_type

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::element_type = ElementType

◆ iterator

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::iterator = pointer

◆ pointer

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::pointer = element_type*

◆ reference

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::reference = element_type&

◆ reverse_iterator

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::reverse_iterator = std::reverse_iterator<iterator>

◆ size_type

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::size_type = std::size_t

◆ subspan_return_t

template<typename ElementType , std::size_t Extent>
template<std::size_t Offset, std::size_t Count = dynamic_extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::subspan_return_t
Initial value:
span<ElementType, Count != dynamic_extent
? Count
: (Extent != dynamic_extent ? Extent - Offset
constexpr span() noexcept
Definition span.hpp:165
constexpr std::size_t dynamic_extent
Definition span.hpp:46

◆ value_type

template<typename ElementType , std::size_t Extent>
using ctre::phoenix6::swerve::span< ElementType, Extent >::value_type = typename std::remove_cv<ElementType>::type

Constructor & Destructor Documentation

◆ span() [1/10]

template<typename ElementType , std::size_t Extent>
template<std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||E<=0), int >::type = 0>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( )
inlineconstexprnoexcept

◆ span() [2/10]

template<typename ElementType , std::size_t Extent>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( pointer ptr,
size_type count )
inlineconstexpr

◆ span() [3/10]

template<typename ElementType , std::size_t Extent>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( pointer first_elem,
pointer last_elem )
inlineconstexpr

◆ span() [4/10]

template<typename ElementType , std::size_t Extent>
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< element_type(&)[N], ElementType >::value, int >::type = 0>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( element_type(&) arr[N])
inlineconstexprnoexcept

◆ span() [5/10]

template<typename ElementType , std::size_t Extent>
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< std::array< value_type, N > &, ElementType >::value, int >::type = 0>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( std::array< value_type, N > & arr)
inlineconstexprnoexcept

◆ span() [6/10]

template<typename ElementType , std::size_t Extent>
template<std::size_t N, std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< const std::array< value_type, N > &, ElementType >::value, int >::type = 0>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( const std::array< value_type, N > & arr)
inlineconstexprnoexcept

◆ span() [7/10]

template<typename ElementType , std::size_t Extent>
template<typename Container , std::size_t E = Extent, typename std::enable_if< E==dynamic_extent &&detail::is_container< Container >::value &&detail::is_container_element_type_compatible< Container &, ElementType >::value, int >::type = 0>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( Container & cont)
inlineconstexpr

◆ span() [8/10]

template<typename ElementType , std::size_t Extent>
template<typename Container , std::size_t E = Extent, typename std::enable_if< E==dynamic_extent &&detail::is_container< Container >::value &&detail::is_container_element_type_compatible< const Container &, ElementType >::value, int >::type = 0>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( const Container & cont)
inlineconstexpr

◆ span() [9/10]

template<typename ElementType , std::size_t Extent>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( const span< ElementType, Extent > & other)
constexprdefaultnoexcept

◆ span() [10/10]

template<typename ElementType , std::size_t Extent>
template<typename OtherElementType , std::size_t OtherExtent, typename std::enable_if<(Extent==OtherExtent||Extent==dynamic_extent) &&std::is_convertible< OtherElementType(*)[], ElementType(*)[]>::value, int >::type = 0>
constexpr ctre::phoenix6::swerve::span< ElementType, Extent >::span ( const span< OtherElementType, OtherExtent > & other)
inlineconstexprnoexcept

◆ ~span()

template<typename ElementType , std::size_t Extent>
ctre::phoenix6::swerve::span< ElementType, Extent >::~span ( )
defaultnoexcept

Member Function Documentation

◆ back()

template<typename ElementType , std::size_t Extent>
constexpr reference ctre::phoenix6::swerve::span< ElementType, Extent >::back ( ) const
inlineconstexpr

◆ begin()

template<typename ElementType , std::size_t Extent>
constexpr iterator ctre::phoenix6::swerve::span< ElementType, Extent >::begin ( ) const
inlineconstexprnoexcept

◆ data()

template<typename ElementType , std::size_t Extent>
constexpr pointer ctre::phoenix6::swerve::span< ElementType, Extent >::data ( ) const
inlineconstexprnoexcept

◆ empty()

template<typename ElementType , std::size_t Extent>
constexpr bool ctre::phoenix6::swerve::span< ElementType, Extent >::empty ( ) const
inlineconstexprnoexcept

◆ end()

template<typename ElementType , std::size_t Extent>
constexpr iterator ctre::phoenix6::swerve::span< ElementType, Extent >::end ( ) const
inlineconstexprnoexcept

◆ first() [1/2]

template<typename ElementType , std::size_t Extent>
template<std::size_t Count>
constexpr span< element_type, Count > ctre::phoenix6::swerve::span< ElementType, Extent >::first ( ) const
inlineconstexpr

◆ first() [2/2]

template<typename ElementType , std::size_t Extent>
constexpr span< element_type, dynamic_extent > ctre::phoenix6::swerve::span< ElementType, Extent >::first ( size_type count) const
inlineconstexpr

◆ front()

template<typename ElementType , std::size_t Extent>
constexpr reference ctre::phoenix6::swerve::span< ElementType, Extent >::front ( ) const
inlineconstexpr

◆ last() [1/2]

template<typename ElementType , std::size_t Extent>
template<std::size_t Count>
constexpr span< element_type, Count > ctre::phoenix6::swerve::span< ElementType, Extent >::last ( ) const
inlineconstexpr

◆ last() [2/2]

template<typename ElementType , std::size_t Extent>
constexpr span< element_type, dynamic_extent > ctre::phoenix6::swerve::span< ElementType, Extent >::last ( size_type count) const
inlineconstexpr

◆ operator=()

template<typename ElementType , std::size_t Extent>
constexpr span & ctre::phoenix6::swerve::span< ElementType, Extent >::operator= ( const span< ElementType, Extent > & other)
constexprdefaultnoexcept

◆ operator[]()

template<typename ElementType , std::size_t Extent>
constexpr reference ctre::phoenix6::swerve::span< ElementType, Extent >::operator[] ( size_type idx) const
inlineconstexpr

◆ rbegin()

template<typename ElementType , std::size_t Extent>
constexpr reverse_iterator ctre::phoenix6::swerve::span< ElementType, Extent >::rbegin ( ) const
inlineconstexprnoexcept

◆ rend()

template<typename ElementType , std::size_t Extent>
constexpr reverse_iterator ctre::phoenix6::swerve::span< ElementType, Extent >::rend ( ) const
inlineconstexprnoexcept

◆ size()

template<typename ElementType , std::size_t Extent>
constexpr size_type ctre::phoenix6::swerve::span< ElementType, Extent >::size ( ) const
inlineconstexprnoexcept

◆ size_bytes()

template<typename ElementType , std::size_t Extent>
constexpr size_type ctre::phoenix6::swerve::span< ElementType, Extent >::size_bytes ( ) const
inlineconstexprnoexcept

◆ subspan() [1/2]

template<typename ElementType , std::size_t Extent>
template<std::size_t Offset, std::size_t Count = dynamic_extent>
constexpr subspan_return_t< Offset, Count > ctre::phoenix6::swerve::span< ElementType, Extent >::subspan ( ) const
inlineconstexpr

◆ subspan() [2/2]

template<typename ElementType , std::size_t Extent>
constexpr span< element_type, dynamic_extent > ctre::phoenix6::swerve::span< ElementType, Extent >::subspan ( size_type offset,
size_type count = dynamic_extent ) const
inlineconstexpr

Member Data Documentation

◆ extent

template<typename ElementType , std::size_t Extent>
constexpr size_type ctre::phoenix6::swerve::span< ElementType, Extent >::extent = Extent
staticconstexpr

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