Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-05-01 16:53:00


Author: danieljames
Date: 2008-05-01 16:52:59 EDT (Thu, 01 May 2008)
New Revision: 44994
URL: http://svn.boost.org/trac/boost/changeset/44994

Log:
Support for variadic template parameters.
Text files modified:
   branches/doc/tools/boostbook/doc/reference.dtdxml | 11 +++++++++++
   branches/doc/tools/boostbook/doc/reference.xml | 2 ++
   branches/doc/tools/boostbook/dtd/boostbook.dtd | 2 ++
   branches/doc/tools/boostbook/xsl/template.xsl | 2 ++
   4 files changed, 17 insertions(+), 0 deletions(-)

Modified: branches/doc/tools/boostbook/doc/reference.dtdxml
==============================================================================
--- branches/doc/tools/boostbook/doc/reference.dtdxml (original)
+++ branches/doc/tools/boostbook/doc/reference.dtdxml 2008-05-01 16:52:59 EDT (Thu, 01 May 2008)
@@ -17,6 +17,7 @@
 <attpurpose name="filename">The name of the file associated with this element</attpurpose>
 <attpurpose name="specifiers">The specifiers for this function, e.g., <code>inline</code>, <code>static</code>, etc.</attpurpose>
 <attpurpose name="cv">cv-qualifiers for this method, e.g., <code>const volatile</code></attpurpose>
+<attpurpose name="variadic">Set to '1' if the template parameter is a variadic parameter.</attpurpose>
 
 <entity name="boost.class.content"
         type="param"
@@ -533,11 +534,16 @@
 <attlist name="template-type-parameter">
 <attdecl>
     name CDATA #REQUIRED
+ variadic CDATA #IMPLIED
     %boost.common.attrib;</attdecl>
 <attribute name="last-revision"
            type="#IMPLIED"
            value="CDATA"
            default=""/>
+<attribute name="variadic"
+ type="#IMPLIED"
+ value="CDATA"
+ default=""/>
 <attribute name="name"
            type="#REQUIRED"
            value="CDATA"
@@ -2709,11 +2715,16 @@
 <attlist name="template-nontype-parameter">
 <attdecl>
     name CDATA #REQUIRED
+ variadic CDATA #IMPLIED
     %boost.common.attrib;</attdecl>
 <attribute name="last-revision"
            type="#IMPLIED"
            value="CDATA"
            default=""/>
+<attribute name="variadic"
+ type="#IMPLIED"
+ value="CDATA"
+ default=""/>
 <attribute name="name"
            type="#REQUIRED"
            value="CDATA"

Modified: branches/doc/tools/boostbook/doc/reference.xml
==============================================================================
--- branches/doc/tools/boostbook/doc/reference.xml (original)
+++ branches/doc/tools/boostbook/doc/reference.xml 2008-05-01 16:52:59 EDT (Thu, 01 May 2008)
@@ -288,6 +288,7 @@
           <tbody>
 
 <row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>variadic</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to '1' if the template parameter is a variadic parameter.</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2299,6 +2300,7 @@
           <tbody>
 
 <row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>variadic</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to '1' if the template parameter is a variadic parameter.</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>

Modified: branches/doc/tools/boostbook/dtd/boostbook.dtd
==============================================================================
--- branches/doc/tools/boostbook/dtd/boostbook.dtd (original)
+++ branches/doc/tools/boostbook/dtd/boostbook.dtd 2008-05-01 16:52:59 EDT (Thu, 01 May 2008)
@@ -167,11 +167,13 @@
 <!ELEMENT template-type-parameter (default?, purpose?)>
 <!ATTLIST template-type-parameter
     name CDATA #REQUIRED
+ variadic CDATA #IMPLIED
     %boost.common.attrib;>
 
 <!ELEMENT template-nontype-parameter (type, default?, purpose?)>
 <!ATTLIST template-nontype-parameter
     name CDATA #REQUIRED
+ variadic CDATA #IMPLIED
     %boost.common.attrib;>
 
 <!ELEMENT template-varargs EMPTY>

Modified: branches/doc/tools/boostbook/xsl/template.xsl
==============================================================================
--- branches/doc/tools/boostbook/xsl/template.xsl (original)
+++ branches/doc/tools/boostbook/xsl/template.xsl 2008-05-01 16:52:59 EDT (Thu, 01 May 2008)
@@ -314,6 +314,7 @@
         <xsl:text>typename</xsl:text>
       </xsl:otherwise>
     </xsl:choose>
+ <xsl:if test="$parameter/@variadic=1"><xsl:text>...</xsl:text></xsl:if>
     <xsl:text> </xsl:text>
 
     <xsl:call-template name="template.parameter.name">
@@ -388,6 +389,7 @@
         <xsl:value-of select="$parameter/type/*|$parameter/type/text()"/>
       </xsl:otherwise>
     </xsl:choose>
+ <xsl:if test="$parameter/@variadic=1"><xsl:text>...</xsl:text></xsl:if>
     <xsl:text> </xsl:text>
 
     <xsl:call-template name="template.parameter.name">


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk