|
Ublas : |
From: Georg Baum (Georg.Baum_at_[hidden])
Date: 2006-07-26 04:48:15
Am Mittwoch, 26. Juli 2006 10:41 schrieb Gunter Winkler:
> this is the patch
>
> Index: hermitian.hpp
> ===================================================================
> RCS file: /cvsroot/boost/boost/boost/numeric/ublas/hermitian.hpp,v
> retrieving revision 1.56
> diff -u -p -r1.56 hermitian.hpp
> --- hermitian.hpp 6 Nov 2005 14:57:13 -0000 1.56
> +++ hermitian.hpp 26 Jul 2006 08:39:56 -0000
> @@ -60,7 +60,7 @@ namespace boost { namespace numeric { na
> container_reference<matrix_type> (m), i_ (i), j_ (j), d_
> (d), dirty_ (false) {} BOOST_UBLAS_INLINE
> hermitian_matrix_element (const hermitian_matrix_element &p):
> - container_reference<matrix_type> (p), i_ (p.i_), d_ (p.d_),
> dirty_ (p.dirty_) {} + container_reference<matrix_type> (p),
> i_ (p.i_), j_ (p.j_), d_ (p.d_), dirty_ (p.dirty_) {} BOOST_UBLAS_INLINE
> ~hermitian_matrix_element () {
> if (dirty_)
May I ask why this copy constructor exists at all? With your patch it is
equivalent to the code the compiler would generate if no copy constructor
existed. That seems safer to me, because the compiler does not forget to
initialize members.
Apart from that, what about
hermitian_matrix_element &operator = (const hermitian_matrix_element &p)?
Does it need to copy i_ and j_ as well?
Georg