]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a changelog entry. 14842/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 5 Mar 2023 12:21:58 +0000 (05:21 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 5 Mar 2023 12:21:58 +0000 (05:21 -0700)
doc/news/changes/minor/20230305Bangerth [new file with mode: 0644]

diff --git a/doc/news/changes/minor/20230305Bangerth b/doc/news/changes/minor/20230305Bangerth
new file mode 100644 (file)
index 0000000..cd06289
--- /dev/null
@@ -0,0 +1,17 @@
+Fixed: It was previously possible to assign scalar values to
+VectorizedArray objects that were temporaries -- say in expressions
+such as
+```
+  VectorizedArray<...> my_function();
+  ...
+  my_function() = 1.234;
+```
+This does not make any sense: What `my_function()` returns is a
+temporary object, and assigning a value to it has no consequences
+because the temporary object dies at the end of the line. Whatever the
+programmer intended to do here was almost certainly a mistake.
+
+As a consequence, this is now prohibited and the compiler will produce
+an error when trying to do this.
+<br>
+(Wolfgang Bangerth, 2023/03/05)

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.