summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C
new file mode 100644
index 000000000..12cc83659
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C
@@ -0,0 +1,14 @@
+// PR c++/46831
+// { dg-options -std=c++0x }
+
+struct B { };
+struct D : B { };
+struct A {
+ template<typename T = void> operator D&();
+ operator long();
+};
+
+void f(long);
+void f(B&);
+
+int main() { f(A()); }