summaryrefslogtreecommitdiff
path: root/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp')
-rw-r--r--clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp
new file mode 100644
index 0000000..0e69521
--- /dev/null
+++ b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+
+template<typename T> struct identity;
+template<typename ...Types> struct tuple;
+
+template<typename T, typename U> struct is_same {
+ static const bool value = false;
+};
+
+template<typename T> struct is_same<T, T> {
+ static const bool value = true;
+};
+
+// There is a syntactic ambiguity when an ellipsis occurs at the end
+// of a parameter-declaration-clause without a preceding comma. In
+// this case, the ellipsis is parsed as part of the
+// abstract-declarator if the type of the parameter names a template
+// parameter pack that has not been expanded; otherwise, it is parsed
+// as part of the parameter-declaration-clause.
+
+template<typename T, typename ...Types>
+struct X0 {
+ typedef identity<T(Types...)> function_pack_1;
+ typedef identity<T(Types......)> variadic_function_pack_1;
+ typedef identity<T(T...)> variadic_1;
+ typedef tuple<T(Types, ...)...> template_arg_expansion_1;
+};
+
+
+
+// FIXME: Once function parameter packs are implemented, we can test all of the disambiguation