Skip to content

strata::Borrowed

Part of Views and expressions.

template <tensor_like E>
class strata::Borrowed;

An lvalue read through a pointer: what an lvalue owner is held as inside a node.

Read only, and cheap to copy. The owner must outlive it, as a view's memory must.

Template parameters

Name Description
E The owner, a tensor.

Members

Borrowed

explicit constexpr Borrowed(const E &owner STRATA_LIFETIMEBOUND) noexcept

owner, borrowed.

 Borrowed(const E &&)=delete

A temporary would be gone before it is read.

get

constexpr const E & get() const noexcept

The owner.