diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-13 05:23:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-13 05:23:25 +0000 |
commit | fe3310697028d8d3d35a11b0877bb2bc47e55b8d (patch) | |
tree | ed7a2e4b3a14e89c45b863933b4796a57ba91b85 /test | |
parent | b689afb75049012a431d483432114ad5e75d4a92 (diff) |
Permit the use of typedefs of class template specializations in
qualified declarator-ids. This patch is actually due to Cornelius;
fixes PR6179.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp index 3b5b5afa8e..88cfc5d7c3 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp @@ -18,7 +18,18 @@ namespace test1 { }; typedef A<int> AA; - template <> int AA::foo = 0; // expected-error {{cannot use typedef}} - int AA::bar = 1; // expected-error {{cannot use typedef}} expected-error {{template specialization requires 'template<>'}} + template <> int AA::foo = 0; + int AA::bar = 1; // expected-error {{template specialization requires 'template<>'}} int A<float>::bar = 2; // expected-error {{template specialization requires 'template<>'}} + + template <> class A<double> { + public: + static int foo; // expected-note{{attempt to specialize}} + static int bar; + }; + + typedef A<double> AB; + template <> int AB::foo = 0; // expected-error{{extraneous 'template<>'}} \ + // expected-error{{does not specialize}} + int AB::bar = 1; } |