souffle
2.0.2-371-g6315b36
|
#include <span.h>
Public Types | |
using | const_pointer = const element_type * |
using | const_reference = const element_type & |
using | difference_type = std::ptrdiff_t |
using | element_type = ElementType |
using | iterator = pointer |
using | pointer = element_type * |
using | reference = element_type & |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | size_type = std::size_t |
template<std::size_t Offset, std::size_t Count = dynamic_extent> | |
using | subspan_return_t = span< ElementType, Count !=dynamic_extent ? Count :(Extent !=dynamic_extent ? Extent - Offset :dynamic_extent)> |
using | value_type = typename std::remove_cv< ElementType >::type |
Public Member Functions | |
TCB_SPAN_CONSTEXPR11 reference | back () const |
constexpr iterator | begin () const noexcept |
constexpr pointer | data () const noexcept |
constexpr TCB_SPAN_NODISCARD bool | empty () const noexcept |
constexpr iterator | end () const noexcept |
template<std::size_t Count> | |
TCB_SPAN_CONSTEXPR11 span< element_type, Count > | first () const |
TCB_SPAN_CONSTEXPR11 span< element_type, dynamic_extent > | first (size_type count) const |
TCB_SPAN_CONSTEXPR11 reference | front () const |
template<std::size_t Count> | |
TCB_SPAN_CONSTEXPR11 span< element_type, Count > | last () const |
TCB_SPAN_CONSTEXPR11 span< element_type, dynamic_extent > | last (size_type count) const |
TCB_SPAN_CONSTEXPR_ASSIGN span & | operator= (const span &other) noexcept=default |
TCB_SPAN_CONSTEXPR11 reference | operator[] (size_type idx) const |
TCB_SPAN_ARRAY_CONSTEXPR reverse_iterator | rbegin () const noexcept |
TCB_SPAN_ARRAY_CONSTEXPR reverse_iterator | rend () const noexcept |
constexpr size_type | size () const noexcept |
constexpr size_type | size_bytes () const noexcept |
template<std::size_t E = Extent, typename std::enable_if<(E==dynamic_extent||E<=0), int >::type = 0> | |
constexpr | span () 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< 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 |
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> | |
TCB_SPAN_ARRAY_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<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 |
TCB_SPAN_CONSTEXPR11 | span (pointer first_elem, pointer last_elem) |
TCB_SPAN_CONSTEXPR11 | span (pointer ptr, size_type count) |
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> | |
TCB_SPAN_ARRAY_CONSTEXPR | span (std::array< value_type, N > &arr) noexcept |
template<std::size_t Offset, std::size_t Count = dynamic_extent> | |
TCB_SPAN_CONSTEXPR11 subspan_return_t< Offset, Count > | subspan () const |
TCB_SPAN_CONSTEXPR11 span< element_type, dynamic_extent > | subspan (size_type offset, size_type count=dynamic_extent) const |
~span () noexcept=default | |
Static Public Attributes | |
static constexpr size_type | extent = Extent |
Private Types | |
using | storage_type = detail::span_storage< ElementType, Extent > |
Private Attributes | |
storage_type | storage_ {} |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::const_pointer = const element_type* |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::const_reference = const element_type& |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::difference_type = std::ptrdiff_t |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::element_type = ElementType |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::iterator = pointer |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::pointer = element_type* |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::reference = element_type& |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::reverse_iterator = std::reverse_iterator<iterator> |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size_type = std::size_t |
|
private |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::subspan_return_t = span<ElementType, Count != dynamic_extent ? Count : (Extent != dynamic_extent ? Extent - Offset : dynamic_extent)> |
using TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::value_type = typename std::remove_cv<ElementType>::type |
|
inlineconstexprnoexcept |
|
inline |
Definition at line 332 of file span.h.
References souffle::test::count(), TCB_SPAN_NAMESPACE_NAME::dynamic_extent, TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::extent, and TCB_SPAN_EXPECT.
|
inline |
Definition at line 338 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::dynamic_extent, TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::extent, and TCB_SPAN_EXPECT.
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexpr |
|
inlineconstexpr |
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
|
defaultnoexcept |
|
inline |
Definition at line 494 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::empty(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size(), and TCB_SPAN_EXPECT.
|
inlineconstexprnoexcept |
Definition at line 503 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data().
Referenced by TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::rend().
|
inlineconstexprnoexcept |
Definition at line 500 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::detail::span_storage< E, S >::ptr, and TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::storage_.
Referenced by TCB_SPAN_NAMESPACE_NAME::as_bytes(), TCB_SPAN_NAMESPACE_NAME::as_writable_bytes(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::back(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::begin(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::end(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::first(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::front(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::last(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::operator[](), and TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::subspan().
|
inlineconstexprnoexcept |
Definition at line 476 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size().
Referenced by TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::back(), and TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::front().
|
inlineconstexprnoexcept |
Definition at line 505 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), and TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size().
Referenced by TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::rbegin().
|
inline |
Definition at line 416 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size(), and TCB_SPAN_EXPECT.
|
inline |
Definition at line 446 of file span.h.
References souffle::test::count(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size(), and TCB_SPAN_EXPECT.
|
inline |
Definition at line 488 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::empty(), and TCB_SPAN_EXPECT.
|
inline |
Definition at line 423 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size(), and TCB_SPAN_EXPECT.
|
inline |
Definition at line 453 of file span.h.
References souffle::test::count(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size(), and TCB_SPAN_EXPECT.
|
defaultnoexcept |
|
inline |
Definition at line 482 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size(), and TCB_SPAN_EXPECT.
|
inlinenoexcept |
Definition at line 507 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::end().
|
inlinenoexcept |
Definition at line 512 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::begin().
|
inlineconstexprnoexcept |
Definition at line 469 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::detail::span_storage< E, S >::size, and TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::storage_.
Referenced by TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::back(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::empty(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::end(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::first(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::last(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::operator[](), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size_bytes(), and TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::subspan().
|
inlineconstexprnoexcept |
Definition at line 471 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size().
Referenced by TCB_SPAN_NAMESPACE_NAME::as_bytes(), and TCB_SPAN_NAMESPACE_NAME::as_writable_bytes().
|
inline |
Definition at line 437 of file span.h.
References TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::dynamic_extent, TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size(), and TCB_SPAN_EXPECT.
|
inline |
Definition at line 460 of file span.h.
References souffle::test::count(), TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), TCB_SPAN_NAMESPACE_NAME::dynamic_extent, TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size(), and TCB_SPAN_EXPECT.
|
staticconstexpr |
Definition at line 323 of file span.h.
Referenced by TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::span().
|
private |
Definition at line 518 of file span.h.
Referenced by TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::data(), and TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >::size().