mrdocs::ArrayView::ArrayView

Constructors

Synopses

Declared in <mrdocs/ADT/ArrayView.hpp>

Construct an empty view.

constexpr
ArrayView() noexcept = default;

Construct a view from a C‐style array.

template<size_type N>
constexpr
ArrayView(T const(& arr)[]) noexcept;

Construct a view from a pointer and element count.

constexpr
ArrayView(
    T const* data,
    size_type count) noexcept;

Construct a view from a contiguous iterator range of known size.

template<class It>
requires (std::contiguous_iterator<It> &&
             std::same_as<std::remove_cv_t<std::remove_reference_t<std::iter_value_t<It>>>, T>)
constexpr
ArrayView(
    It first,
    size_type count) noexcept;

Parameters

Name

Description

arr

The array to view.

data

Pointer to the first element.

count

Number of elements in the range.

first

Iterator to the first element.

Created with MrDocs