summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/dc9.C
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-23 22:36:54 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-23 22:36:54 +0000
commit88a3ea34080ad3087a8191fbf479543153175d59 (patch)
tree34eaec34d3588e09f9a77abba776266f124dc823 /gcc/testsuite/g++.dg/cpp0x/dc9.C
parent25e15aaed275cdfef34b3ee6eb3cb4b43a48d44f (diff)
parente65055a558093bd4fc0b1b0024b7814cc187b8e8 (diff)
downloadgccgo.tar.gz
Merge from trunk revision 257954.gccgo
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gccgo@257955 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/dc9.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dc9.C30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/dc9.C b/gcc/testsuite/g++.dg/cpp0x/dc9.C
new file mode 100644
index 00000000000..b87f5ce618d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/dc9.C
@@ -0,0 +1,30 @@
+// PR c++/70468
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -w }
+
+struct S {};
+
+template < typename = S >
+class A
+{
+public:
+ A () : f0 (), f1 () {} // { dg-error "" }
+
+private:
+ typedef A<> f0;
+ int f1;
+};
+
+template < typename = S, typename = S >
+class B
+{
+};
+
+template < typename T1, typename T2 >
+B < T1, T2 > &operator<< (B < T1, T2 >&, const int)
+{
+ A<> ();
+}
+
+template
+B < S, S > &operator<< (B < S, S >&, const int);