[Boost-bugs] [Boost C++ Libraries] #4410: Sparse/Packed matrix assignment needs type conversion

Subject: [Boost-bugs] [Boost C++ Libraries] #4410: Sparse/Packed matrix assignment needs type conversion
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-07-08 14:52:03


#4410: Sparse/Packed matrix assignment needs type conversion
-------------------------------------------------------+--------------------
 Reporter: Marco Guazzone <marco.guazzone@…> | Owner: guwi17
     Type: Patches | Status: new
Milestone: To Be Determined | Component: uBLAS
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------------------------+--------------------
 In file ''boost/detail/matrix_assign.hpp'' there are two possible source
 of type-conversion error interesting both ''sparse'' and ''packed''
 matrices.

 Let:

 {{{#!c++
   typedef typename M::value_type value_type;
   typedef F<typename M::..., typename E::value_type> functor_type;

 }}}

 Then:

 1. ''Comparison of an `E::value_type` with an `M::value_type`''
 {{{#!c++
   if (v != value_type/*zero*/()) // where v is of type E::value_type
 }}}

   E.g., `E::value_type` is `std::complex<float>` and `M::value_type` is
 `std::complex<double>`.

 2. ''Assignment of an `M::value_type` to an `E::value_type`''
 {{{#!c++
   functor_type::apply(*it, value_type/*zero*/());
 }}}
   E.g., `E::value_type` is `float` and `M::value_type` is
 `std::complex<float>`.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4410>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC