diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-15 16:51:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-15 16:51:42 +0000 |
commit | 00a511f0c16e1f8dae425b2041373aa50a29da27 (patch) | |
tree | 08d560844f4e44c3123fec7a7a6c7bc30a9de0bd /clang/test | |
parent | 160e635ba694198ac1d7c7a7016a63bd626ebff5 (diff) | |
download | bcm5719-llvm-00a511f0c16e1f8dae425b2041373aa50a29da27.tar.gz bcm5719-llvm-00a511f0c16e1f8dae425b2041373aa50a29da27.zip |
Slightly improved template argument deduction for use in partial
ordering, along with another test case for partial ordering of partial
specializations.
llvm-svn: 81869
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp b/clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp new file mode 100644 index 00000000000..b3b7635106c --- /dev/null +++ b/clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp @@ -0,0 +1,16 @@ +// RUN: clang-cc -fsyntax-only -verify %s +template<int I, int J, class T> class X { + static const int value = 0; +}; + +template<int I, int J> class X<I, J, int> { + static const int value = 1; +}; + +template<int I> class X<I, I, int> { + static const int value = 2; +}; + +int array0[X<0, 0, float>::value == 0? 1 : -1]; +int array1[X<0, 1, int>::value == 1? 1 : -1]; +int array2[X<0, 0, int>::value == 2? 1 : -1]; |