Pixie
Loading...
Searching...
No Matches
pixie::SplitSpan< T > Class Template Reference

A logical contiguous sequence stored in at most two physical spans. More...

#include <split_span.h>

Public Types

using span_type = std::span<T>
 
using const_iterator = typename std::array<span_type, 2>::const_iterator
 

Public Member Functions

constexpr SplitSpan ()=default
 Construct an empty logical range.
 
constexpr SplitSpan (span_type segment)
 Construct a range stored in one physical span.
 
constexpr SplitSpan (span_type first, span_type second)
 Construct a range stored in up to two physical spans.
 
constexpr std::size_t size () const noexcept
 Return the total number of logical elements.
 
constexpr bool empty () const noexcept
 Return whether the logical range is empty.
 
constexpr std::size_t segment_count () const noexcept
 Return the number of non-empty physical segments.
 
constexpr const_iterator begin () const noexcept
 Iterate over the non-empty physical segments in logical order.
 
constexpr const_iterator end () const noexcept
 Return the end iterator for the non-empty physical segments.
 

Detailed Description

template<class T>
class pixie::SplitSpan< T >

A logical contiguous sequence stored in at most two physical spans.

Empty input spans are canonicalized away. Iteration visits only non-empty physical spans in logical order. The descriptor owns no elements; its spans follow the lifetime and invalidation rules of their backing storage.

Template Parameters
TViewed element type, optionally const-qualified.

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