template<class T>
binary_io::components::span_stream_base class

Implements the common interface of every span_stream.

Base classes

class basic_seek_stream
Implements the basic seeking methods required for every stream.

Constructors, destructors, conversion operators

span_stream_base(std::span<T> a_span) noexcept
Constructs the stream using the given span as the underlying buffer.

Buffer management

auto rdbuf() noexcept -> std::span< T >
Provides mutable access to the underlying buffer.
auto rdbuf() const noexcept -> std::span< const T >
Provides immutable access to the underlying buffer.

Position

void seek_absolute(binary_io::streamoff a_pos) noexcept
Seek to an absolute position in the stream (i.e. from the beginning).
void seek_relative(binary_io::streamoff a_off) noexcept
Seek to a position in the stream relative to the current position.
auto tell() const -> binary_io::streamoff noexcept
Gets the current stream position.

Function documentation

template<class T>
auto binary_io::components::span_stream_base<T>::rdbuf() noexcept -> std::span< T >

Provides mutable access to the underlying buffer.

Returns The underlying buffer.

template<class T>
auto binary_io::components::span_stream_base<T>::rdbuf() const noexcept -> std::span< const T >

Provides immutable access to the underlying buffer.

Returns The underlying buffer.