diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-10-07 17:21:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-10-07 17:21:34 +0000 |
commit | e4b05168f684f325429a8b5ef525a6ee47ea51b1 (patch) | |
tree | d84c861391b781a79a772c20228d02053ca22bcd /clang/test/CXX/temp/temp.decls | |
parent | aa47a8d71adf89ea37c3bfd417b00e39dc77ef45 (diff) | |
download | bcm5719-llvm-e4b05168f684f325429a8b5ef525a6ee47ea51b1.tar.gz bcm5719-llvm-e4b05168f684f325429a8b5ef525a6ee47ea51b1.zip |
Class template partial specializations can be declared anywhere that
its definition may be defined, including in a class.
Also, put in an assertion when trying to instantiate a class template
partial specialization of a member template, which is not yet
implemented.
llvm-svn: 83469
Diffstat (limited to 'clang/test/CXX/temp/temp.decls')
-rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp b/clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp new file mode 100644 index 00000000000..afe6ab2b968 --- /dev/null +++ b/clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp @@ -0,0 +1,20 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +template<typename T> +struct X0 { + template<typename U> struct Inner0 { + static const unsigned value = 0; + }; + + template<typename U> struct Inner0<U*> { + static const unsigned value = 1; + }; +}; + +template<typename T> template<typename U> +struct X0<T>::Inner0<const U*> { + static const unsigned value = 2; +}; + +// FIXME: Test instantiation of these partial specializations (once they are +// implemented). |