#include "tensorstore/index_space/dim_expression.h"
template <typename Dimensions>
auto tensorstore::Dims(const Dimensionsdimensions);
template <typename... DimensionId>
auto tensorstore::Dims(const DimensionId&... dimensions);

Starts a DimExpression with the specified dimensions selected (and no operations).

The static rank of the dimension selection of the resultant DimExpression is equal to the static extent of dimensions.

Dimensions may specified by an index in the range (-input_rank, input_rank). Negative dimension indices are normalized by adding input_rank. Dimensions may also be specified by a non-empty string label.

Requires:

For the single-parameter overload, Dimensions is span-compatible with a span::value_type equal to DimensionIndex, DimensionIdentifier, or DynamicDimSpec.

Requires:

For the variadic overload, each DimensionId type must be convertible without narrowing to DimensionIndex, DimensionIdentifier, or DynamicDimSpec.

Parameters:
const Dimensions &dimensions
const DimensionId&... dimensions

The dimension identifiers. May also be a braced list, e.g. Dims({1, 2}), or a pack, e.g. Dims(1, "x").

Error absl::StatusCode::kInvalidArgument:

if a dimension index is outside the valid range, or a specified label is empty or does not equal a dimension label.