diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-02-26 06:03:23 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-02-26 06:03:23 +0000 |
| commit | c854c6655759fd0e5ee629c39362e9f7785565b2 (patch) | |
| tree | 370c3308803c91c928e17436dedfc94dd26dcf64 /clang/test | |
| parent | 6642ca217e730060530ad679bf395ee0e208f188 (diff) | |
| download | bcm5719-llvm-c854c6655759fd0e5ee629c39362e9f7785565b2.tar.gz bcm5719-llvm-c854c6655759fd0e5ee629c39362e9f7785565b2.zip | |
An explicit specialization is allowed following an explicit
instantiation so long as that explicit specialization was declared
previously. Fixes PR6160.
llvm-svn: 97210
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp index 34c3710e04c..f5394713968 100644 --- a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp +++ b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp @@ -54,3 +54,10 @@ void f(Array<String>& v) { template<> void sort<String>(Array<String>& v); // // expected-error{{after instantiation}} template<> void sort<>(Array<char*>& v); // OK: sort<char*> not yet used + +namespace PR6160 { + template<typename T> void f(T); + template<> void f(int); + extern template void f(int); + template<> void f(int) { } +} |

