23namespace vctr::expressions
29template <
size_t extent,
class SrcType, isRefOrPtr DstValueType, is::constant ExpectCastToSucceed>
33 using value_type = DstValueType;
37 VCTR_FORCEDINLINE
constexpr DstValueType operator[] (
size_t i)
const
39 DstValueType casted =
dynamic_cast<DstValueType
> (src[i]);
42 VCTR_ASSERT (casted !=
nullptr);
59template <
class DstType,
bool expectCastToSucceed = true>
Definition: TransformedByDynamicCast.h:27
Constrains a type to be an lvalue reference.
Definition: GenericConcepts.h:98
Constrains a type to be a pointer or a reference to a pointer.
Definition: GenericConcepts.h:86
constexpr ExpressionChainBuilder< expressions::TransformedByDynamicCast, DstType, Constant< expectCastToSucceed > > transformedByDynamicCastTo
Transforms all source elements to DstValueType by applying a dynamic_cast<DstValueType> to them.
Definition: TransformedByDynamicCast.h:60
The main namespace of the VCTR project.
Definition: Array.h:24
An expression chain builder is an object which supplies various operator<< overloads which build chai...
Definition: ExpressionChainBuilder.h:157
The base class to every expression template.
Definition: ExpressionTemplate.h:37