diff mbox

[C++,committed] Add c++/48522 testcase

Message ID 4DC877E0.3020303@oracle.com
State New
Headers show

Commit Message

Paolo Carlini May 9, 2011, 11:25 p.m. UTC
Hi,

I committed the testcase to mainline and 4_6-branch and closed the PR as 
already fixed.

Tested x86_64-linux.

Paolo.

////////////////////
2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/48522
	* g++.dg/cpp0x/pr48522.C: New.
diff mbox

Patch

Index: g++.dg/cpp0x/pr48522.C
===================================================================
--- g++.dg/cpp0x/pr48522.C	(revision 0)
+++ g++.dg/cpp0x/pr48522.C	(revision 0)
@@ -0,0 +1,24 @@ 
+// { dg-options "-std=c++0x" }
+
+template <typename T>
+struct Handle
+{
+    Handle(T& t);
+};
+
+template<class T>
+struct Class {
+    struct Struct {} data;
+    void f();
+    void g();
+};
+
+template<class T>
+void Class<T>::f() {
+    Handle< decltype((data)) > handle(data);
+}
+
+template<class T>
+void Class<T>::g() {
+    Handle< decltype((data)) > handle(data);
+}