Skip to content

Commit 32093bc

Browse files
author
Dimitri van Heesch
committed
Fix for rendering the template parameters of members of variadic template classes.
1 parent 9537515 commit 32093bc

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/defargs.l

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,18 +370,18 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
370370
if (a->type.left(6)=="const ") sv=6;
371371
else if (a->type.left(9)=="volatile ") sv=9;
372372
373-
if (a->type.mid(sv)=="struct" ||
374-
a->type.mid(sv)=="union" ||
375-
a->type.mid(sv)=="class" ||
376-
a->type.mid(sv)=="typename" ||
377-
a->type=="const" ||
373+
if (a->type.mid(sv,6)=="struct" ||
374+
a->type.mid(sv,5)=="union" ||
375+
a->type.mid(sv,5)=="class" ||
376+
a->type.mid(sv,8)=="typename" ||
377+
a->type=="const" ||
378378
a->type=="volatile"
379379
)
380380
{
381381
a->type = a->type + " " + a->name;
382382
a->name.resize(0);
383383
}
384-
//printf(" --> a->type='%s'\n",a->type.data());
384+
//printf(" --> a->type='%s' a->name='%s'\n",a->type.data(),a->name.data());
385385
}
386386
else // assume only the type was specified, try to determine name later
387387
{

src/doxygen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ static void addClassToContext(EntryNav *rootNav)
13531353
//printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
13541354

13551355
//printf("class %s template args=%s\n",fullName.data(),
1356-
// tArgList ? tempArgListToString(tArgList).data() : "<none>");
1356+
// tArgList ? tempArgListToString(tArgList,root->lang).data() : "<none>");
13571357
cd->setTemplateArguments(tArgList);
13581358
cd->setProtection(root->protection);
13591359
cd->setIsStatic(root->stat);

src/util.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
17241724
growBuf.addChar(' ');
17251725
}
17261726
else if (i>0 && c=='>' && // current char is a >
1727-
(isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&') && // prev char is an id char or space
1727+
(isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&' || s.at(i-1)=='.') && // prev char is an id char or space
17281728
(i<8 || !findOperator(s,i)) // string in front is not "operator"
17291729
)
17301730
{
@@ -2225,6 +2225,10 @@ QCString tempArgListToString(ArgumentList *al,SrcLangExt lang)
22252225
if (i>0)
22262226
{
22272227
result+=a->type.right(a->type.length()-i-1);
2228+
if (a->type.find("...")!=-1)
2229+
{
2230+
result+="...";
2231+
}
22282232
}
22292233
else // nothing found -> take whole name
22302234
{

0 commit comments

Comments
 (0)