-
#include "tensorstore/index_space/index_vector_or_scalar.h"
-
template <typename T>
struct tensorstore::IsIndexVectorOrScalar; A type
T
satisfies the IsIndexVectorOrScalar concept if it is either:convertible without narrowing to Index (scalar), in which case the nested
extent
constant equalsdynamic_rank
and the nestednormalized_type
alias equalsIndex
; orcompatible with
span
with aspan::value_type
ofIndex
(vector), in which case the nestednormalized_type
alias is equal to the result type ofspan
, and the nestedextent
constant is equal to thespan::extent
ofnormalized_type
.
If
T
satisfies theIsIndexVectorOrScalar
concept, this metafunction has defines a nestedvalue
member equal totrue
, as well as nestedextent
andnormalized_type
members. Otherwise, this metafunction defines a nestedvalue
member equal tofalse
, and no nestednormalized_type
orextent
members.This concept is used to constrain the parameter types of some methods of
DimExpression
.Data members¶
- constexpr const DimensionIndex extent = -1;
Compile-time length of the vector, or
dynamic_rank
ifT
represents a scalar or the length is specified at run time.
Types¶
- using normalized_type = void;
Normalized scalar/vector type, equal to
Index
orspan<Index, extent>
.