30 Apr 22:09
[boostbook] Supporting variadic template parameters
From: Daniel James <daniel_james <at> fmail.co.uk>
Subject: [boostbook] Supporting variadic template parameters
Newsgroups: gmane.comp.lib.boost.documentation
Date: 2008-04-30 20:12:02 GMT
Subject: [boostbook] Supporting variadic template parameters
Newsgroups: gmane.comp.lib.boost.documentation
Date: 2008-04-30 20:12:02 GMT
Hi,
I'd like to add support for variadic template parameters to BoostBook.
I've attached a patch showing what I've done so far - basically I'm
adding a variadic attribute to template-type-parameter and
template-nontype-parameter, for example:
<method name="emplace">
<template>
<template-type-parameter name="Args" variadic="1">
</template-type-parameter>
</template>
<parameter name="args">
<paramtype>Args&&...</paramtype>
</parameter>
<type>std::pair<iterator, bool></type>
</method>
for:
template<typename... Args>
std::pair<iterator, bool> emplace(Args&&... args)
You can see the output on:
http://unordered.nfshost.com/dev/doc/html/boost/unordered_set.html
Does this seem like a good solution? Giving the attribute a "1" value
seems very awkward, but I couldn't think of anything better (I copied
it from the 'html-only' attribute). Maybe it would be better to add
new tags for variadic parameters?
This is all pretty simple but my xml is very limited so any reviews
would be appreciated.
Finally, I'll also need to update the boostbook reference. I assume
that I should manually update reference.dtdxml. How is reference.xml
generated from reference.dtdxml?
thanks,
Daniel
_______________________________________________ Boost-docs mailing list Boost-docs <at> lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-docs
RSS Feed