Commit 9b8ac5d2 by Paolo Carlini Committed by Paolo Carlini

re PR c++/52875 (ADL failure + ICE in decltype)

2014-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/52875
	* g++.dg/cpp0x/decltype58.C: New.

From-SVN: r210562
parent b5704581
2014-05-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52875
* g++.dg/cpp0x/decltype58.C: New.
2014-05-17 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/61140
......
// 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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment