Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83976 - in trunk: boost libs/any/doc
From: antoshkka_at_[hidden]
Date: 2013-04-20 02:54:56


Author: apolukhin
Date: 2013-04-20 02:54:54 EDT (Sat, 20 Apr 2013)
New Revision: 83976
URL: http://svn.boost.org/trac/boost/changeset/83976

Log:
Added missing BOOST_NOEXCEPT to destructor and updated documentation of Boost.Any (refs #6999)
Added:
   trunk/libs/any/doc/Jamfile.v2 (contents, props changed)
Text files modified:
   trunk/boost/any.hpp | 4 +-
   trunk/libs/any/doc/any.xml | 79 ++++++++++++++++++++++++++++++++++++++-
   2 files changed, 79 insertions(+), 4 deletions(-)

Modified: trunk/boost/any.hpp
==============================================================================
--- trunk/boost/any.hpp (original)
+++ trunk/boost/any.hpp 2013-04-20 02:54:54 EDT (Sat, 20 Apr 2013)
@@ -10,7 +10,7 @@
 // what: variant type boost::any
 // who: contributed by Kevlin Henney,
 // with features contributed and bugs found by
-// Antony polukhin, Ed Brey, Mark Rodgers,
+// Antony Polukhin, Ed Brey, Mark Rodgers,
 // Peter Dimov, and James Curran
 // when: July 2001, Aplril 2013
 
@@ -74,7 +74,7 @@
         }
 #endif
 
- ~any()
+ ~any() BOOST_NOEXCEPT
         {
             delete content;
         }

Added: trunk/libs/any/doc/Jamfile.v2
==============================================================================
--- (empty file)
+++ trunk/libs/any/doc/Jamfile.v2 2013-04-20 02:54:54 EDT (Sat, 20 Apr 2013)
@@ -0,0 +1,9 @@
+# Copyright Antony Polukhin 2013. Use, modification, and distribution are
+# subject to the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+using boostbook ;
+
+boostbook standalone
+ : any.xml
+ : <xsl:param>boost.root=../../../.. ;

Modified: trunk/libs/any/doc/any.xml
==============================================================================
--- trunk/libs/any/doc/any.xml (original)
+++ trunk/libs/any/doc/any.xml 2013-04-20 02:54:54 EDT (Sat, 20 Apr 2013)
@@ -237,7 +237,8 @@
 
       <itemizedlist spacing="compact">
         <listitem><simpara>A <emphasis>ValueType</emphasis> is
- <emphasis>CopyConstructible</emphasis> [20.1.3].</simpara>
+ <emphasis>CopyConstructible</emphasis> [20.1.3] or
+ <emphasis>MoveConstructible</emphasis> in C++11.</simpara>
         </listitem>
         
         <listitem><simpara>The destructor for a
@@ -290,6 +291,19 @@
           </constructor>
 
           <constructor>
+ <parameter name="other">
+ <paramtype><classname>any</classname> &amp;&amp;</paramtype>
+ </parameter>
+
+ <effects><simpara> Move constructor that moves content of
+ <code>other</code> into new instance and leaves <code>other</code>
+ empty. </simpara></effects>
+ <precondition>C++11 compatible compiler.</precondition>
+ <postconditions><simpara><code>other-&gt;<methodname>empty</methodname>()</code></simpara></postconditions>
+ <throws><simpara>Nothing.</simpara></throws>
+ </constructor>
+
+ <constructor>
             <template>
               <template-type-parameter name="ValueType"/>
             </template>
@@ -307,6 +321,26 @@
             or any exceptions arising from the copy constructor of the
             contained type.</simpara></throws>
           </constructor>
+
+ <constructor>
+ <template>
+ <template-type-parameter name="ValueType"/>
+ </template>
+
+ <parameter name="value">
+ <paramtype>ValueType &amp;&amp;</paramtype>
+ </parameter>
+
+ <effects><simpara>Forwards <code>value</code>, so
+ that the initial content of the new instance is equivalent
+ in both type and value to
+ <code>value</code> before the forward.</simpara></effects>
+
+ <precondition>C++11 compatible compiler.</precondition>
+ <throws><simpara><code><classname>std::bad_alloc</classname></code>
+ or any exceptions arising from the copy constructor of the
+ contained type.</simpara></throws>
+ </constructor>
 
           <destructor>
             <effects><simpara>Releases any and all resources used in
@@ -332,6 +366,24 @@
             contained type. Assignment satisfies the strong guarantee
             of exception safety.</simpara></throws>
           </copy-assignment>
+
+ <copy-assignment>
+ <type><classname>any</classname> &amp;</type>
+
+ <parameter name="rhs">
+ <paramtype><classname>any</classname> &amp;&amp;</paramtype>
+ </parameter>
+
+ <effects><simpara>Moves content of <code>rhs</code> into
+ current instance, discarding previous content, so that the
+ new content is equivalent in both type and value to the
+ content of <code>rhs</code> before move, or empty if
+ <code>rhs.<methodname>empty</methodname>()</code>.</simpara></effects>
+
+ <precondition>C++11 compatible compiler.</precondition>
+ <postconditions><simpara><code>rhs-&gt;<methodname>empty</methodname>()</code></simpara></postconditions>
+ <throws><simpara>Nothing.</simpara></throws>
+ </copy-assignment>
 
           <copy-assignment>
              <template>
@@ -355,6 +407,29 @@
             of exception safety.</simpara></throws>
           </copy-assignment>
 
+ <copy-assignment>
+ <template>
+ <template-type-parameter name="ValueType"/>
+ </template>
+
+ <type><classname>any</classname> &amp;</type>
+
+ <parameter name="rhs">
+ <paramtype>ValueType &amp;&amp;</paramtype>
+ </parameter>
+
+ <effects><simpara>Forwards <code>rhs</code>,
+ discarding previous content, so that the new content of is
+ equivalent in both type and value to
+ <code>rhs</code> before forward.</simpara></effects>
+
+ <precondition>C++11 compatible compiler.</precondition>
+ <throws><simpara><code><classname>std::bad_alloc</classname></code>
+ or any exceptions arising from the move or copy constructor of the
+ contained type. Assignment satisfies the strong guarantee
+ of exception safety.</simpara></throws>
+ </copy-assignment>
+
           <method-group name="modifiers">
             <method name="swap">
               <type><classname>any</classname> &amp;</type>
@@ -380,7 +455,7 @@
               <returns><simpara><code>true</code> if instance is
               empty, otherwise <code>false</code>.</simpara></returns>
               
- <throws><simpara>Will not throw.</simpara></throws>
+ <throws><simpara>Nothing.</simpara></throws>
             </method>
 
             <method name="type" cv="const">


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