Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
Wpessimizing-move1.C
blob: 9dec587cb0f07f860599d9e9c08c531964950456 [
file
] [
log
] [
blame
]
// PR c++/86981
// { dg-do compile { target c++17 } }
// { dg-options "-Wpessimizing-move" }
#include
<utility>
#include
<optional>
struct
T
{
T
()
{
}
T
(
const
T
&)
{
}
T
(
T
&&)
{
}
};
std
::
optional
<
T
>
fn
()
{
T t
;
return
std
::
move
(
t
);
}