diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-07-22 21:30:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-07-22 21:30:48 +0000 |
commit | d6605dbbc034ba8686f7e69b71cf0bb6ec8f0906 (patch) | |
tree | 0ed15079dd20744e84320b4cdf15f61e58ef5d49 /clang/test/SemaTemplate/temp_class_spec.cpp | |
parent | 096ecf1bed8fdb29075b2901b87d6c21315cc747 (diff) | |
download | bcm5719-llvm-d6605dbbc034ba8686f7e69b71cf0bb6ec8f0906.tar.gz bcm5719-llvm-d6605dbbc034ba8686f7e69b71cf0bb6ec8f0906.zip |
Fix the problems with template argument deduction and array types for
real. It turns out that we need to actually move all of the qualifiers
up to the array type itself, then recanonicalize the deduced template
argument type.
llvm-svn: 76788
Diffstat (limited to 'clang/test/SemaTemplate/temp_class_spec.cpp')
-rw-r--r-- | clang/test/SemaTemplate/temp_class_spec.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/temp_class_spec.cpp b/clang/test/SemaTemplate/temp_class_spec.cpp index b1053fe3cb7..9087b012b32 100644 --- a/clang/test/SemaTemplate/temp_class_spec.cpp +++ b/clang/test/SemaTemplate/temp_class_spec.cpp @@ -94,7 +94,20 @@ struct remove_reference<T&> { int remove_ref0[is_same<remove_reference<int>::type, int>::value? 1 : -1]; int remove_ref1[is_same<remove_reference<int&>::type, int>::value? 1 : -1]; - + +template<typename T> +struct remove_const { + typedef T type; +}; + +template<typename T> +struct remove_const<const T> { + typedef T type; +}; + +int remove_const0[is_same<remove_const<const int>::type, int>::value? 1 : -1]; +int remove_const1[is_same<remove_const<const int[3]>::type, int[3]>::value? 1 : -1]; + template<typename T> struct is_incomplete_array { static const bool value = false; |