diff --git a/doc/changes.qbk b/doc/changes.qbk index 9ae2f989..58a16854 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -136,6 +136,19 @@ First official release. [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] diff --git a/doc/compliance.qbk b/doc/compliance.qbk new file mode 100644 index 00000000..6158c977 --- /dev/null +++ b/doc/compliance.qbk @@ -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 diff --git a/doc/unordered.qbk b/doc/unordered.qbk index fb3837f4..431518ed 100644 --- a/doc/unordered.qbk +++ b/doc/unordered.qbk @@ -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]