From 6618172bebc03ca8a6d410a61f495e743d2a47c7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 5 Mar 2023 05:21:58 -0700 Subject: [PATCH] Add a changelog entry. --- doc/news/changes/minor/20230305Bangerth | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/news/changes/minor/20230305Bangerth diff --git a/doc/news/changes/minor/20230305Bangerth b/doc/news/changes/minor/20230305Bangerth new file mode 100644 index 0000000000..cd0628908a --- /dev/null +++ b/doc/news/changes/minor/20230305Bangerth @@ -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. +
+(Wolfgang Bangerth, 2023/03/05) -- 2.39.5