aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/nullary.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-01-25 17:39:01 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-01-25 17:39:01 +0100
commit296d24be4dd3c700089d1d9182a843c60d68019c (patch)
tree36118200fe6a05bf4d19daf0f5b7130bc0f0b8ce /test/nullary.cpp
parentd06a48959abac6369336d3873d46aee78f8fbec2 (diff)
bug #1381: fix sparse.diagonal() used as a rvalue.
The problem was that is "sparse" is not const, then sparse.diagonal() must have the LValueBit flag meaning that sparse.diagonal().coeff(i) must returns a const reference, const Scalar&. However, sparse::coeff() cannot returns a reference for a non-existing zero coefficient. The trick is to return a reference to a local member of evaluator<SparseMatrix>.
Diffstat (limited to 'test/nullary.cpp')
0 files changed, 0 insertions, 0 deletions