|
Boost Users : |
Subject: [Boost-users] ublas bug?
From: Peter Man (plwm2_at_[hidden])
Date: 2011-08-17 07:20:35
Hi,
I was just wondering if there is a bug in ublas (boost version 1.47):
when I use the following code (in debug mode):
ublas::matrix<double> m;
ublas::matrix<double> m2;
m2 = m;
this compiles in MSVC 10, but produces a runtime error "Expression:
invalid null pointer". I had a look
at some of the underlying ublas code, and found that default
initialisation of matrices makes the underlying data
pointer "data_" be set to NULL, and that when one matrix is copied to
another, std::copy is invoked to copy one
data_ to the other. However, I looked at the MSVC std::copy definition,
and it seems to check for NULLness of the pointers.
The following link explains this in more detail:
https://connect.microsoft.com/VisualStudio/feedback/details/558044/std-copy-should-not-check-dest-when-first-last
On the plus side, I have no such problem when running the above code in
linux.
Thanks,
Peter
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