You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A DependentTemplateSpecializationType (DTST) is basically just a
TemplateSpecializationType (TST) with a hardcoded DependentTemplateName (DTN)
as its TemplateName.
This removes the DTST and replaces all uses of it with a TST, removing
a lot of duplication in the implementation.
Technically the hardcoded DTN is an optimization for a most common case, but
the TST implementation is in better shape overall and with other optimizations,
so this patch ends up being an overall performance positive:
A DTST also didn't allow a template name representing a DependentTemplateName
that was substituted from an alias templates, while the TST does by the simple
fact it can hold an arbitrary TemplateName, so this patch also increases the
amount of sugar retained, while still being faster overall.
Example (from included test case):
```C++
template<template<class> class TT> using T1 = TT<int>;
template<class T> using T2 = T1<T::template X>;
```
Here we can now represent in the AST that `TT` was substituted for the dependent
template name `T::template X`.
0 commit comments