]> https://gitweb.dealii.org/ - dealii.git/commit
Fix undefined order of evaluation. 3714/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 27 Dec 2016 11:15:49 +0000 (04:15 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 27 Dec 2016 11:35:48 +0000 (04:35 -0700)
commita7f14b243d07d7df5360c7ee30f03f61dee35ae0
treece28a416a3c257b2978eb098da71f69c3bb5e1f5
parent3097fc8620ee78f044e6975938cad9c71ae8c84f
Fix undefined order of evaluation.

Within a sequence such as
  deallog << is1.n_elements() << ", " << is1.pop_front() << std::endl;
the order of calls to 'n_elements()' and 'pop_front()' is undefined. Consequently,
there are two possible correct output files.

Fix this by splitting the line into two complete statements, separated by
a semicolon (which implies a sequence point).
tests/base/index_set_25.cc
tests/base/index_set_25.output
tests/base/index_set_26.cc
tests/base/index_set_26.output

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.