diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CompileFeatures/cxx_local_type_template_args.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_local_type_template_args.cpp b/Tests/CompileFeatures/cxx_local_type_template_args.cpp new file mode 100644 index 0000000..802ea7a --- /dev/null +++ b/Tests/CompileFeatures/cxx_local_type_template_args.cpp @@ -0,0 +1,21 @@ + +template <typename T> +class X { }; +template <typename T> +void f(T t) { } +struct {} unnamed_obj; +void f() { + struct A { }; + enum { e1 }; + typedef struct {} B; + B b; + X<A> x1; + X<A*> x2; + X<B> x3; + f(e1); + f(unnamed_obj); + f(b); + (void)x1; + (void)x2; + (void)x3; +} |