xtensor
Loading...
Searching...
No Matches
xt::const_array< T, N > Struct Template Reference

A std::array like class with all member function (except reverse iterators) as constexpr. More...

#include <xstorage.hpp>

Public Types

using size_type = std::size_t
 
using value_type = T
 
using pointer = value_type*
 
using const_pointer = const value_type*
 
using reference = value_type&
 
using const_reference = const value_type&
 
using difference_type = std::ptrdiff_t
 
using iterator = pointer
 
using const_iterator = const_pointer
 
using reverse_iterator = std::reverse_iterator<const_iterator>
 
using const_reverse_iterator = std::reverse_iterator<const_iterator>
 

Public Member Functions

constexpr const_reference operator[] (std::size_t idx) const
 
constexpr const_iterator begin () const noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
reverse_iterator rbegin () const noexcept
 
reverse_iterator rend () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
constexpr const_pointer data () const noexcept
 
constexpr const_reference front () const noexcept
 
constexpr const_reference back () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr size_type size () const noexcept
 

Public Attributes

constm_data [N > 0 ? N :1]
 

Detailed Description

template<class T, std::size_t N>
struct xt::const_array< T, N >

A std::array like class with all member function (except reverse iterators) as constexpr.

The data is immutable once set.

Definition at line 1492 of file xstorage.hpp.

Member Typedef Documentation

◆ const_iterator

template<class T , std::size_t N>
using xt::const_array< T, N >::const_iterator = const_pointer

Definition at line 1502 of file xstorage.hpp.

◆ const_pointer

template<class T , std::size_t N>
using xt::const_array< T, N >::const_pointer = const value_type*

Definition at line 1497 of file xstorage.hpp.

◆ const_reference

template<class T , std::size_t N>
using xt::const_array< T, N >::const_reference = const value_type&

Definition at line 1499 of file xstorage.hpp.

◆ const_reverse_iterator

template<class T , std::size_t N>
using xt::const_array< T, N >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 1505 of file xstorage.hpp.

◆ difference_type

template<class T , std::size_t N>
using xt::const_array< T, N >::difference_type = std::ptrdiff_t

Definition at line 1500 of file xstorage.hpp.

◆ iterator

template<class T , std::size_t N>
using xt::const_array< T, N >::iterator = pointer

Definition at line 1501 of file xstorage.hpp.

◆ pointer

template<class T , std::size_t N>
using xt::const_array< T, N >::pointer = value_type*

Definition at line 1496 of file xstorage.hpp.

◆ reference

template<class T , std::size_t N>
using xt::const_array< T, N >::reference = value_type&

Definition at line 1498 of file xstorage.hpp.

◆ reverse_iterator

template<class T , std::size_t N>
using xt::const_array< T, N >::reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 1504 of file xstorage.hpp.

◆ size_type

template<class T , std::size_t N>
using xt::const_array< T, N >::size_type = std::size_t

Definition at line 1494 of file xstorage.hpp.

◆ value_type

template<class T , std::size_t N>
using xt::const_array< T, N >::value_type = T

Definition at line 1495 of file xstorage.hpp.

Member Function Documentation

◆ back()

template<class T , std::size_t N>
constexpr const_reference xt::const_array< T, N >::back ( ) const
inlineconstexprnoexcept

Definition at line 1575 of file xstorage.hpp.

◆ begin()

template<class T , std::size_t N>
constexpr const_iterator xt::const_array< T, N >::begin ( ) const
inlineconstexprnoexcept

Definition at line 1516 of file xstorage.hpp.

◆ cbegin()

template<class T , std::size_t N>
constexpr const_iterator xt::const_array< T, N >::cbegin ( ) const
inlineconstexprnoexcept

Definition at line 1526 of file xstorage.hpp.

◆ cend()

template<class T , std::size_t N>
constexpr const_iterator xt::const_array< T, N >::cend ( ) const
inlineconstexprnoexcept

Definition at line 1531 of file xstorage.hpp.

◆ crbegin()

template<class T , std::size_t N>
const_reverse_iterator xt::const_array< T, N >::crbegin ( ) const
inlinenoexcept

Definition at line 1547 of file xstorage.hpp.

◆ crend()

template<class T , std::size_t N>
const_reverse_iterator xt::const_array< T, N >::crend ( ) const
inlinenoexcept

Definition at line 1552 of file xstorage.hpp.

◆ data()

template<class T , std::size_t N>
constexpr const_pointer xt::const_array< T, N >::data ( ) const
inlineconstexprnoexcept

Definition at line 1557 of file xstorage.hpp.

◆ empty()

template<class T , std::size_t N>
constexpr bool xt::const_array< T, N >::empty ( ) const
inlineconstexprnoexcept

Definition at line 1585 of file xstorage.hpp.

◆ end()

template<class T , std::size_t N>
constexpr const_iterator xt::const_array< T, N >::end ( ) const
inlineconstexprnoexcept

Definition at line 1521 of file xstorage.hpp.

◆ front()

template<class T , std::size_t N>
constexpr const_reference xt::const_array< T, N >::front ( ) const
inlineconstexprnoexcept

Definition at line 1566 of file xstorage.hpp.

◆ operator[]()

template<class T , std::size_t N>
constexpr const_reference xt::const_array< T, N >::operator[] ( std::size_t idx) const
inlineconstexpr

Definition at line 1507 of file xstorage.hpp.

◆ rbegin()

template<class T , std::size_t N>
reverse_iterator xt::const_array< T, N >::rbegin ( ) const
inlinenoexcept

Definition at line 1537 of file xstorage.hpp.

◆ rend()

template<class T , std::size_t N>
reverse_iterator xt::const_array< T, N >::rend ( ) const
inlinenoexcept

Definition at line 1542 of file xstorage.hpp.

◆ size()

template<class T , std::size_t N>
constexpr size_type xt::const_array< T, N >::size ( ) const
inlineconstexprnoexcept

Definition at line 1590 of file xstorage.hpp.

Member Data Documentation

◆ m_data

template<class T , std::size_t N>
const T xt::const_array< T, N >::m_data[N > 0 ? N :1]

Definition at line 1598 of file xstorage.hpp.


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