add some internal checks

This commit is contained in:
Gael Guennebaud
2018-05-18 13:59:55 +02:00
parent 345c0ab450
commit 4dd767f455
3 changed files with 24 additions and 8 deletions

View File

@@ -47,6 +47,12 @@ template<typename T> struct is_valid_index_type
};
};
// true if both types are not valid index types
template<typename RowIndices, typename ColIndices>
struct valid_indexed_view_overload {
enum { value = !(internal::is_valid_index_type<RowIndices>::value && internal::is_valid_index_type<ColIndices>::value) };
};
// promote_scalar_arg is an helper used in operation between an expression and a scalar, like:
// expression * scalar
// Its role is to determine how the type T of the scalar operand should be promoted given the scalar type ExprScalar of the given expression.