Index: matrix_expression.hpp =================================================================== --- matrix_expression.hpp (revision 64061) +++ matrix_expression.hpp (working copy) @@ -2940,10 +2940,10 @@ // (t * m) [i] [j] = t * m [i] [j] template BOOST_UBLAS_INLINE - typename enable_if< is_convertible, + typename enable_if< is_arithmetic, typename matrix_binary_scalar1_traits >::result_type >::type - operator * (const T1 &e1, + operator * (const T1 &e1, const matrix_expression &e2) { typedef typename matrix_binary_scalar1_traits >::expression_type expression_type; return expression_type (e1, e2 ()); @@ -3375,10 +3375,10 @@ // (m * t) [i] [j] = m [i] [j] * t template BOOST_UBLAS_INLINE - typename enable_if< is_convertible, + typename enable_if< is_arithmetic, typename matrix_binary_scalar2_traits >::result_type >::type - operator * (const matrix_expression &e1, + operator * (const matrix_expression &e1, const T2 &e2) { typedef typename matrix_binary_scalar2_traits >::expression_type expression_type; return expression_type (e1 (), e2); @@ -3725,6 +3725,21 @@ return prod (e1, e2, storage_category (), orientation_category ()); } + template + BOOST_UBLAS_INLINE + typename matrix_vector_binary1_traits::result_type + operator * (const matrix_expression &e1, + const vector_expression &e2) { + BOOST_STATIC_ASSERT (E2::complexity == 0); + typedef typename matrix_vector_binary1_traits::storage_category storage_category; + typedef typename matrix_vector_binary1_traits::orientation_category orientation_category; + return prod (e1, e2, storage_category (), orientation_category ()); + } + + template BOOST_UBLAS_INLINE typename matrix_vector_binary1_traits::precision_type, E1, @@ -4115,6 +4130,20 @@ return prod (e1, e2, storage_category (), orientation_category ()); } + template + BOOST_UBLAS_INLINE + typename matrix_vector_binary2_traits::result_type + operator* (const vector_expression &e1, + const matrix_expression &e2) { + BOOST_STATIC_ASSERT (E1::complexity == 0); + typedef typename matrix_vector_binary2_traits::storage_category storage_category; + typedef typename matrix_vector_binary2_traits::orientation_category orientation_category; + return prod (e1, e2, storage_category (), orientation_category ()); + } + template BOOST_UBLAS_INLINE typename matrix_vector_binary2_traits::precision_type, E1, @@ -4820,6 +4849,20 @@ return prod (e1, e2, storage_category (), orientation_category ()); } + template + BOOST_UBLAS_INLINE + typename matrix_matrix_binary_traits::result_type + operator* (const matrix_expression &e1, + const matrix_expression &e2) { + BOOST_STATIC_ASSERT (E1::complexity == 0 && E2::complexity == 0); + typedef typename matrix_matrix_binary_traits::storage_category storage_category; + typedef typename matrix_matrix_binary_traits::orientation_category orientation_category; + return prod (e1, e2, storage_category (), orientation_category ()); + } + template BOOST_UBLAS_INLINE typename matrix_matrix_binary_traits::precision_type, E1, Index: vector_expression.hpp =================================================================== --- vector_expression.hpp (revision 64061) +++ vector_expression.hpp (working copy) @@ -15,7 +15,6 @@ #include - // Expression templates based on ideas of Todd Veldhuizen and Geoffrey Furnish // Iterators based on ideas of Jeremy Siek // @@ -1170,7 +1169,7 @@ // (t * v) [i] = t * v [i] template BOOST_UBLAS_INLINE - typename enable_if< is_convertible, + typename enable_if< is_arithmetic, typename vector_binary_scalar1_traits >::result_type >::type operator * (const T1 &e1, @@ -1397,7 +1396,7 @@ // (v * t) [i] = v [i] * t template BOOST_UBLAS_INLINE - typename enable_if< is_convertible, + typename enable_if< is_arithmetic, typename vector_binary_scalar2_traits >::result_type >::type operator * (const vector_expression &e1,