Split StorageKind promotion into two helpers: one for products, and one for coefficient-wise operations.

This commit is contained in:
Gael Guennebaud
2014-07-01 17:51:53 +02:00
parent 3c63446507
commit 6f846ef9c6
8 changed files with 77 additions and 47 deletions

View File

@@ -27,8 +27,9 @@ struct traits<ProductBase<Derived,_Lhs,_Rhs> >
typedef typename remove_all<_Lhs>::type Lhs;
typedef typename remove_all<_Rhs>::type Rhs;
typedef typename scalar_product_traits<typename Lhs::Scalar, typename Rhs::Scalar>::ReturnType Scalar;
typedef typename promote_storage_type<typename traits<Lhs>::StorageKind,
typename traits<Rhs>::StorageKind>::ret StorageKind;
typedef typename product_promote_storage_type<typename traits<Lhs>::StorageKind,
typename traits<Rhs>::StorageKind,
0>::ret StorageKind;
typedef typename promote_index_type<typename traits<Lhs>::Index,
typename traits<Rhs>::Index>::type Index;
enum {