Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
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
);
}