From de49b8b2b831a4e99280849aebc0b0e036f647da Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 15 Mar 2023 22:02:51 -0600 Subject: [PATCH] Do not assign to a temporary. --- tests/base/scalar_01.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/base/scalar_01.cc b/tests/base/scalar_01.cc index 1b51831b33..3ce1b772e4 100644 --- a/tests/base/scalar_01.cc +++ b/tests/base/scalar_01.cc @@ -47,7 +47,11 @@ main() compare(static_cast(t1), 13.); compare(static_cast(t1), 13.); compare((T() = t1), 13.); - compare((T() = 13.), 13.); + { + T t; + t = 13.; + compare(t, 13.); + } compare((t1 == t1), true); compare((t1 == t2), false); compare((t1 != t2), true); -- 2.39.5