Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81512 - in sandbox-branches/geometry/index_dev: boost/geometry/extensions/index/rtree doc/html doc/html/geometry_index doc/html/geometry_index/r_tree doc/rtree test/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2012-11-24 14:54:38


Author: awulkiew
Date: 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
New Revision: 81512
URL: http://svn.boost.org/trac/boost/changeset/81512

Log:
Added rtree::swap() method.
Added requirement 'Nonthrowing copy constructor of the Translator'.

Text files modified:
   sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp | 42 ++++++++++++++++++++---------
   sandbox-branches/geometry/index_dev/doc/html/geometry_index/introduction.html | 2
   sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree.html | 2
   sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/creation_and_modification.html | 6 ++--
   sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/exception_safety.html | 56 ++++++++++++++++++++++-----------------
   sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/introduction.html | 2
   sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html | 2
   sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/rtree_quickstart.html | 4 +-
   sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/spatial_queries.html | 2
   sandbox-branches/geometry/index_dev/doc/html/index.html | 4 +-
   sandbox-branches/geometry/index_dev/doc/rtree/exception_safety.qbk | 15 +++++-----
   sandbox-branches/geometry/index_dev/test/rtree/test_rtree.hpp | 36 +++++++++++++++++++------
   12 files changed, 107 insertions(+), 66 deletions(-)

Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -103,15 +103,14 @@
     /*!
     The constructor.
 
- \note Exception-safety: nothrow (if translator has nonthrowing copy ctor),
- strong (if translator has throwing copy ctor)
+ \note Exception-safety: nothrow
 
     \param parameters The parameters object.
     \param translator The translator object.
     \param allocator The allocator object.
     */
     inline explicit rtree(Parameters parameters = Parameters(), translator_type const& translator = translator_type(), Allocator allocator = Allocator())
- : m_translator(translator) // MAY THROW (copy)
+ : m_translator(translator) // SHOULDN'T THROW
         , m_parameters(parameters)
         , m_allocators(allocator)
         , m_values_count(0)
@@ -132,7 +131,7 @@
     */
     template<typename Iterator>
     inline rtree(Iterator first, Iterator last, Parameters parameters = Parameters(), translator_type const& translator = translator_type(), Allocator allocator = std::allocator<value_type>())
- : m_translator(translator) // MAY THROW (copy)
+ : m_translator(translator) // SHOULDN'T THROW
         , m_parameters(parameters)
         , m_allocators(allocator)
         , m_values_count(0)
@@ -166,7 +165,7 @@
     \note Exception-safety: strong
     */
     inline rtree(rtree const& src)
- : m_translator(src.m_translator) // MAY THROW (copy)
+ : m_translator(src.m_translator) // SHOULDN'T THROW
         , m_parameters(src.m_parameters)
         , m_allocators(src.m_allocators)
         , m_values_count(0)
@@ -184,7 +183,7 @@
     \note Exception-safety: strong
     */
     inline rtree(rtree const& src, Allocator const& allocator)
- : m_translator(src.m_translator) // MAY THROW (copy)
+ : m_translator(src.m_translator) // SHOULDN'T THROW
         , m_parameters(src.m_parameters)
         , m_allocators(allocator)
         , m_values_count(0)
@@ -197,11 +196,10 @@
     /*!
     The moving constructor.
 
- \note Exception-safety: nothrow (if translator has nonthrowing copy ctor),
- strong (if translator has throwing copy ctor)
+ \note Exception-safety: nothrow
     */
     inline rtree(BOOST_RV_REF(rtree) src)
- : m_translator(src.m_translator) // MAY THROW (copy)
+ : m_translator(src.m_translator) // SHOULDN'T THROW
         , m_parameters(src.m_parameters)
         , m_allocators(src.m_allocators)
         , m_values_count(src.m_values_count)
@@ -234,8 +232,8 @@
     /*!
     The moving assignment.
 
- \note Exception-safety: nothrow (if allocators are equal and translator has nonthrowing copy ctor),
- strong (if allocators aren't equal or translator has throwing copy ctor)
+ \note Exception-safety: nothrow (if allocators are equal),
+ strong (if allocators aren't equal)
     */
     inline rtree & operator=(BOOST_RV_REF(rtree) src)
     {
@@ -246,7 +244,7 @@
 
         if ( m_allocators.allocator == src.m_allocators.allocator )
         {
- m_translator = src.m_translator; // MAY THROW (copy)
+ m_translator = src.m_translator; // SHOULDN'T THROW
             m_parameters = src.m_parameters;
             //m_allocators = src.m_allocators;
 
@@ -268,6 +266,24 @@
     }
 
     /*!
+ Swaps two rtrees.
+
+ \note Exception-safety: nothrow
+
+ \param other The other rtree.
+ */
+ void swap(rtree & other)
+ {
+ std::swap(m_translator, other.m_translator); // SHOULDN'T THROW
+ std::swap(m_parameters, other.m_parameters);
+ std::swap(m_allocators, other.m_allocators);
+
+ std::swap(m_values_count, other.m_values_count);
+ std::swap(m_leafs_level, other.m_leafs_level);
+ std::swap(m_root, other.m_root);
+ }
+
+ /*!
     Insert a value to the index.
 
     \note Exception-safety: basic
@@ -732,7 +748,7 @@
 
         if ( copy_all_internals )
         {
- dst.m_translator = src.m_translator; // MAY THROW
+ dst.m_translator = src.m_translator; // SHOULDN'T THROW
 
             dst.m_parameters = src.m_parameters;
             //dst.m_allocators = dst.m_allocators;

Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/introduction.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/introduction.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/introduction.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Introduction</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">

Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>R-tree</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="prev" href="introduction.html" title="Introduction">

Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/creation_and_modification.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/creation_and_modification.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/creation_and_modification.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Creation and modification</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="rtree_quickstart.html" title="Quick Start">
@@ -51,7 +51,7 @@
         </p>
 <pre class="programlisting"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Parameters</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
 </pre>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
               <code class="computeroutput">Value</code> - type of object which will be stored in the container.
             </li>
@@ -89,7 +89,7 @@
           <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;...&gt;</span></code>,
           pointer, iterator or smart pointer.
         </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
               <code class="computeroutput">Indexable <span class="special">=</span> Point
               <span class="special">|</span> Box</code>

Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/exception_safety.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/exception_safety.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/exception_safety.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Exception safety</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="nearest_neighbours_queries.html" title="Nearest neighbours queries">
@@ -28,7 +28,7 @@
 <p>
         In order to be exception-safe the R-tree requires:
       </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
             Nonthrowing destructor of the <code class="computeroutput">Value</code>.
           </li>
@@ -36,7 +36,11 @@
             Exception-safe copy constructor of the <code class="computeroutput">Value</code>.
           </li>
 <li class="listitem">
- Exception-safe copy constructor of the <code class="computeroutput"><span class="identifier">CoordinateType</span></code>.
+ Exception-safe copy constructor of the <code class="computeroutput"><span class="identifier">CoordinateType</span></code>
+ used in the <code class="computeroutput"><span class="identifier">Indexable</span></code>.
+ </li>
+<li class="listitem">
+ Nonthrowing copy constructor of the <code class="computeroutput"><span class="identifier">Translator</span></code>.
           </li>
 </ul></div>
 <div class="informaltable"><table class="table">
@@ -65,8 +69,7 @@
               </td>
 <td>
                 <p>
- <span class="emphasis"><em>nothrow (default)</em></span> or <span class="bold"><strong>strong</strong></span>
- [a]</sup></a>
+ <span class="emphasis"><em>nothrow</em></span>
                 </p>
               </td>
 </tr>
@@ -139,8 +142,7 @@
               </td>
 <td>
                 <p>
- <span class="emphasis"><em>nothrow (default)</em></span> or <span class="bold"><strong>strong</strong></span>
- [b]</sup></a>
+ <span class="emphasis"><em>nothrow</em></span>
                 </p>
               </td>
 </tr>
@@ -153,7 +155,19 @@
 <td>
                 <p>
                   <span class="emphasis"><em>nothrow</em></span> or <span class="bold"><strong>strong</strong></span>
- [c]</sup></a>
+ <sup>[<a name="geometry_index.r_tree.exception_safety.f0" href="#ftn.geometry_index.r_tree.exception_safety.f0" class="footnote">a</a>]</sup>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">swap</span><span class="special">(</span><span class="identifier">rtree</span> <span class="special">&amp;)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
                 </p>
               </td>
 </tr>
@@ -293,7 +307,8 @@
               </td>
 <td>
                 <p>
- <span class="emphasis"><em>nothrow</em></span>
+ <span class="emphasis"><em>nothrow</em></span> or <span class="bold"><strong>strong</strong></span>
+ <sup>[<a name="geometry_index.r_tree.exception_safety.f1" href="#ftn.geometry_index.r_tree.exception_safety.f1" class="footnote">b</a>]</sup>
                 </p>
               </td>
 </tr>
@@ -335,23 +350,14 @@
 </tr>
 </tbody>
 <tbody class="footnotes"><tr><td colspan="2">
-<div id="ftn.geometry_index.r_tree.exception_safety.f0" class="footnote"><p>[a]
- <span class="emphasis"><em>nothrow</em></span> - if <code class="computeroutput"><span class="identifier">Translator</span></code>
- has nonthrowing copy constructor (default), <span class="bold"><strong>strong</strong></span>
- - if <code class="computeroutput"><span class="identifier">Translator</span></code>
- has throwing copy constructor
- </p></div>
-<div id="ftn.geometry_index.r_tree.exception_safety.f1" class="footnote"><p>[b]
- <span class="emphasis"><em>nothrow</em></span> - if <code class="computeroutput"><span class="identifier">Translator</span></code>
- has nonthrowing copy constructor (default), <span class="bold"><strong>strong</strong></span>
- - if <code class="computeroutput"><span class="identifier">Translator</span></code>
- has throwing copy constructor
+<div class="footnote"><p><sup>[<a id="ftn.geometry_index.r_tree.exception_safety.f0" href="#geometry_index.r_tree.exception_safety.f0" class="para">a</a>] </sup>
+ <span class="emphasis"><em>nothrow</em></span> - if allocators are equal, <span class="bold"><strong>strong</strong></span> - if allocators aren't equal
                   </p></div>
-<div id="ftn.geometry_index.r_tree.exception_safety.f2" class="footnote"><p>[c]
- <span class="emphasis"><em>nothrow</em></span> - if allocators are equal and <code class="computeroutput"><span class="identifier">Translator</span></code> has nonthrowing
- copy constructor (default), <span class="bold"><strong>strong</strong></span>
- - if allocators aren't equal or <code class="computeroutput"><span class="identifier">Translator</span></code>
- has throwing copy constructor
+<div class="footnote"><p><sup>[<a id="ftn.geometry_index.r_tree.exception_safety.f1" href="#geometry_index.r_tree.exception_safety.f1" class="para">b</a>] </sup>
+ <span class="emphasis"><em>nothrow</em></span> - if <code class="computeroutput"><span class="identifier">CoordinateType</span></code>
+ has nonthrowing copy ctor, <span class="bold"><strong>strong</strong></span>
+ - if <code class="computeroutput"><span class="identifier">CoordinateType</span></code>
+ has throwing copy ctor
                   </p></div>
 </td></tr></tbody>
 </table></div>

Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/introduction.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/introduction.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/introduction.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Introduction</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="../r_tree.html" title="R-tree">

Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Nearest neighbours queries</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="spatial_queries.html" title="Spatial queries">

Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/rtree_quickstart.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/rtree_quickstart.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/rtree_quickstart.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Quick Start</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="introduction.html" title="Introduction">
@@ -109,7 +109,7 @@
       </p>
 <h4>
 <a name="geometry_index.r_tree.rtree_quickstart.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.rtree_quickstart.more"></a></span><a class="link" href="rtree_quickstart.html#geometry_index.r_tree.rtree_quickstart.more">More</a>
+ <span><a name="geometry_index.r_tree.rtree_quickstart.more"></a></span><a class="link" href="rtree_quickstart.html#geometry_index.r_tree.rtree_quickstart.more">More</a>
       </h4>
 <p>
         More information about the R-tree implementation, other algorithms and queries

Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/spatial_queries.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/spatial_queries.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/spatial_queries.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Spatial queries</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="creation_and_modification.html" title="Creation and modification">

Modified: sandbox-branches/geometry/index_dev/doc/html/index.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/index.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/index.html 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Chapter&#160;1.&#160;Geometry Index</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="next" href="geometry_index/introduction.html" title="Introduction">
 </head>
@@ -56,7 +56,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: November 21, 2012 at 16:05:59 GMT</small></p></td>
+<td align="left"><p><small>Last revised: November 24, 2012 at 19:48:27 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox-branches/geometry/index_dev/doc/rtree/exception_safety.qbk
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/rtree/exception_safety.qbk (original)
+++ sandbox-branches/geometry/index_dev/doc/rtree/exception_safety.qbk 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -14,22 +14,22 @@
 
 * Nonthrowing destructor of the `__value__`.
 * Exception-safe copy constructor of the `__value__`.
-* Exception-safe copy constructor of the `CoordinateType`.
+* Exception-safe copy constructor of the `CoordinateType` used in the `Indexable`.
+* Nonthrowing copy constructor of the `Translator`.
 
 [table
 [[Operation] [exception-safety]]
-[[`rtree()`] [ /nothrow (default)/ or *strong*
-[footnote /nothrow/ - if `Translator` has nonthrowing copy constructor (default), *strong* - if `Translator` has throwing copy constructor]]]
+[[`rtree()`] [ /nothrow/ ]]
 [[`rtree(first, last)`] [ *strong* ]]
 [[`~rtree()`] [ /nothrow/ ]]
 [[][]]
 [[`rtree(rtree const&)`] [ *strong* ]]
 [[`operator=(rtree const&)`] [ *strong* ]]
 [[][]]
-[[`rtree(rtree &&)`] [ /nothrow (default)/ or *strong*
-[footnote /nothrow/ - if `Translator` has nonthrowing copy constructor (default), *strong* - if `Translator` has throwing copy constructor]]]
+[[`rtree(rtree &&)`] [ /nothrow/ ]]
 [[`operator=(rtree &&)`] [ /nothrow/ or *strong*
-[footnote /nothrow/ - if allocators are equal and `Translator` has nonthrowing copy constructor (default), *strong* - if allocators aren't equal or `Translator` has throwing copy constructor]]]
+[footnote /nothrow/ - if allocators are equal, *strong* - if allocators aren't equal]]]
+[[`swap(rtree &)`] [ /nothrow/ ]]
 [[][]]
 [[`insert(__value__)`] [ basic ]]
 [[`insert(first, last)`] [ basic ]]
@@ -42,7 +42,8 @@
 [[`size()`] [ /nothrow/ ]]
 [[`empty()`] [ /nothrow/ ]]
 [[`clear()`] [ /nothrow/ ]]
-[[`box()`] [ /nothrow/ ]]
+[[`box()`] [ /nothrow/ or *strong*
+[footnote /nothrow/ - if `CoordinateType` has nonthrowing copy ctor, *strong* - if `CoordinateType` has throwing copy ctor]]]
 [[`get_allocator()`] [ /nothrow/ ]]
 [[`parameters()`] [ /nothrow/ ]]
 [[`translator()`] [ /nothrow/ ]]

Modified: sandbox-branches/geometry/index_dev/test/rtree/test_rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/test/rtree/test_rtree.hpp (original)
+++ sandbox-branches/geometry/index_dev/test/rtree/test_rtree.hpp 2012-11-24 14:54:36 EST (Sat, 24 Nov 2012)
@@ -533,7 +533,7 @@
 // rtree copying and moving
 
 template <typename Value, typename Algo, typename Box>
-void test_copy_assignment_move(bgi::rtree<Value, Algo> const& tree, Box const& qbox)
+void test_copy_assignment_swap_move(bgi::rtree<Value, Algo> const& tree, Box const& qbox)
 {
     size_t s = tree.size();
 
@@ -560,25 +560,43 @@
     t1.spatial_query(qbox, std::back_inserter(output));
     test_exactly_the_same_outputs(t1, output, expected_output);
 
- // moving constructor
- bgi::rtree<Value, Algo> t2(boost::move(t1));
+ bgi::rtree<Value, Algo> t2(tree.parameters());
+ t2.swap(t1);
+ BOOST_CHECK(tree.empty() == t2.empty());
+ BOOST_CHECK(tree.size() == t2.size());
+ BOOST_CHECK(true == t1.empty());
+ BOOST_CHECK(0 == t1.size());
 
- BOOST_CHECK(t2.size() == s);
- BOOST_CHECK(t1.size() == 0);
+ output.clear();
+ t1.spatial_query(qbox, std::back_inserter(output));
+ BOOST_CHECK(output.empty());
 
     output.clear();
     t2.spatial_query(qbox, std::back_inserter(output));
     test_exactly_the_same_outputs(t2, output, expected_output);
+ t2.swap(t1);
+
+ // moving constructor
+ bgi::rtree<Value, Algo> t3(boost::move(t1));
+
+ BOOST_CHECK(t3.size() == s);
+ BOOST_CHECK(t1.size() == 0);
+
+ output.clear();
+ t3.spatial_query(qbox, std::back_inserter(output));
+ test_exactly_the_same_outputs(t3, output, expected_output);
 
     // moving assignment operator
- t1 = boost::move(t2);
+ t1 = boost::move(t3);
 
     BOOST_CHECK(t1.size() == s);
- BOOST_CHECK(t2.size() == 0);
+ BOOST_CHECK(t3.size() == 0);
 
     output.clear();
     t1.spatial_query(qbox, std::back_inserter(output));
     test_exactly_the_same_outputs(t1, output, expected_output);
+
+ //TODO - test SWAP
 }
 
 // rtree removing
@@ -634,7 +652,7 @@
     test_nearest_query_k(tree, input, pt, 10);
     test_nearest_query_not_found(tree, generate_outside_point<P>::apply(), 1, 3);
 
- test_copy_assignment_move(tree, qbox);
+ test_copy_assignment_swap_move(tree, qbox);
 
     test_remove(tree, qbox);
 
@@ -651,7 +669,7 @@
     test_nearest_query(empty_tree, empty_input, pt);
     test_nearest_query_k(empty_tree, empty_input, pt, 10);
     test_nearest_query_not_found(empty_tree, generate_outside_point<P>::apply(), 1, 3);
- test_copy_assignment_move(empty_tree, qbox);
+ test_copy_assignment_swap_move(empty_tree, qbox);
 }
 
 // run all tests for one Algorithm for some number of rtrees


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