-
#include "tensorstore/data_type.h"
-
template <typename TargetElement, typename SourceRef>
StaticCastResultType<RebindDataType<SourceRef, TargetElement>,
SourceRef>
tensorstore::ConstDataTypeCast(SourceRef&& source); Casts
source
to a specified target element type which must differ from the existing element type only in const qualification.Supported types include
ElementPointer
,Array
,TransformedArray
,TensorStore
.This cast is always unchecked.
Example:
Array<const int> const_array = ...; Array<int> array = ConstDataTypeCast<int>(const_array);