================
@@ -377,8 +377,12 @@ struct ConvertConstructorToDeductionGuideTransform {
if (NestedPattern)
Args.addOuterRetainedLevels(NestedPattern->getTemplateDepth());
auto [Depth, Index] = getDepthAndIndex(Param);
+ assert(Depth ||
+ cast<ClassTemplateSpecializationDecl>(FTD->getDeclContext())
+ ->isExplicitSpecialization());
NamedDecl *NewParam = transformTemplateParameter(
- SemaRef, DC, Param, Args, Index + Depth1IndexAdjustment, Depth -
1);
+ SemaRef, DC, Param, Args, Index + Depth1IndexAdjustment,
+ Depth ? Depth - 1 : 0);
----------------
zyn0217 wrote:
Oh I realized we sometimes still want to use `Depth - 1` even if it is an
explicit specialization (because it could be nested as in the first case, and
the transformed depth should be 0) - so I think this is good enough?
https://github.com/llvm/llvm-project/pull/128704
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits