From abed4806ddd75d4450c40f4064977024be460f4c Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sat, 30 Nov 2024 21:43:47 +0000 Subject: [PATCH] libstdc++: Improve new testcase for std::optional assignment [PR117858] The copy & paste bug affected two assignment operators, so ensure the new test covers both. libstdc++-v3/ChangeLog: PR libstdc++/117858 * testsuite/20_util/optional/assignment/117858.cc: Also test assignment from rvalue optional. --- libstdc++-v3/testsuite/20_util/optional/assignment/117858.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/libstdc++-v3/testsuite/20_util/optional/assignment/117858.cc b/libstdc++-v3/testsuite/20_util/optional/assignment/117858.cc index 9443e1604846..e7045b37dd9c 100644 --- a/libstdc++-v3/testsuite/20_util/optional/assignment/117858.cc +++ b/libstdc++-v3/testsuite/20_util/optional/assignment/117858.cc @@ -13,4 +13,5 @@ struct Focus void g(std::optional f) { f = f; + f = std::move(f); } -- 2.47.2