Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80270 - trunk/boost/numeric/ublas
From: guwi17_at_[hidden]
Date: 2012-08-27 19:31:05


Author: guwi17
Date: 2012-08-27 19:31:04 EDT (Mon, 27 Aug 2012)
New Revision: 80270
URL: http://svn.boost.org/trac/boost/changeset/80270

Log:

boost/numeric/ublas/vector_expression.hpp - use enable_if for operator/(vector, scalar), see #6511

Text files modified:
   trunk/boost/numeric/ublas/vector_expression.hpp | 2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)

Modified: trunk/boost/numeric/ublas/vector_expression.hpp
==============================================================================
--- trunk/boost/numeric/ublas/vector_expression.hpp (original)
+++ trunk/boost/numeric/ublas/vector_expression.hpp 2012-08-27 19:31:04 EDT (Mon, 27 Aug 2012)
@@ -1409,7 +1409,9 @@
     // (v / t) [i] = v [i] / t
     template<class E1, class T2>
     BOOST_UBLAS_INLINE
+ typename enable_if< is_convertible<T2, typename E1::value_type >,
     typename vector_binary_scalar2_traits<E1, const T2, scalar_divides<typename E1::value_type, T2> >::result_type
+ >::type
     operator / (const vector_expression<E1> &e1,
                 const T2 &e2) {
         typedef typename vector_binary_scalar2_traits<E1, const T2, scalar_divides<typename E1::value_type, T2> >::expression_type expression_type;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk