From ddf29f230e736ba6b199e1b0f442ee6f7a2d30da Mon Sep 17 00:00:00 2001 From: David Bellot Date: Mon, 16 Aug 2010 22:11:08 +0000 Subject: [PATCH] applied patch from #4410 [SVN r64857] --- .../numeric/ublas/detail/matrix_assign.hpp | 61 ++++++++++--------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/include/boost/numeric/ublas/detail/matrix_assign.hpp b/include/boost/numeric/ublas/detail/matrix_assign.hpp index 36bca28d..3bc48ee0 100644 --- a/include/boost/numeric/ublas/detail/matrix_assign.hpp +++ b/include/boost/numeric/ublas/detail/matrix_assign.hpp @@ -13,6 +13,7 @@ #ifndef _BOOST_UBLAS_MATRIX_ASSIGN_ #define _BOOST_UBLAS_MATRIX_ASSIGN_ +#include // Required for make_conformant storage #include @@ -90,7 +91,7 @@ namespace detail { break; } else if (compare > 0) { if (conformant_restrict_type::other (it2e.index1 (), it2e.index2 ())) - if (*it2e != value_type/*zero*/()) + if (static_cast(*it2e) != value_type/*zero*/()) index.push_back (std::pair (it2e.index1 (), it2e.index2 ())); ++ it2e; if (it2e != it2e_end) @@ -102,7 +103,7 @@ namespace detail { } while (it2e != it2e_end) { if (conformant_restrict_type::other (it2e.index1 (), it2e.index2 ())) - if (*it2e != value_type/*zero*/()) + if (static_cast(*it2e) != value_type/*zero*/()) index.push_back (std::pair (it2e.index1 (), it2e.index2 ())); ++ it2e; } @@ -119,7 +120,7 @@ namespace detail { #endif while (it2e != it2e_end) { if (conformant_restrict_type::other (it2e.index1 (), it2e.index2 ())) - if (*it2e != value_type/*zero*/()) + if (static_cast(*it2e) != value_type/*zero*/()) index.push_back (std::pair (it2e.index1 (), it2e.index2 ())); ++ it2e; } @@ -136,7 +137,7 @@ namespace detail { #endif while (it2e != it2e_end) { if (conformant_restrict_type::other (it2e.index1 (), it2e.index2 ())) - if (*it2e != value_type/*zero*/()) + if (static_cast(*it2e) != value_type/*zero*/()) index.push_back (std::pair (it2e.index1 (), it2e.index2 ())); ++ it2e; } @@ -193,7 +194,7 @@ namespace detail { break; } else if (compare > 0) { if (conformant_restrict_type::other (it1e.index1 (), it1e.index2 ())) - if (*it1e != value_type/*zero*/()) + if (static_cast(*it1e) != value_type/*zero*/()) index.push_back (std::pair (it1e.index1 (), it1e.index2 ())); ++ it1e; if (it1e != it1e_end) @@ -205,7 +206,7 @@ namespace detail { } while (it1e != it1e_end) { if (conformant_restrict_type::other (it1e.index1 (), it1e.index2 ())) - if (*it1e != value_type/*zero*/()) + if (static_cast(*it1e) != value_type/*zero*/()) index.push_back (std::pair (it1e.index1 (), it1e.index2 ())); ++ it1e; } @@ -222,7 +223,7 @@ namespace detail { #endif while (it1e != it1e_end) { if (conformant_restrict_type::other (it1e.index1 (), it1e.index2 ())) - if (*it1e != value_type/*zero*/()) + if (static_cast(*it1e) != value_type/*zero*/()) index.push_back (std::pair (it1e.index1 (), it1e.index2 ())); ++ it1e; } @@ -239,7 +240,7 @@ namespace detail { #endif while (it1e != it1e_end) { if (conformant_restrict_type::other (it1e.index1 (), it1e.index2 ())) - if (*it1e != value_type/*zero*/()) + if (static_cast(*it1e) != value_type/*zero*/()) index.push_back (std::pair (it1e.index1 (), it1e.index2 ())); ++ it1e; } @@ -636,7 +637,8 @@ namespace detail { template