summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/cond3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/cond3.C')
-rw-r--r--gcc/testsuite/g++.dg/template/cond3.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/cond3.C b/gcc/testsuite/g++.dg/template/cond3.C
new file mode 100644
index 000000000..788b3754a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/cond3.C
@@ -0,0 +1,15 @@
+// PR c++/13833
+
+struct X {
+ template <typename T>
+ X & operator << (const T &t);
+ X & operator<< (int& (*p) (int&));
+};
+
+X x;
+
+template <int> void foo () {
+ x << (1 ? "ok" : "failed");
+}
+
+template void foo<1>();