summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-template-template-parm.cpp
Commit message (Collapse)AuthorAgeFilesLines
* When comparing template parameter lists, distinguish between three cases:Douglas Gregor2009-11-121-1/+14
| | | | | | | | | | | | | | | | | | | | | - Comparing template parameter lists to determine if we have a redeclaration - Comparing template parameter lists to determine if we have equivalent template template parameters - Comparing template parameter lists to determine whether a template template argument is valid for a given template template parameter. Previously, we did not distinguish between the last two cases, which got us into trouble when we were looking for exact type matches between the types of non-type template parameters that were dependent types. Now we do, so we properly delay checking of template template arguments until instantiation time. Also, fix an accidental fall-through in a case statement that was causing crashes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86992 91177308-0d34-0410-b5e6-96231b3b80d8
* Before checking a template template argument against its correspondingDouglas Gregor2009-11-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | template template parameter, substitute any prior template arguments into the template template parameter. This, for example, allows us to properly check the template template argument for a class such as: template<typename T, template<T Value> class X> struct Foo; The actual implementation of this feature was trivial; most of the change is dedicated to giving decent diagnostics when this substitution goes horribly wrong. We now get a note like: note: while substituting prior template arguments into template template parameter 'X' [with T = float] As part of this change, enabled some very pedantic checking when comparing template template parameter lists, which shook out a bug in our overly-eager checking of default arguments of template template parameters. We now perform only minimal checking of such default arguments when they are initially parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86864 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement template instantiation for template names, including bothDouglas Gregor2009-03-311-0/+21
template template parameters and dependent template names. For example, the oft-mentioned typename MetaFun::template apply<T1, T2>::type can now be instantiated, with the appropriate name lookup for "apply". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68128 91177308-0d34-0410-b5e6-96231b3b80d8