Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73829 - trunk/libs/unordered/doc
From: dnljms_at_[hidden]
Date: 2011-08-16 18:18:10


Author: danieljames
Date: 2011-08-16 18:18:09 EDT (Tue, 16 Aug 2011)
New Revision: 73829
URL: http://svn.boost.org/trac/boost/changeset/73829

Log:
Unordered: Document new changes and C++11 compliance.
Added:
   trunk/libs/unordered/doc/compliance.qbk (contents, props changed)
Text files modified:
   trunk/libs/unordered/doc/changes.qbk | 15 ++++++++++++++-
   trunk/libs/unordered/doc/unordered.qbk | 1 +
   2 files changed, 15 insertions(+), 1 deletions(-)

Modified: trunk/libs/unordered/doc/changes.qbk
==============================================================================
--- trunk/libs/unordered/doc/changes.qbk (original)
+++ trunk/libs/unordered/doc/changes.qbk 2011-08-16 18:18:09 EDT (Tue, 16 Aug 2011)
@@ -136,6 +136,19 @@
 
 [h2 Boost 1.48.0]
 
-* Use Boost.Move
+This is major change which has been converted to use Boost.Move's move
+emulation, and be more compliant with the C++11 standard. This has resulted
+in some breaking changes:
+
+* Equality comparison has been changed to the C++11 specification.
+ In a container with equivalent keys, elements in a group with equal
+ keys used to have to be in the same order to be considered equal,
+ now they can be a permutation of each other.
+
+* The behaviour of swap is different when the two containers to be
+ swapped has unequal allocators. It used to allocate new nodes using
+ the appropriate allocators, it now swaps the allocators if
+ the allocator has a member structure `propagate_on_container_swap`,
+ such that `propagate_on_container_swap::value` is true.
 
 [endsect]

Added: trunk/libs/unordered/doc/compliance.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/unordered/doc/compliance.qbk 2011-08-16 18:18:09 EDT (Tue, 16 Aug 2011)
@@ -0,0 +1,52 @@
+[/ Copyright 2011 Daniel James.
+ / Distributed under 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) ]
+
+[section:compliance C++11 Compliance]
+
+[section:allocator_compliance Use of allocators]
+
+* Objects are not constructed using the allocator. The node containing them
+ is constructed using the allocator's `construct` function, but then the
+ object is constructed in a buffer in that node by calling the constructor
+ directly.
+* Similarly the object is destructed by calling its destructor directly, and
+ then the allocator's `destroy` method is used to destruct the node.
+* For most compilers `select_on_container_copy` is only detected for an
+ exact signature match in the allocator itself - not in a base. There is full
+ detection for g++ 4.4 or laster, Visual C++ 2008 or later, Clang and maybe
+ other compilers which support SFINAE for expressions.
+* `pointer_traits` aren't used. Instead, pointer types are obtained from
+ rebound allocators.
+* /TODO/: Any other defficiences of `allocator_traits` emulation.
+* Pointers of base types are used to store the location of a derived type.
+ (/TODO/: I'm not sure if that isn't compliant).
+
+[endsect]
+
+[section:move Move emulation]
+
+Move emulation is implemented using Boost.Move. If rvalue references are
+available it will use them, but if not it uses a close, but imperfect emulation
+and to get the advantage of using movable container elements, you'll need to
+use Boost.Move.
+
+* Non-copyable objects can be stored in the containers, but without support
+ for rvalue references the container will not be movable.
+* The number of arguments used in emplace is limited to /TODO/.
+* Argument forwarding is not perfect.
+* /TODO/: Constructor call for pairs.
+
+[endsect]
+
+[section:other Other]
+
+* When swapping, `Pred` and `Hash` are not currently swapped by calling
+ `swap`, their copy constructors are used.
+* As a consequence when swapping an exception may be throw from their
+ copy constructor.
+
+
+[endsect]
+
+[endsect]
\ No newline at end of file

Modified: trunk/libs/unordered/doc/unordered.qbk
==============================================================================
--- trunk/libs/unordered/doc/unordered.qbk (original)
+++ trunk/libs/unordered/doc/unordered.qbk 2011-08-16 18:18:09 EDT (Tue, 16 Aug 2011)
@@ -31,6 +31,7 @@
 [include:unordered buckets.qbk]
 [include:unordered hash_equality.qbk]
 [include:unordered comparison.qbk]
+[include:unordered compliance.qbk]
 [include:unordered rationale.qbk]
 [include:unordered changes.qbk]
 [xinclude ref.xml]


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