openMSX
|
#include <span.hh>
Public Types | |
using | element_type = ElementType |
using | value_type = std::remove_cv_t< ElementType > |
using | index_type = size_t |
using | difference_type = ptrdiff_t |
using | pointer = ElementType * |
using | reference = ElementType & |
using | iterator = pointer |
using | const_iterator = const ElementType * |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
template<ptrdiff_t Offset, size_t Count = dynamic_extent> | |
using | subspan_return_t = span< ElementType, Count !=dynamic_extent ? Count :(Extent !=dynamic_extent ? Extent - Offset :dynamic_extent)> |
Public Member Functions | |
template<size_t E = Extent, std::enable_if_t<(E==0)||(E==dynamic_extent), int > = 0> | |
constexpr | span () noexcept |
constexpr | span (pointer ptr, index_type count) |
constexpr | span (pointer first_elem, pointer last_elem) |
template<size_t N, size_t E = Extent, std::enable_if_t<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< element_type(&)[N], ElementType >::value, int > = 0> | |
constexpr | span (element_type(&arr)[N]) noexcept |
template<size_t N, size_t E = Extent, std::enable_if_t<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< std::array< value_type, N > &, ElementType >::value, int > = 0> | |
constexpr | span (std::array< value_type, N > &arr) noexcept |
template<size_t N, size_t E = Extent, std::enable_if_t<(E==dynamic_extent||N==E) &&detail::is_container_element_type_compatible< const std::array< value_type, N > &, ElementType >::value, int > = 0> | |
constexpr | span (const std::array< value_type, N > &arr) noexcept |
template<typename Container , std::enable_if_t< detail::is_container< Container >::value &&detail::is_container_element_type_compatible< Container &, ElementType >::value, int > = 0> | |
constexpr | span (Container &cont) |
template<typename Container , std::enable_if_t< detail::is_container< Container >::value &&detail::is_container_element_type_compatible< const Container &, ElementType >::value, int > = 0> | |
constexpr | span (const Container &cont) |
constexpr | span (const span &other) noexcept=default |
template<typename OtherElementType , size_t OtherExtent, std::enable_if_t<(Extent==OtherExtent||Extent==dynamic_extent) &&std::is_convertible_v< OtherElementType(*)[], ElementType(*)[]>, int > = 0> | |
constexpr | span (const span< OtherElementType, OtherExtent > &other) noexcept |
~span () noexcept=default | |
constexpr span & | operator= (const span &other) noexcept=default |
template<size_t Count> | |
constexpr span< element_type, Count > | first () const |
template<size_t Count> | |
constexpr span< element_type, Count > | last () const |
template<ptrdiff_t Offset, size_t Count = dynamic_extent> | |
constexpr subspan_return_t< Offset, Count > | subspan () const |
constexpr span< element_type, dynamic_extent > | first (index_type count) const |
constexpr span< element_type, dynamic_extent > | last (index_type count) const |
constexpr span< element_type, dynamic_extent > | subspan (index_type offset, index_type count=dynamic_extent) const |
constexpr index_type | size () const noexcept |
constexpr index_type | size_bytes () const noexcept |
constexpr bool | empty () const noexcept |
constexpr reference | operator[] (index_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 const_iterator | cbegin () const noexcept |
constexpr const_iterator | cend () const noexcept |
constexpr auto | rbegin () const noexcept |
constexpr auto | rend () const noexcept |
constexpr auto | crbegin () const noexcept |
constexpr auto | crend () const noexcept |
Static Public Attributes | |
static constexpr index_type | extent = Extent |
using span< ElementType, Extent >::const_iterator = const ElementType* |
using span< ElementType, Extent >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using span< ElementType, Extent >::difference_type = ptrdiff_t |
using span< ElementType, Extent >::element_type = ElementType |
using span< ElementType, Extent >::index_type = size_t |
using span< ElementType, Extent >::reverse_iterator = std::reverse_iterator<iterator> |
using span< ElementType, Extent >::subspan_return_t = span<ElementType, Count != dynamic_extent ? Count : (Extent != dynamic_extent ? Extent - Offset : dynamic_extent)> |
using span< ElementType, Extent >::value_type = std::remove_cv_t<ElementType> |
|
inlineconstexpr |
Definition at line 162 of file span.hh.
References LZ4::count(), dynamic_extent, and span< ElementType, Extent >::extent.
|
inlineconstexpr |
Definition at line 168 of file span.hh.
References dynamic_extent, and span< ElementType, Extent >::extent.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
Definition at line 212 of file span.hh.
References dynamic_extent, span< ElementType, Extent >::extent, and utf8::unchecked::size().
|
inlineconstexpr |
Definition at line 222 of file span.hh.
References dynamic_extent, span< ElementType, Extent >::extent, and utf8::unchecked::size().
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
|
defaultnoexcept |
|
inlineconstexpr |
Definition at line 317 of file span.hh.
References span< ElementType, Extent >::data(), span< ElementType, Extent >::empty(), and span< ElementType, Extent >::size().
|
inlineconstexprnoexcept |
Definition at line 326 of file span.hh.
References span< ElementType, Extent >::data().
Referenced by span< ElementType, Extent >::cbegin(), and span< ElementType, Extent >::rend().
|
inlineconstexprnoexcept |
Definition at line 328 of file span.hh.
References span< ElementType, Extent >::begin().
Referenced by span< ElementType, Extent >::crend().
|
inlineconstexprnoexcept |
Definition at line 329 of file span.hh.
References span< ElementType, Extent >::end().
Referenced by span< ElementType, Extent >::crbegin().
|
inlineconstexprnoexcept |
Definition at line 333 of file span.hh.
References span< ElementType, Extent >::cend().
|
inlineconstexprnoexcept |
Definition at line 334 of file span.hh.
References span< ElementType, Extent >::cbegin().
|
inlineconstexprnoexcept |
Definition at line 323 of file span.hh.
References detail::span_storage< E, S >::ptr.
Referenced by span< ElementType, Extent >::back(), span< ElementType, Extent >::begin(), span< ElementType, Extent >::end(), span< ElementType, Extent >::first(), span< ElementType, Extent >::front(), openmsx::GLHQLiteScaler::GLHQLiteScaler(), openmsx::GLHQScaler::GLHQScaler(), span< ElementType, Extent >::last(), span< ElementType, Extent >::operator[](), openmsx::MemoryBufferFile::read(), span< ElementType, Extent >::subspan(), openmsx::SHA1::update(), openmsx::Interpreter::wrongNumArgs(), and openmsx::ZlibInflate::ZlibInflate().
|
inlineconstexprnoexcept |
Definition at line 300 of file span.hh.
References span< ElementType, Extent >::size().
Referenced by span< ElementType, Extent >::back(), span< ElementType, Extent >::front(), openmsx::CLIOption::getArgument(), openmsx::CommandLineParser::parse(), openmsx::parseTclArgs(), openmsx::CLIOption::peekArgument(), and openmsx::MSXCommandEvent::serialize().
|
inlineconstexprnoexcept |
Definition at line 327 of file span.hh.
References span< ElementType, Extent >::data(), and span< ElementType, Extent >::size().
Referenced by span< ElementType, Extent >::cend(), and span< ElementType, Extent >::rbegin().
|
inlineconstexpr |
Definition at line 246 of file span.hh.
References span< ElementType, Extent >::data(), and span< ElementType, Extent >::size().
|
inlineconstexpr |
Definition at line 275 of file span.hh.
References LZ4::count(), span< ElementType, Extent >::data(), and span< ElementType, Extent >::size().
|
inlineconstexpr |
Definition at line 310 of file span.hh.
References span< ElementType, Extent >::data(), and span< ElementType, Extent >::empty().
Referenced by openmsx::CLIOption::getArgument(), openmsx::CommandLineParser::parse(), openmsx::parseTclArgs(), and openmsx::CLIOption::peekArgument().
|
inlineconstexpr |
Definition at line 253 of file span.hh.
References span< ElementType, Extent >::data(), and span< ElementType, Extent >::size().
|
inlineconstexpr |
Definition at line 281 of file span.hh.
References LZ4::count(), span< ElementType, Extent >::data(), and span< ElementType, Extent >::size().
|
constexprdefaultnoexcept |
|
inlineconstexpr |
Definition at line 303 of file span.hh.
References span< ElementType, Extent >::data(), and span< ElementType, Extent >::size().
|
inlineconstexprnoexcept |
Definition at line 331 of file span.hh.
References span< ElementType, Extent >::end().
|
inlineconstexprnoexcept |
Definition at line 332 of file span.hh.
References span< ElementType, Extent >::begin().
|
inlineconstexprnoexcept |
Definition at line 296 of file span.hh.
References detail::span_storage< E, S >::size.
Referenced by span< ElementType, Extent >::back(), openmsx::Completer::checkNumArgs(), openmsx::CPUCore< CPU_POLICY >::disasmCommand(), span< ElementType, Extent >::empty(), span< ElementType, Extent >::end(), openmsx::RomInfoTopic::execute(), openmsx::MachineExtensionInfo::execute(), openmsx::DeviceInfo::execute(), openmsx::ConfigInfo::execute(), openmsx::SoftwareInfoTopic::execute(), openmsx::AfterCommand::execute(), openmsx::MessageCommand::execute(), openmsx::DiskCommand::execute(), openmsx::NowindCommand::execute(), openmsx::ExitCommand::execute(), openmsx::MachineCommand::execute(), openmsx::ActivateMachineCommand::execute(), openmsx::StoreMachineCommand::execute(), openmsx::RestoreMachineCommand::execute(), openmsx::HDCommand::execute(), openmsx::CDXCommand::execute(), openmsx::LSXCommand::execute(), span< ElementType, Extent >::first(), openmsx::MemoryBufferFile::getSize(), span< ElementType, Extent >::last(), openmsx::MSXCommandEvent::MSXCommandEvent(), openmsx::MsxChar2Unicode::msxToUtf8(), openmsx::DiskCommand::needRecord(), openmsx::HDCommand::needRecord(), span< ElementType, Extent >::operator[](), openmsx::parseTclArgs(), openmsx::DiskImageUtils::partition(), span< ElementType, Extent >::size_bytes(), span< ElementType, Extent >::subspan(), openmsx::SHA1::update(), openmsx::Interpreter::wrongNumArgs(), and openmsx::ZlibInflate::ZlibInflate().
|
inlineconstexprnoexcept |
Definition at line 298 of file span.hh.
References span< ElementType, Extent >::size().
|
inlineconstexpr |
Definition at line 266 of file span.hh.
References span< ElementType, Extent >::data(), dynamic_extent, and span< ElementType, Extent >::size().
Referenced by openmsx::CLIOption::getArgument(), openmsx::CommandLineParser::parse(), and openmsx::parseTclArgs().
|
inlineconstexpr |
Definition at line 287 of file span.hh.
References LZ4::count(), span< ElementType, Extent >::data(), dynamic_extent, and span< ElementType, Extent >::size().
|
staticconstexpr |
Definition at line 154 of file span.hh.
Referenced by span< ElementType, Extent >::span().