Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86277 - in trunk/tools/boostbook: test/doxygen test/doxygen/boost xsl/doxygen
From: dnljms_at_[hidden]
Date: 2013-10-12 16:11:47


Author: danieljames
Date: 2013-10-12 16:11:47 EDT (Sat, 12 Oct 2013)
New Revision: 86277
URL: http://svn.boost.org/trac/boost/changeset/86277

Log:
Add noexcept and constexpr to doxygen to boostbook coversion.

Should really add proper support to boostbook for `=delete`, `=default` and
noexcept, but I'm not feeling that keen right now. I'm not sure I did the right
thing with `BOOST_CONSTEXPR_OR_CONST`.

Text files modified:
   trunk/tools/boostbook/test/doxygen/autodoc.gold | 6 ++++++
   trunk/tools/boostbook/test/doxygen/boost/example.hpp | 9 +++++++++
   trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 7 +++++++
   3 files changed, 22 insertions(+), 0 deletions(-)

Modified: trunk/tools/boostbook/test/doxygen/autodoc.gold
==============================================================================
--- trunk/tools/boostbook/test/doxygen/autodoc.gold Sat Oct 12 16:11:16 2013 (r86276)
+++ trunk/tools/boostbook/test/doxygen/autodoc.gold 2013-10-12 16:11:47 EDT (Sat, 12 Oct 2013) (r86277)
@@ -16,6 +16,12 @@
 <method-group name="public member functions">
 <method name="virtual_method"><type>virtual int</type></method>
 <method name="method_with_default_value"><type>int</type><parameter name=""><paramtype>int</paramtype><default>default_value</default></parameter></method>
+<method name="trad_noexcept" cv="noexcept"><type>void</type></method>
+<method name="boost_noexcept" cv="noexcept"><type>void</type></method>
+<method name="trad_constexpr" cv="constexpr"><type>void</type></method>
+<method name="boost_constexpr" cv="constexpr"><type>void</type></method>
+<method name="boost_constexpr_or_const" cv="constexpr"><type>void</type></method>
+<method name="constexpr_noexcept" cv="constexpr noexcept"><type>void</type></method>
 <method name="conversion-operator" specifiers="explicit"><type>int</type></method>
 </method-group>
 <constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor>

Modified: trunk/tools/boostbook/test/doxygen/boost/example.hpp
==============================================================================
--- trunk/tools/boostbook/test/doxygen/boost/example.hpp Sat Oct 12 16:11:16 2013 (r86276)
+++ trunk/tools/boostbook/test/doxygen/boost/example.hpp 2013-10-12 16:11:47 EDT (Sat, 12 Oct 2013) (r86277)
@@ -37,6 +37,15 @@
         virtual int virtual_method();
         int method_with_default_value(int = default_value);
 
+ void trad_noexcept() noexcept;
+ void boost_noexcept() BOOST_NOEXCEPT;
+
+ void trad_constexpr() constexpr;
+ void boost_constexpr() BOOST_CONSTEXPR;
+ void boost_constexpr_or_const() BOOST_CONSTEXPR_OR_CONST;
+
+ void constexpr_noexcept() constexpr noexcept;
+
         int integer;
         static int static_integer;
         mutable int mutable_integer;

Modified: trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl Sat Oct 12 16:11:16 2013 (r86276)
+++ trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2013-10-12 16:11:47 EDT (Sat, 12 Oct 2013) (r86277)
@@ -1071,8 +1071,15 @@
          supported in boostbook -->
     <!-- The 'substring' trick includes the string if the condition is true -->
     <xsl:variable name="cv-qualifiers" select="normalize-space(concat(
+ substring('constexpr ', 1, 999 * (
+ contains($extra-qualifiers, ' const expr ') or
+ contains($extra-qualifiers, ' BOOST_CONSTEXPR ') or
+ contains($extra-qualifiers, ' BOOST_CONSTEXPR_OR_CONST '))),
         substring('const ', 1, 999 * (@const=yes)),
         substring('volatile ', 1, 999 * (@volatile=yes)),
+ substring('noexcept ', 1, 999 * (
+ contains($extra-qualifiers, ' noexcept ') or
+ contains($extra-qualifiers, ' BOOST_NOEXCEPT '))),
         substring('= delete ', 1, 999 * contains($extra-qualifiers, ' =delete ')),
         substring('= default ', 1, 999 * contains($extra-qualifiers, ' =default ')),
         ''))" />


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