Boost logo

Boost Users :

Subject: [Boost-users] [Ublas] Bug in 1.59 in file boost/numeric/ublas/detail/concepts.hpp
From: dariomt_at_[hidden]
Date: 2015-11-30 09:24:59


In the migration from Boost 1.55.0 to 1.59.0 I found a bug in Ublas.

For instance, in 1.55.0 function OneElement() declared in
boost/numeric/ublas/detail/concepts.hpp line 716 looks like this:

template<> double OneElement (double) { return 1.; }

However, in 1.59.0 I think there is a copy'n'paste typo, because the
corresponding function (which has been refactored) looks like this:

template<class T> T OneElement (T) { return T(0.0); }

Please note that the latter version returns a *zero*, instead of a *one*.

This same bug affects the vector overload of the function, but the matrix
version looks correct (it returns identity_matrix).

This looks like a copy'n'paste typo, from a similar function
called ZeroElement(), that, of course, returns a zero.

I'm not sure if there is time to get a fix for this in the 1.60 release...

Regards!



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net