Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
decltype58.C
blob: c3918bf8474aa306bdcd49a36d08d7e1626d6693 [
file
] [
log
] [
blame
]
// PR c++/52875
// { dg-do compile { target c++11 } }
struct
A
{
friend
void
swap
(
A
&,
A
&)
{}
};
class
B
{
A a
;
template
<
class
T
>
friend
auto
swap
(
T
&
x
,
T
&
y
)
->
decltype
(
swap
(
x
.
a
,
y
.
a
))
{
swap
(
x
.
a
,
y
.
a
);
}
};
int
main
()
{
B x
,
y
;
swap
(
x
,
y
);
}