Skip to content
Snippets Groups Projects
Commit 3c2e8e0a authored by Tom Westerhout's avatar Tom Westerhout
Browse files

Fixes #22. At least on my local machine.

The reason for segfaults in `general_product_impl` is this line:
```
    auto vtilde = lhs.my_matrix() * rhs;
```
`my_matrix()` member function returned a temporary which was destructed
after the assignment (see Eigen's docs page about the use of `auto`).
You were then trying to access an already destructed matrix in line 101
which, obviously, didn't go well.
There are numerous solutions to this issue, but the simplest one that as
a by-product should also increase the performance, is to let `my_matrix`
return a reference to the stored matrix rather than a copy.
parent 916bfe25
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment