libstdc++-v3/ChangeLog:
* testsuite/20_util/shared_ptr/cons/move.cc: Add comment and
dg-prune-output for -Wpessimizing-move warning.
* testsuite/experimental/memory/shared_ptr/cons/move_ctor.cc:
Likewise.
{
reset_count_struct __attribute__((unused)) reset;
+ // The std::move here prevents copy elision, so we construct from a prvalue.
+ // { dg-prune-output "-Wpessimizing-move" }
std::shared_ptr<A> a(std::move(std::shared_ptr<A>(new A)));
VERIFY( a.use_count() == 1 );
VERIFY( A::ctor_count == 1 );
{
reset_count_struct __attribute__((unused)) reset;
+ // The std::move here prevents copy elision, so we construct from a prvalue.
+ // { dg-prune-output "-Wpessimizing-move" }
std::experimental::shared_ptr<A[5]> a(std::move(std::experimental
::shared_ptr<A[5]>
(new A[5])));