We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeae197 commit cfc5126Copy full SHA for cfc5126
clang/lib/Sema/SemaTemplateDeductionGuide.cpp
@@ -377,6 +377,9 @@ struct ConvertConstructorToDeductionGuideTransform {
377
if (NestedPattern)
378
Args.addOuterRetainedLevels(NestedPattern->getTemplateDepth());
379
auto [Depth, Index] = getDepthAndIndex(Param);
380
+ // Depth can still be 0 if FTD belongs to an explicit class template
381
+ // specialization with an empty template parameter list. In that case,
382
+ // we don't want the NewDepth to overflow, and it should remain 0.
383
assert(Depth ||
384
cast<ClassTemplateSpecializationDecl>(FTD->getDeclContext())
385
->isExplicitSpecialization());
0 commit comments