]> https://gitweb.dealii.org/ - dealii.git/commit
Fix a problem with iterators/references.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 17 Oct 2005 13:39:49 +0000 (13:39 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 17 Oct 2005 13:39:49 +0000 (13:39 +0000)
commit8a26759efbff9e194d0b58543a6c15fff58f5398
tree36c5c2c4a6b3d5ce7b396e565e513955df910a23
parent240e0f6ceb302215573b9c89b7f780fcaa54eda3
Fix a problem with iterators/references.

                                          * The constructor takes a pointer to
                                          * an accessor object that describes
                                          * which element of the matrix it
                                          * points to. This creates an
                                          * ambiguity when one writes code
                                          * like iterator->value()=0 (instead
                                          * of iterator->value()=0.0), since
                                          * the right hand side is an integer
                                          * that can both be converted to a
                                          * <tt>number</tt> (i.e., most
                                          * commonly a double) or to another
                                          * object of type
                                          * <tt>Reference</tt>. The compiler
                                          * then complains about not knowing
                                          * which conversion to take.
                                          *
                                          * For some reason, adding another
                                          * overload operator=(int) doesn't
                                          * seem to cure the problem. We avoid
                                          * it, however, by adding a second,
                                          * dummy argument to the Reference
                                          * constructor, that is unused, but
                                          * makes sure there is no second
                                          * matching conversion sequence using
                                          * a one-argument right hand side.
                                          *
                                          * The testcase oliver_01 checks that
                                          * this actually works as intended.

git-svn-id: https://svn.dealii.org/trunk@11609 0785d39b-7218-0410-832d-ea1e28bc413d
deal.II/doc/news/changes.html
deal.II/lac/include/lac/sparse_matrix.h

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.