Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
move-return3.C
blob: c79f059193671df318963dada255a2f07008a52e [
file
] [
log
] [
blame
]
// PR c++/91212
// Test that C++11 implicit move semantics don't call the const copy.
// { dg-do link }
struct
T
{
int
i
;
};
struct
X
{
X
(
T
&)
{
}
// #1
X
(
const
T
&);
// #2
};
X
fn
()
{
T buf
;
return
buf
;
}
int
main
()
{
X c
=
fn
();
}