Skip to content

Commit 5750b79

Browse files
committed
fix: infinite recursion when identifying SFINAE types
1 parent e6205d5 commit 5750b79

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/AST/ASTVisitor.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,11 @@ class ASTVisitor
17161716
return true;
17171717
continue;
17181718
}
1719+
// if the class inherits from itself, we can't determine whether
1720+
// it's a SFINAE type
1721+
if(declaresSameEntity(TD, sfinae_info->Template))
1722+
return true;
1723+
17191724
auto sfinae_result = isSFINAETemplate(
17201725
sfinae_info->Template, Member);
17211726
if(! sfinae_result)

0 commit comments

Comments
 (0)