Implement partial ordering of class template partial specializations
commit264d1c0b116738e2823c9a2ecd8de226fdd7d894
authorDouglas Gregor <doug.gregor@gmail.com>
Tue, 11 Jan 2011 22:21:24 +0000 (11 22:21 +0000)
committerDouglas Gregor <doug.gregor@gmail.com>
Tue, 11 Jan 2011 22:21:24 +0000 (11 22:21 +0000)
tree4b1a6f4ac96869c95f4040a7249de878bf56c1e1
parent8daf2f48211cb6e2f2f926dbc9c6874a930ae692
Implement partial ordering of class template partial specializations
and function templates that contain variadic templates. This involves
three small-ish changes:

  (1) When transforming a pack expansion, if the transformed argument
  still contains unexpanded parameter packs, build a pack
  expansion. This can happen during the substitution that occurs into
  class template partial specialiation template arguments during
  partial ordering.

  (2) When performing template argument deduction where the argument
  is a pack expansion, match against the pattern of that pack
  expansion.

  (3) When performing template argument deduction against a non-pack
  parameter, or a non-expansion template argument, deduction fails if
  the argument itself is a pack expansion (C++0x
  [temp.deduct.type]p22).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123279 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateDeduction.cpp
lib/Sema/TreeTransform.h
test/CXX/temp/temp.decls/temp.variadic/partial-ordering.cpp [new file with mode: 0644]
test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/p12.cpp [new file with mode: 0644]
test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p22.cpp [new file with mode: 0644]