summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/deduction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r--test/SemaTemplate/deduction.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp
index 15c061c..aecb5ee 100644
--- a/test/SemaTemplate/deduction.cpp
+++ b/test/SemaTemplate/deduction.cpp
@@ -150,3 +150,15 @@ namespace test3 {
}
};
}
+
+// Verify that we can deduce enum-typed arguments correctly.
+namespace test14 {
+ enum E { E0, E1 };
+ template <E> struct A {};
+ template <E e> void foo(const A<e> &a) {}
+
+ void test() {
+ A<E0> a;
+ foo(a);
+ }
+}
OpenPOWER on IntegriCloud