Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 871 Bytes

set_length.md

File metadata and controls

25 lines (15 loc) · 871 Bytes

set_length

Set the length in the specified dimension to some fixed number.

#include <noarr/structures_extended.hpp>

template<char Dim, typename T, typename LenT>
struct noarr::set_length_t;

template<char... Dims>
constexpr proto noarr::set_length(auto... lengths);

(proto is an unspecified proto-structure)

Description

The set_length_t structure is the same as structure T except that the length in dimension Dim is set. The length must be unknown for T -- setting an already set length results in a compile-time error.

The set_length function can accept a list of dimensions: it will compose multiple set_length_ts if necessary.

See the first section of Dimension Kinds for the allowed types of lengths (and LenT).