Template Class span

Class Documentation

template<class T, std::size_t E>
class span

Public Types

typedef T element_type
typedef std::remove_cv<T>::type value_type
typedef std::size_t size_type
typedef std::ptrdiff_t difference_type
typedef T *pointer
typedef const T *const_pointer
typedef T &reference
typedef const T &const_reference
typedef T *iterator
typedef const T *const_iterator
typedef std::reverse_iterator<T*> reverse_iterator
typedef std::reverse_iterator<const T*> const_reverse_iterator

Public Functions

template<std::size_t N = E, typename std::enable_if<N == dynamic_extent || N == 0, int>::type = 0>
inline constexpr span() noexcept
template<class I, typename std::enable_if<E == dynamic_extent && detail::span_convertible<I, T>::value, int>::type = 0>
inline constexpr span(I *f, size_type c)
template<class I, typename std::enable_if<E != dynamic_extent && detail::span_convertible<I, T>::value, int>::type = 0>
inline explicit constexpr span(I *f, size_type c)
template<class I, class L, typename std::enable_if<E == dynamic_extent && detail::span_convertible<I, T>::value, int>::type = 0>
inline constexpr span(I *f, L *l)
template<class I, class L, typename std::enable_if<E != dynamic_extent && detail::span_convertible<I, T>::value, int>::type = 0>
inline explicit constexpr span(I *f, L *l)
template<std::size_t N, typename std::enable_if<detail::span_capacity<E, N>::value, int>::type = 0>
inline constexpr span(typename std::enable_if<true, T>::type (&a)[N]) noexcept
template<class U, std::size_t N, typename std::enable_if<detail::span_compatible<T, E, U, N>::value, int>::type = 0>
inline constexpr span(std::array<U, N> &a) noexcept
template<class U, std::size_t N, typename std::enable_if<detail::span_compatible<T, E, const U, N>::value, int>::type = 0>
inline constexpr span(const std::array<U, N> &a) noexcept
template<class R, typename std::enable_if<E == dynamic_extent && detail::span_is_range<R, T>::value, int>::type = 0>
inline constexpr span(R &&r) noexcept(noexcept(boost::data(r)) && noexcept(r.size()))
template<class R, typename std::enable_if<E != dynamic_extent && detail::span_is_range<R, T>::value, int>::type = 0>
inline explicit constexpr span(R &&r) noexcept(noexcept(boost::data(r)) && noexcept(r.size()))
template<class U, std::size_t N, typename std::enable_if<detail::span_implicit<E, N>::value && detail::span_copyable<T, E, U, N>::value, int>::type = 0>
inline constexpr span(const span<U, N> &s) noexcept
template<class U, std::size_t N, typename std::enable_if<!detail::span_implicit<E, N>::value && detail::span_copyable<T, E, U, N>::value, int>::type = 0>
inline explicit constexpr span(const span<U, N> &s) noexcept
template<std::size_t C>
inline constexpr span<T, C> first() const
template<std::size_t C>
inline constexpr span<T, C> last() const
template<std::size_t O, std::size_t C = dynamic_extent>
inline constexpr std::enable_if<C == dynamic_extent, span<T, detail::span_sub<E, O>::value>>::type subspan() const
template<std::size_t O, std::size_t C = dynamic_extent>
inline constexpr std::enable_if<C != dynamic_extent, span<T, C>>::type subspan() const
inline constexpr span<T, dynamic_extent> first(size_type c) const
inline constexpr span<T, dynamic_extent> last(size_type c) const
inline constexpr span<T, dynamic_extent> subspan(size_type o, size_type c = dynamic_extent) const
inline constexpr size_type size() const noexcept
inline constexpr size_type size_bytes() const noexcept
inline constexpr bool empty() const noexcept
inline constexpr reference operator[](size_type i) const
inline constexpr reference front() const
inline constexpr reference back() const
inline constexpr pointer data() const noexcept
inline constexpr iterator begin() const noexcept
inline constexpr iterator end() const noexcept
inline constexpr reverse_iterator rbegin() const noexcept
inline constexpr reverse_iterator rend() const noexcept
inline constexpr const_iterator cbegin() const noexcept
inline constexpr const_iterator cend() const noexcept
inline constexpr const_reverse_iterator crbegin() const noexcept
inline constexpr const_reverse_iterator crend() const noexcept

Public Static Attributes

static constexpr std::size_t extent = E