]> granicus.if.org Git - clang/commit
When substituting previously-checked template arguments into a template
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 8 Mar 2018 01:07:33 +0000 (01:07 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 8 Mar 2018 01:07:33 +0000 (01:07 +0000)
commit9cc56bc373a32a2def1e752b33dd95b1200a994a
treeac1d0d95ff9f6ce953bff35007f2975fc466a56e
parent8e95e93cab55d658245c87490ad8cb3e5211e0c4
When substituting previously-checked template arguments into a template
template parameter that is an expanded parameter pack, only substitute into the
current slice, not the entire pack.

This reduces the checking of N template template arguments for an expanded
parameter pack containing N parameters from quadratic time to linear time in
the length of the pack. This is important because one (and possibly the only?)
general technique for splitting a template parameter pack in linear time
depends on doing this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326973 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/CXX/drs/dr10xx.cpp
test/SemaTemplate/temp-param-subst-linear.cpp [new file with mode: 0644]