Browse files

Provide template parameters also for type aliases in the XML output.

Until now, probably due to C++03 assumptions, typedefs and type
aliases skipped printing of the template parameter specifications to
the XML output. That's now fixed, so the following type alias will
properly contain <templateparamlist> in the XML output:

    template<class T> using Vec = std::vector<T>;

Added also a test case that verifies this.
  • Loading branch information...
mosra committed Nov 28, 2017
1 parent 4f45bd2 commit 21f0ca0085c034a37df07c1ab690472bada0a1f1
Showing with 40 additions and 4 deletions.
  1. +1 −4 src/xmlgen.cpp
  2. +32 −0 testing/067/067__using_8cpp.xml
  3. +7 −0 testing/067_using.cpp
@@ -789,10 +789,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
if (md->memberType()!=MemberType_Typedef)
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
t << " <type>";
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
<compounddef id="067__using_8cpp" kind="file" language="C++">
<sectiondef kind="typedef">
<memberdef kind="typedef" id="067__using_8cpp_1a1b01c504448c96cd2191a5184dd31acf" prot="public" static="no">
<type>class T</type>
<type>std::vector&lt; T &gt;</type>
<definition>using Vec = std::vector&lt;T&gt;</definition>
<para>A vector. </para>
<location file="067_using.cpp" line="7" column="1" bodyfile="067_using.cpp" bodystart="7" bodyend="-1"/>
<location file="067_using.cpp"/>
@@ -0,0 +1,7 @@
// objective: test template parameters for a type alias
// check: 067__using_8cpp.xml
/** \file */
/** @brief A vector */
template<class T> using Vec = std::vector<T>;

0 comments on commit 21f0ca0

Please sign in to comment.