diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-23 17:13:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-23 17:13:55 +0000 |
commit | dd7ec463be01656d2269c2068a34d5d4d69ad3b5 (patch) | |
tree | 3b1f7daf5e704496bf1504d63517106790e71f23 /clang/test | |
parent | f647e95b9aa4811e7fba5f359f32a955d910da11 (diff) | |
download | bcm5719-llvm-dd7ec463be01656d2269c2068a34d5d4d69ad3b5.tar.gz bcm5719-llvm-dd7ec463be01656d2269c2068a34d5d4d69ad3b5.zip |
Reimplement the comparison of a class template partial
specialization's template arguments against the primary template's
template arguments using the obvious, correct method of checking the
injected-class-name type (C++ [temp.class.spec]p9b3). The previous
incarnation of this comparison attempted to use its own formulation of
the injected-class-name, which is redudant and, with the introduction
of variadic templates, became wrong (again).
llvm-svn: 122508
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.class.spec/p9-0x.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.class.spec/p9-0x.cpp b/clang/test/CXX/temp/temp.decls/temp.class.spec/p9-0x.cpp new file mode 100644 index 00000000000..d8e07b83e1b --- /dev/null +++ b/clang/test/CXX/temp/temp.decls/temp.class.spec/p9-0x.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s + +// -- The argument list of the specialization shall not be identical +// to the implicit argument list of the primary template. + +template<typename T, typename ...Types> +struct X1; + +template<typename T, typename ...Types> +struct X1<T, Types...> // expected-error{{class template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list}} +{ }; + + |