summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-enum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-enum.cpp')
-rw-r--r--test/SemaTemplate/instantiate-enum.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-enum.cpp b/test/SemaTemplate/instantiate-enum.cpp
new file mode 100644
index 0000000..a7acf22
--- /dev/null
+++ b/test/SemaTemplate/instantiate-enum.cpp
@@ -0,0 +1,11 @@
+// RUN: clang-cc -fsyntax-only %s
+
+template<typename T, T I, int J>
+struct adder {
+ enum {
+ value = I + J,
+ value2
+ };
+};
+
+int array1[adder<long, 3, 4>::value == 7? 1 : -1];
OpenPOWER on IntegriCloud