File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,8 @@ Bug Fixes to C++ Support
158
158
159
159
- Fixed a crash when an expression with a dependent ``__typeof__ `` type is used as the operand of a unary operator. (#GH97646)
160
160
- Fixed a failed assertion when checking invalid delete operator declaration. (#GH96191)
161
+ - Fixed an assertion failure about a constraint of a friend function template references to a value with greater
162
+ template depth than the friend function template. (#GH98258)
161
163
162
164
Bug Fixes to AST Handling
163
165
^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -1691,10 +1691,7 @@ class ConstraintRefersToContainingTemplateChecker
1691
1691
using inherited::TransformTemplateTypeParmType;
1692
1692
QualType TransformTemplateTypeParmType (TypeLocBuilder &TLB,
1693
1693
TemplateTypeParmTypeLoc TL, bool ) {
1694
- assert (TL.getDecl ()->getDepth () <= TemplateDepth &&
1695
- " Nothing should reference a value below the actual template depth, "
1696
- " depth is likely wrong" );
1697
- if (TL.getDecl ()->getDepth () != TemplateDepth)
1694
+ if (TL.getDecl ()->getDepth () < TemplateDepth)
1698
1695
Result = true ;
1699
1696
return inherited::TransformTemplateTypeParmType (
1700
1697
TLB, TL,
Original file line number Diff line number Diff line change @@ -504,3 +504,19 @@ template struct Z<int>;
504
504
Y y (1 );
505
505
506
506
}
507
+
508
+ namespace GH98258 {
509
+
510
+ struct S {
511
+ template <typename U>
512
+ friend void f () requires requires { []<typename V>(V){}; } {
513
+ return ;
514
+ }
515
+
516
+ template <typename U>
517
+ friend void f2 () requires requires { [](auto ){}; } {
518
+ return ;
519
+ }
520
+ };
521
+
522
+ }
You can’t perform that action at this time.
0 commit comments