@@ -1837,7 +1837,17 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
18371837 // foreach identifier in the type
18381838 {
18391839 // printf(" i=%d p=%d\n",i,p);
1840- if (i>pp) canType += type.mid (pp,i-pp);
1840+ if (i>pp)
1841+ {
1842+ if (i-pp>=2 && type[i-2 ]==' :' && type[i-1 ]==' :' ) // skip over leading ::, see issue #12021
1843+ {
1844+ canType += type.mid (pp,i-pp-2 );
1845+ }
1846+ else
1847+ {
1848+ canType += type.mid (pp,i-pp);
1849+ }
1850+ }
18411851
18421852 QCString ct = getCanonicalTypeForIdentifier (d,fs,word,lang,&templSpec);
18431853
@@ -4225,7 +4235,7 @@ void addMembersToMemberGroup(MemberList *ml,
42254235 */
42264236int extractClassNameFromType (const QCString &type,int &pos,QCString &name,QCString &templSpec,SrcLangExt lang)
42274237{
4228- AUTO_TRACE (" type='{}' name='{}' lang={}" ,type,name,lang);
4238+ AUTO_TRACE (" type='{}' pos={} name='{}' lang={}" ,type,pos ,name,lang);
42294239 static const reg::Ex re_norm (R"( \a[\w:]*)" );
42304240 static const reg::Ex re_fortran (R"( \a[\w:()=]*)" );
42314241 const reg::Ex *re = &re_norm;
0 commit comments