File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1664,10 +1664,7 @@ class ConstraintRefersToContainingTemplateChecker
1664
1664
}
1665
1665
1666
1666
void CheckNonTypeTemplateParmDecl (NonTypeTemplateParmDecl *D) {
1667
- assert (D->getDepth () <= TemplateDepth &&
1668
- " Nothing should reference a value below the actual template depth, "
1669
- " depth is likely wrong" );
1670
- if (D->getDepth () != TemplateDepth)
1667
+ if (D->getDepth () < TemplateDepth)
1671
1668
Result = true ;
1672
1669
1673
1670
// Necessary because the type of the NTTP might be what refers to the parent
Original file line number Diff line number Diff line change @@ -517,6 +517,11 @@ struct S {
517
517
friend void f2 () requires requires { [](auto ){}; } {
518
518
return ;
519
519
}
520
+
521
+ template <typename U>
522
+ friend void f3 () requires requires { []<int X>(){ return X; }; } {
523
+ return ;
524
+ }
520
525
};
521
526
522
527
}
You can’t perform that action at this time.
0 commit comments