]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Improve std::forward static assert message
authorJonathan Wakely <jwakely@redhat.com>
Tue, 28 Sep 2021 11:35:29 +0000 (12:35 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 24 Nov 2021 11:24:56 +0000 (11:24 +0000)
commitdda6b9ce0f80ae82b94efa0abed941d879489d95
treee629719370e6141904b181aeaa739898ef0c5e71
parent24449ffb08513e9c70e20ea556d1a413a50580ae
libstdc++: Improve std::forward static assert message

The previous message told you something was wrong, but not why it
happened or why it's bad. This changes it to explain that the function
is being misused.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/move.h (forward(remove_reference_t<T>&&)):
Improve text of static_assert.
* testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
* testsuite/20_util/forward/f_neg.cc: Likewise.

(cherry picked from commit a11052d98db2f2a61841f0c5ee84de4ca1b3e296)
libstdc++-v3/include/bits/move.h
libstdc++-v3/testsuite/20_util/forward/c_neg.cc
libstdc++-v3/testsuite/20_util/forward/f_neg.cc
This page took 0.062088 seconds and 6 git commands to generate.