]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Add missing test for std::optional::transform(F&&)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 20 Oct 2021 19:12:28 +0000 (20:12 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 20 Oct 2021 19:20:18 +0000 (20:20 +0100)
commit4ba4b053151a20262d4b61eb4501aa1c48337abb
tree7b5eee1327bf4b70bbf087d507c64cc79b06f1dd
parent154c6d430ee173904237de64d5aae11565201318
libstdc++: Add missing test for std::optional::transform(F&&)

The test_copy_elision() function was supposed to ensure that the result
is constructed directly in the std::optional, without early temporary
materialization. But I forgot to write the test.

libstdc++-v3/ChangeLog:

* testsuite/20_util/optional/monadic/transform.cc: Check that
an rvalue result is not materialized too soon.
libstdc++-v3/testsuite/20_util/optional/monadic/transform.cc