libstdc++: Clarify static_assert message
libstdc++-v3/ChangeLog: * include/bits/move.h (forward): Change static_assert message to be unambiguous about what must be true. * testsuite/20_util/forward/c_neg.cc: Adjust dg-error. * testsuite/20_util/forward/f_neg.cc: Likewise.
This commit is contained in:
parent
daef4e4d93
commit
41019bfae2
3 changed files with 3 additions and 3 deletions
|
@ -87,7 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
|
||||
{
|
||||
static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument"
|
||||
" substituting _Tp is an lvalue reference type");
|
||||
" substituting _Tp must not be an lvalue reference type");
|
||||
return static_cast<_Tp&&>(__t);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-error "static assertion failed" "" { target *-*-* } 89 }
|
||||
// { dg-error "must not be an lvalue reference" "" { target *-*-* } 0 }
|
||||
|
||||
#include <list>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-error "static assertion failed" "" { target *-*-* } 89 }
|
||||
// { dg-error "must not be an lvalue reference" "" { target *-*-* } 0 }
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue