#6511: Division by scalar should use enable_if<> ------------------------------------------------+--------------------------- Reporter: Sean Reilly | Owner: guwi17 Type: Bugs | Status: new Milestone: To Be Determined | Component: uBLAS Version: Boost 1.48.0 | Severity: Problem Keywords: | ------------------------------------------------+--------------------------- file: vector_expression.hpp lines 1409 through 1417 function: operator/( vector, scalar) Should be using the enable_if<> macros just like the operator*() in lines 1397 through 1407 (just above it). Doing so allows further overloading of operator/() for other types. Suggested change is... Before: {{{ #!python // (v / t) [i] = v [i] / t template BOOST_UBLAS_INLINE typename vector_binary_scalar2_traits >::result_type operator / (const vector_expression &e1, const T2 &e2) { typedef typename vector_binary_scalar2_traits >::expression_type expression_type; return expression_type (e1 (), e2); } }}} After: {{{ #!python // (v / t) [i] = v [i] / t template BOOST_UBLAS_INLINE typename enable_if< is_convertible, typename vector_binary_scalar2_traits >::result_type >::type typename vector_binary_scalar2_traits >::result_type operator / (const vector_expression &e1, const T2 &e2) { typedef typename vector_binary_scalar2_traits >::expression_type expression_type; return expression_type (e1 (), e2); } }}} Boost C++ Libraries 8/27/12 Send to Evernote to boost-bugs #6511: Division by scalar should use enable_if<> -------------------------------------------------+-------------------------- Reporter: Sean Reilly | Owner: guwi17 Type: Bugs | Status: new Milestone: To Be Determined | Component: uBLAS Version: Boost 1.48.0 | Severity: Problem Resolution: | Keywords: -------------------------------------------------+-------------------------- Comment (by guwi17): (In [80270]) boost/numeric/ublas/vector_expression.hpp - use enable_if for operator/(vector, scalar), see #6511 Boost C++ Libraries 9/16/12 Send to Evernote to boost-bugs #6511: Division by scalar should use enable_if<> -------------------------------------------------+-------------------------- Reporter: Sean Reilly | Owner: guwi17 Type: Bugs | Status: assigned Milestone: To Be Determined | Component: uBLAS Version: Boost 1.52.0 | Severity: Problem Resolution: | Keywords: -------------------------------------------------+-------------------------- Changes (by guwi17): * status: new => assigned * version: Boost 1.48.0 => Boost 1.52.0 Boost C++ Libraries 9/16/12 Send to Evernote to boost-bugs #6511: Division by scalar should use enable_if<> -------------------------------------------------+-------------------------- Reporter: Sean Reilly | Owner: guwi17 Type: Bugs | Status: assigned Milestone: Boost 1.52.0 | Component: uBLAS Version: Boost 1.48.0 | Severity: Problem Resolution: | Keywords: -------------------------------------------------+-------------------------- Changes (by guwi17): * version: Boost 1.52.0 => Boost 1.48.0 * milestone: To Be Determined => Boost 1.52.0 Comment: updated wrong field ^^ Boost C++ Libraries 9/18/12 Send to Evernote to boost-bugs #6511: Division by scalar should use enable_if<> -------------------------------------------------+-------------------------- Reporter: Sean Reilly | Owner: guwi17 Type: Bugs | Status: closed Milestone: Boost 1.52.0 | Component: uBLAS Version: Boost 1.48.0 | Severity: Problem Resolution: fixed | Keywords: -------------------------------------------------+-------------------------- Changes (by guwi17): * status: assigned => closed * resolution: => fixed Comment: (In [80588]) merge [61880],[75560],[80267],[80268],[80269],[80270],[80399],[80403],[80483],[80485],[80507],[80563] into release branch * fix #6511, fix #6514, fix #7296, fix #7297, * see #4024 Boost C++ Libraries 12/30/12 Send to Evernote to boost-bugs #6511: Division by scalar should use enable_if<> -------------------------------------------------+-------------------------- Reporter: Sean Reilly | Owner: guwi17 Type: Bugs | Status: closed Milestone: Boost 1.52.0 | Component: uBLAS Version: Boost 1.48.0 | Severity: Problem Resolution: fixed | Keywords: -------------------------------------------------+-------------------------- Comment (by Sean Reilly ): Sorry to do this to you after the ticket has already closed... But, did you happen to make the corresponding change to matrix_expression.hpp? Boost C++ Libraries Jan 4 (13 days ago) Send to Evernote to boost-bugs #6511: Division by scalar should use enable_if<> -------------------------------------------------+-------------------------- Reporter: Sean Reilly | Owner: guwi17 Type: Bugs | Status: closed Milestone: Boost 1.52.0 | Component: uBLAS Version: Boost 1.48.0 | Severity: Problem Resolution: fixed | Keywords: -------------------------------------------------+-------------------------- Comment (by guwi17): Replying to [comment:5 Sean Reilly ]: > But, did you happen to make the corresponding change to matrix_expression.hpp? No, only vector_expression has been patched for this ticket.