From 7bbf242891b6d917bf055e411e2aa87c46ccd54b Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Tue, 20 Nov 2012 22:49:14 +0000 Subject: [PATCH] Improved exception safety of the r-tree. Requirement 'nonthrowing copy constructor of the BoundingObject/CoordinateType' changed to 'exception-safe copy constructor of the BoundingObject/CoordinateType'. From now the r-tree do not use erase() method of the elements containers. It uses copy_from_back() and pop_back() instead. erase() removed from pushable_array. Added various memory leaks fixes taking throwing by Element's copy constructor into account. Tests added. Docs modified. [SVN r81445] --- doc/html/geometry_index/introduction.html | 2 +- doc/html/geometry_index/r_tree.html | 2 +- .../r_tree/creation_and_modification.html | 6 +- .../r_tree/exception_safety.html | 26 +- .../geometry_index/r_tree/introduction.html | 2 +- .../r_tree/nearest_neighbours_queries.html | 2 +- .../r_tree/rtree_quickstart.html | 4 +- .../r_tree/spatial_queries.html | 2 +- doc/html/index.html | 4 +- doc/rtree/exception_safety.qbk | 3 +- .../extensions/index/pushable_array.hpp | 17 - .../extensions/index/rtree/node/node.hpp | 12 + .../rtree/quadratic/redistribute_elements.hpp | 15 +- .../extensions/index/rtree/rstar/insert.hpp | 97 +++--- .../extensions/index/rtree/visitors/copy.hpp | 15 +- .../index/rtree/visitors/insert.hpp | 26 +- .../index/rtree/visitors/remove.hpp | 50 ++- test/rtree/rtree_exceptions.cpp | 83 ++++- test/rtree/test_rtree.hpp | 18 +- test/rtree/test_rtree_exceptions.hpp | 125 ++----- test/rtree/test_throwing.hpp | 322 ++++++++++++++++++ tests/additional_speed.cpp | 4 +- 22 files changed, 610 insertions(+), 227 deletions(-) create mode 100644 test/rtree/test_throwing.hpp diff --git a/doc/html/geometry_index/introduction.html b/doc/html/geometry_index/introduction.html index dd8b1efc4..aea9c9dc7 100644 --- a/doc/html/geometry_index/introduction.html +++ b/doc/html/geometry_index/introduction.html @@ -3,7 +3,7 @@ Introduction - + diff --git a/doc/html/geometry_index/r_tree.html b/doc/html/geometry_index/r_tree.html index f204ae1ba..610c173c3 100644 --- a/doc/html/geometry_index/r_tree.html +++ b/doc/html/geometry_index/r_tree.html @@ -3,7 +3,7 @@ R-tree - + diff --git a/doc/html/geometry_index/r_tree/creation_and_modification.html b/doc/html/geometry_index/r_tree/creation_and_modification.html index 09a46b6b3..50c29f984 100644 --- a/doc/html/geometry_index/r_tree/creation_and_modification.html +++ b/doc/html/geometry_index/r_tree/creation_and_modification.html @@ -3,7 +3,7 @@ Creation and modification - + @@ -51,7 +51,7 @@

rtree<Value, Parameters, Translator, Allocator>
 
-