22#if MOCHI_LANGUAGE_CPP20
31inline constexpr bool IsPrimitiveShapeDef =
false;
35template <
class T,
class =
void>
38 std::is_arithmetic_v<T>,
39 "ScalarType<T>: T is not a recognized scalar type and has no ScalarTypeDef specialization.");
40 using type = std::remove_cv_t<T>;
45struct ScalarTypeDef<T, std::void_t<typename T::Scalar>> {
46 using type =
typename ScalarTypeDef<std::decay_t<typename T::Scalar>>::type;
51#if MOCHI_LANGUAGE_CPP20
71inline constexpr bool IsPrimitiveShape = details::IsPrimitiveShapeDef<std::decay_t<T>>;
78using ScalarType =
typename details::ScalarTypeDef<std::decay_t<T>>::type;
Empty object when no value is needed.