Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78743 - in branches/release: boost boost/bimap boost/bimap/container_adaptor libs/bimap libs/bimap/doc/reference libs/bimap/test
From: matias.capeletto_at_[hidden]
Date: 2012-05-29 07:20:13


Author: matias
Date: 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
New Revision: 78743
URL: http://svn.boost.org/trac/boost/changeset/78743

Log:
[bimap] Merge to release (fix #6031)
Properties modified:
   branches/release/boost/bimap/ (props changed)
   branches/release/boost/bimap.hpp (props changed)
   branches/release/libs/bimap/ (props changed)
Text files modified:
   branches/release/boost/bimap/container_adaptor/list_map_adaptor.hpp | 1
   branches/release/boost/bimap/container_adaptor/map_adaptor.hpp | 1
   branches/release/boost/bimap/container_adaptor/multimap_adaptor.hpp | 1
   branches/release/boost/bimap/container_adaptor/unordered_map_adaptor.hpp | 1
   branches/release/boost/bimap/container_adaptor/unordered_multimap_adaptor.hpp | 1
   branches/release/boost/bimap/container_adaptor/vector_map_adaptor.hpp | 1
   branches/release/libs/bimap/doc/reference/list_of.qbk | 12 +++++++---
   branches/release/libs/bimap/doc/reference/set_of.qbk | 43 ++++++++++++++++++++-------------------
   branches/release/libs/bimap/doc/reference/unconstrained_set_of.qbk | 4 +-
   branches/release/libs/bimap/doc/reference/unordered_set_of.qbk | 41 ++++++++++++++++++++-----------------
   branches/release/libs/bimap/doc/reference/vector_of.qbk | 11 ++++++---
   branches/release/libs/bimap/test/test_bimap.hpp | 31 ++++++++++++++++++++++++++++
   branches/release/libs/bimap/test/test_bimap_sequenced.cpp | 3 ++
   13 files changed, 101 insertions(+), 50 deletions(-)

Modified: branches/release/boost/bimap/container_adaptor/list_map_adaptor.hpp
==============================================================================
--- branches/release/boost/bimap/container_adaptor/list_map_adaptor.hpp (original)
+++ branches/release/boost/bimap/container_adaptor/list_map_adaptor.hpp 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -134,6 +134,7 @@
 
     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::first_type key_type;
     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::second_type data_type;
+ typedef data_type mapped_type;
 
     protected:
 

Modified: branches/release/boost/bimap/container_adaptor/map_adaptor.hpp
==============================================================================
--- branches/release/boost/bimap/container_adaptor/map_adaptor.hpp (original)
+++ branches/release/boost/bimap/container_adaptor/map_adaptor.hpp 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -82,6 +82,7 @@
     public:
 
     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::second_type data_type;
+ typedef data_type mapped_type;
 
     // Access -----------------------------------------------------------------
 

Modified: branches/release/boost/bimap/container_adaptor/multimap_adaptor.hpp
==============================================================================
--- branches/release/boost/bimap/container_adaptor/multimap_adaptor.hpp (original)
+++ branches/release/boost/bimap/container_adaptor/multimap_adaptor.hpp 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -81,6 +81,7 @@
     public:
 
     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::second_type data_type;
+ typedef data_type mapped_type;
 
     // Access -----------------------------------------------------------------
 

Modified: branches/release/boost/bimap/container_adaptor/unordered_map_adaptor.hpp
==============================================================================
--- branches/release/boost/bimap/container_adaptor/unordered_map_adaptor.hpp (original)
+++ branches/release/boost/bimap/container_adaptor/unordered_map_adaptor.hpp 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -82,6 +82,7 @@
     public:
 
     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::second_type data_type;
+ typedef data_type mapped_type;
 
     // Access -----------------------------------------------------------------
 

Modified: branches/release/boost/bimap/container_adaptor/unordered_multimap_adaptor.hpp
==============================================================================
--- branches/release/boost/bimap/container_adaptor/unordered_multimap_adaptor.hpp (original)
+++ branches/release/boost/bimap/container_adaptor/unordered_multimap_adaptor.hpp 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -81,6 +81,7 @@
     public:
 
     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::second_type data_type;
+ typedef data_type mapped_type;
 
     // Access -----------------------------------------------------------------
 

Modified: branches/release/boost/bimap/container_adaptor/vector_map_adaptor.hpp
==============================================================================
--- branches/release/boost/bimap/container_adaptor/vector_map_adaptor.hpp (original)
+++ branches/release/boost/bimap/container_adaptor/vector_map_adaptor.hpp 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -77,6 +77,7 @@
 
     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::first_type key_type;
     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::second_type data_type;
+ typedef data_type mapped_type;
 
     // Access -----------------------------------------------------------------
 

Modified: branches/release/libs/bimap/doc/reference/list_of.qbk
==============================================================================
--- branches/release/libs/bimap/doc/reference/list_of.qbk (original)
+++ branches/release/libs/bimap/doc/reference/list_of.qbk 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -152,6 +152,10 @@
         // Only in map views
         // {
 
+ typedef ``['-unspecified-]`` key_type;
+ typedef ``['-unspecified-]`` mapped_type;
+ typedef ``['-unspecified-]`` mapped_type; // Equal to mapped_type
+
           template< class CompatibleKey >
           bool ``[link reference_list_of_replace_key_iterator_key replace_key]``(iterator position, const CompatibleKey & x);
 
@@ -228,14 +232,14 @@
 In the left map view:
 
     typedef Left key_type;
- typedef ... data_type;
+ typedef ... mapped_type;
 
     typedef signature-compatible with std::pair< Left, ... > value_type;
 
 In the right map view:
 
     typedef ... key_type;
- typedef Left data_type;
+ typedef Left mapped_type;
 
     typedef signature-compatible with std::pair< ... , Left > value_type;
 
@@ -459,7 +463,7 @@
     bool replace_data(iterator position, const CompatibleData & x);
 
 * [*Requires: ] `position` is a valid dereferenceable iterator of the set view.
-`CompatibleKey` can be assigned to `data_type`.
+`CompatibleKey` can be assigned to `mapped_type`.
 * [*Effects:] Assigns the value `x` to `e.second`, where `e` is the element pointed
 to by `position` into the `bimap` to which the set view belongs if replacing is allowed by
 all other views of the `bimap`.
@@ -498,7 +502,7 @@
     bool modify_data(iterator position, DataModifier mod);
 
 * [*Requires: ] `DataModifier` is a model of __SGI_UNARY_FUNCTION__ accepting arguments of
-type: `data_type&`; `position` is a valid dereferenceable iterator of the view.
+type: `mapped_type&`; `position` is a valid dereferenceable iterator of the view.
 * [*Effects:] Calls `mod(e.second)` where e is the element pointed to by position and
 rearranges `*position` into all the views of the `bimap`.
 If the rearrangement fails, the element is erased.

Modified: branches/release/libs/bimap/doc/reference/set_of.qbk
==============================================================================
--- branches/release/libs/bimap/doc/reference/set_of.qbk (original)
+++ branches/release/libs/bimap/doc/reference/set_of.qbk 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -105,7 +105,7 @@
         public:
 
         typedef ``['-unspecified-]`` key_type;
- typedef ``['-unspecified-]`` value_type;
+ typedef ``['-unspecified-]`` value_type;
         typedef ``['-unspecified-]`` key_compare;
         typedef ``['-unspecified-]`` value_compare;
         typedef ``['-unspecified-]`` allocator_type;
@@ -239,22 +239,23 @@
         std::pair<const_iterator,const_iterator> ``[link reference_set_of_range_lower_upper range]``(
             LowerBounder lower, UpperBounder upper) const;
 
- typedef ``['-unspecified-]`` data_type;
-
+ typedef ``['-unspecified-]`` mapped_type;
+ typedef ``['-unspecified-]`` data_type; // Equal to mapped_type
+
           // Only in for `set_of` collection type
           // {
 
           template< class CompatibleKey >
- const data_type & ``[link reference_set_of_at_key_const at]``(const CompatibleKey & k) const;
+ const mapped_type & ``[link reference_set_of_at_key_const at]``(const CompatibleKey & k) const;
 
             // Only if the other collection type is mutable
             // {
 
             template< class CompatibleKey >
- data_type & ``[link reference_set_of_operator_bracket_key operator\[\]]``(const CompatibleKey & k);
+ mapped_type & ``[link reference_set_of_operator_bracket_key operator\[\]]``(const CompatibleKey & k);
 
             template< class CompatibleKey >
- data_type & ``[link reference_set_of_at_key at]``(const CompatibleKey & k);
+ mapped_type & ``[link reference_set_of_at_key at]``(const CompatibleKey & k);
 
             // }
 
@@ -343,14 +344,14 @@
 In the left map view:
 
     typedef Left key_type;
- typedef ... data_type;
+ typedef ... mapped_type;
 
     typedef signature-compatible with std::pair< const Left, ... > value_type;
 
 In the right map view:
 
     typedef ... key_type;
- typedef Left data_type;
+ typedef Left mapped_type;
 
     typedef signature-compatible with std::pair< ... ,const Left > value_type;
 
@@ -541,7 +542,7 @@
     bool replace_data(iterator position, const CompatibleData & x);
 
 * [*Requires: ] `position` is a valid dereferenceable iterator of the set view.
-`CompatibleKey` can be assigned to `data_type`.
+`CompatibleKey` can be assigned to `mapped_type`.
 * [*Effects:] Assigns the value `x` to `e.second`, where `e` is the element pointed
 to by `position` into the `bimap` to which the set view belongs if,
     * the map view is non-unique OR no other element with equivalent key exists
@@ -584,7 +585,7 @@
     bool modify_data(iterator position, DataModifier mod);
 
 * [*Requires: ] `DataModifier` is a model of __SGI_UNARY_FUNCTION__ accepting arguments of
-type: `data_type&`; `position` is a valid dereferenceable iterator of the view.
+type: `mapped_type&`; `position` is a valid dereferenceable iterator of the view.
 * [*Effects:] Calls `mod(e.second)` where e is the element pointed to by position and
 rearranges `*position` into all the views of the `bimap`.
 If the rearrangement fails, the element is erased.
@@ -807,10 +808,10 @@
 [#reference_set_of_at_key_const]
 
     template< class CompatibleKey >
- const data_type & at(const CompatibleKey & k) const;
+ const mapped_type & at(const CompatibleKey & k) const;
 
 * [*Requires: ] `CompatibleKey` is a compatible key of `key_compare`.
-* [*Effects:] Returns the `data_type` reference that is associated with `k`, or
+* [*Effects:] Returns the `mapped_type` reference that is associated with `k`, or
 throws `std::out_of_range` if such key does not exist.
 * [*Complexity:] O(log(n)).
 * [*Note:] Only provided when `set_of` is used.
@@ -823,10 +824,10 @@
 [#reference_set_of_operator_bracket_key]
 
     template< class CompatibleKey >
- data_type & operator[](const CompatibleKey & k);
+ mapped_type & operator[](const CompatibleKey & k);
 
 * [*Requires: ] `CompatibleKey` is a compatible key of `key_compare`.
-* [*Effects: ] `return insert(value_type(k,data_type()))->second;`
+* [*Effects: ] `return insert(value_type(k,mapped_type()))->second;`
 * [*Complexity:] O(log(n)).
 * [*Note:] Only provided when `set_of` is used and the other collection
 type is mutable.
@@ -834,10 +835,10 @@
 [#reference_set_of_at_key]
 
     template< class CompatibleKey >
- data_type & at(const CompatibleKey & k);
+ mapped_type & at(const CompatibleKey & k);
 
 * [*Requires: ] `CompatibleKey` is a compatible key of `key_compare`.
-* [*Effects: ] Returns the `data_type` reference that is associated with `k`, or
+* [*Effects: ] Returns the `mapped_type` reference that is associated with `k`, or
 throws `std::out_of_range` if such key does not exist.
 * [*Complexity:] O(log(n)).
 * [*Note:] Only provided when `set_of` is used and the other collection
@@ -853,17 +854,17 @@
 automatically assigns a default value to non-existent keys referred to
 by `operator[]`.
 
- const data_type & operator[](const typename key_type & k) const;
+ const mapped_type & operator[](const typename key_type & k) const;
 
-* [*Effects:] Returns the `data_type` reference that is associated with `k`, or
+* [*Effects:] Returns the `mapped_type` reference that is associated with `k`, or
 throws `bimap::value_not_found` if such an element does not exist.
 * [*Complexity:] O(log(n)).
 
 
- ``['-unspecified data_type proxy-]`` operator[](const typename key_type & k);
+ ``['-unspecified mapped_type proxy-]`` operator[](const typename key_type & k);
 
-* [*Effects:] Returns a proxy to a `data_type` associated with `k` and the
-bimap. The proxy behaves as a reference to the `data_type` object. If this
+* [*Effects:] Returns a proxy to a `mapped_type` associated with `k` and the
+bimap. The proxy behaves as a reference to the `mapped_type` object. If this
 proxy is read and `k` was not in the bimap, the bimap::value_not_found is
 thrown. If it is written then `bimap::duplicate_value` is thrown if the
 assignment is not allowed by one of the other views of the `bimap`.

Modified: branches/release/libs/bimap/doc/reference/unconstrained_set_of.qbk
==============================================================================
--- branches/release/libs/bimap/doc/reference/unconstrained_set_of.qbk (original)
+++ branches/release/libs/bimap/doc/reference/unconstrained_set_of.qbk 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -63,14 +63,14 @@
 In the left map view:
 
     typedef Left key_type;
- typedef ... data_type;
+ typedef ... mapped_type;
 
     typedef signature-compatible with std::pair< Left, ... > value_type;
 
 In the right map view:
 
     typedef ... key_type;
- typedef Left data_type;
+ typedef Left mapped_type;
 
     typedef signature-compatible with std::pair< ... , Left > value_type;
 

Modified: branches/release/libs/bimap/doc/reference/unordered_set_of.qbk
==============================================================================
--- branches/release/libs/bimap/doc/reference/unordered_set_of.qbk (original)
+++ branches/release/libs/bimap/doc/reference/unordered_set_of.qbk 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -182,6 +182,9 @@
         // Only in map views
         // {
 
+ typedef ``['-unspecified-]`` mapped_type;
+ typedef ``['-unspecified-]`` data_type; // Equal to mapped_type
+
           template< class CompatibleKey >
           bool ``[link reference_unordered_set_of_replace_key_iterator_key replace_key]``(iterator position, const CompatibleKey & x);
 
@@ -246,22 +249,22 @@
         // Only in maps views
         // {
 
- typedef ``['-unspecified-]`` data_type;
+ typedef ``['-unspecified-]`` mapped_type;
 
           // Only in for `unordered_set_of` collection type
           // {
 
           template<class CompatibleKey>
- const data_type & ``[link reference_unordered_set_of_at_key_const at]``(const CompatibleKey & k) const;
+ const mapped_type & ``[link reference_unordered_set_of_at_key_const at]``(const CompatibleKey & k) const;
 
             // Only if the other collection type is mutable
             // {
 
             template<class CompatibleKey>
- data_type & ``[link reference_unordered_set_of_operator_bracket_key operator\[\]]``(const CompatibleKey & k);
+ mapped_type & ``[link reference_unordered_set_of_operator_bracket_key operator\[\]]``(const CompatibleKey & k);
 
             template<class CompatibleKey>
- data_type & ``[link reference_unordered_set_of_at_key at]``(const CompatibleKey & k);
+ mapped_type & ``[link reference_unordered_set_of_at_key at]``(const CompatibleKey & k);
 
             // }
 
@@ -296,14 +299,14 @@
 In the left map view:
 
     typedef Left key_type;
- typedef ... data_type;
+ typedef ... mapped_type;
 
     typedef signature-compatible with std::pair< const Left, ... > value_type;
 
 In the right map view:
 
     typedef ... key_type;
- typedef Left data_type;
+ typedef Left mapped_type;
 
     typedef signature-compatible with std::pair< ... ,const Left > value_type;
 
@@ -512,7 +515,7 @@
     bool replace_data(iterator position, const CompatibleData & x);
 
 * [*Requires: ] `position` is a valid dereferenceable iterator of the set view.
-`CompatibleKey` can be assigned to `data_type`.
+`CompatibleKey` can be assigned to `mapped_type`.
 * [*Effects:] Assigns the value `x` to `e.second`, where `e` is the element pointed
 to by `position` into the `bimap` to which the set view belongs if,
     * the map view is non-unique OR no other element with equivalent key exists
@@ -555,7 +558,7 @@
     bool modify_data(iterator position, DataModifier mod);
 
 * [*Requires: ] `DataModifier` is a model of __SGI_UNARY_FUNCTION__ accepting arguments of
-type: `data_type&`; `position` is a valid dereferenceable iterator of the view.
+type: `mapped_type&`; `position` is a valid dereferenceable iterator of the view.
 * [*Effects:] Calls `mod(e.second)` where e is the element pointed to by position and
 rearranges `*position` into all the views of the `bimap`.
 If the rearrangement fails, the element is erased.
@@ -682,10 +685,10 @@
 [#reference_unordered_set_of_at_key_const]
 
     template< class CompatibleKey >
- const data_type & at(const CompatibleKey & k) const;
+ const mapped_type & at(const CompatibleKey & k) const;
 
 * [*Requires: ] `CompatibleKey` is a compatible key of `key_compare`.
-* [*Effects:] Returns the `data_type` reference that is associated with `k`, or
+* [*Effects:] Returns the `mapped_type` reference that is associated with `k`, or
 throws `std::out_of_range` if such key does not exist.
 * [*Complexity:] Average case O(1) (constant), worst case O(n).
 * [*Note:] Only provided when `unordered_set_of` is used.
@@ -699,10 +702,10 @@
 [#reference_unordered_set_of_operator_bracket_key]
 
     template< class CompatibleKey >
- data_type & operator[](const CompatibleKey & k);
+ mapped_type & operator[](const CompatibleKey & k);
 
 * [*Requires: ] `CompatibleKey` is a compatible key of `key_compare`.
-* [*Effects: ] `return insert(value_type(k,data_type()))->second;`
+* [*Effects: ] `return insert(value_type(k,mapped_type()))->second;`
 * [*Complexity:] If the insertion is performed O(I(n)), else: Average case
 O(1) (constant), worst case O(n).
 * [*Note:] Only provided when `unordered_set_of` is used and the other collection
@@ -712,10 +715,10 @@
 [#reference_unordered_set_of_at_key]
 
     template< class CompatibleKey >
- data_type & at(const CompatibleKey & k);
+ mapped_type & at(const CompatibleKey & k);
 
 * [*Requires: ] `CompatibleKey` is a compatible key of `key_compare`.
-* [*Effects: ] Returns the `data_type` reference that is associated with `k`, or
+* [*Effects: ] Returns the `mapped_type` reference that is associated with `k`, or
 throws `std::out_of_range` if such key does not exist.
 * [*Complexity:] Average case O(1) (constant), worst case O(n).
 * [*Note:] Only provided when `unordered_set_of` is used and the other collection
@@ -731,17 +734,17 @@
 a non-existent key: this behavior differs from that of std::map, which automatically
 assigns a default value to non-existent keys referred to by `operator[]`.
 
- const data_type & operator[](const typename key_type & k) const;
+ const mapped_type & operator[](const typename key_type & k) const;
 
-* [*Effects:] Returns the `data_type` reference that is associated with `k`, or
+* [*Effects:] Returns the `mapped_type` reference that is associated with `k`, or
 throws `bimap::value_not_found` if such an element does not exist.
 * [*Complexity:] O(log(n)).
 
 
- ``['-unspecified data_type proxy-]`` operator[](const typename key_type & k);
+ ``['-unspecified mapped_type proxy-]`` operator[](const typename key_type & k);
 
-* [*Effects:] Returns a proxy to a `data_type` associated with `k` and the
-bimap. The proxy behaves as a reference to the `data_type` object. If this
+* [*Effects:] Returns a proxy to a `mapped_type` associated with `k` and the
+bimap. The proxy behaves as a reference to the `mapped_type` object. If this
 proxy is read and `k` was not in the bimap, the bimap::value_not_found is
 thrown. If it is written then `bimap::duplicate_value` is thrown if the
 assignment is not allowed by one of the other views of the `bimap`.

Modified: branches/release/libs/bimap/doc/reference/vector_of.qbk
==============================================================================
--- branches/release/libs/bimap/doc/reference/vector_of.qbk (original)
+++ branches/release/libs/bimap/doc/reference/vector_of.qbk 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -163,6 +163,9 @@
 
         // Only in map views
         // {
+ typedef ``['-unspecified-]`` key_type;
+ typedef ``['-unspecified-]`` mapped_type;
+ typedef ``['-unspecified-]`` data_type; // Equal to mapped_type
 
           template< class CompatibleKey >
           bool ``[link reference_vector_of_replace_key_iterator_key replace_key]``(iterator position, const CompatibleKey & x);
@@ -241,14 +244,14 @@
 In the left map view:
 
     typedef Left key_type;
- typedef ... data_type;
+ typedef ... mapped_type;
 
     typedef signature-compatible with std::pair< Left, ... > value_type;
 
 In the right map view:
 
     typedef ... key_type;
- typedef Left data_type;
+ typedef Left mapped_type;
 
     typedef signature-compatible with std::pair< ... , Left > value_type;
 
@@ -505,7 +508,7 @@
     bool replace_data(iterator position, const CompatibleData & x);
 
 * [*Requires: ] `position` is a valid dereferenceable iterator of the set view.
-`CompatibleKey` can be assigned to `data_type`.
+`CompatibleKey` can be assigned to `mapped_type`.
 * [*Effects:] Assigns the value `x` to `e.second`, where `e` is the element pointed
 to by `position` into the `bimap` to which the set view belongs if replacing is allowed by
 all other views of the `bimap`.
@@ -544,7 +547,7 @@
     bool modify_data(iterator position, DataModifier mod);
 
 * [*Requires: ] `DataModifier` is a model of __SGI_UNARY_FUNCTION__ accepting arguments of
-type: `data_type&`; `position` is a valid dereferenceable iterator of the view.
+type: `mapped_type&`; `position` is a valid dereferenceable iterator of the view.
 * [*Effects:] Calls `mod(e.second)` where e is the element pointed to by position and
 rearranges `*position` into all the views of the `bimap`.
 If the rearrangement fails, the element is erased.

Modified: branches/release/libs/bimap/test/test_bimap.hpp
==============================================================================
--- branches/release/libs/bimap/test/test_bimap.hpp (original)
+++ branches/release/libs/bimap/test/test_bimap.hpp 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -20,6 +20,8 @@
 #include <algorithm>
 
 #include <boost/lambda/lambda.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_same.hpp>
 
 template< class Container, class Data >
 void test_container(Container & c, const Data & d)
@@ -134,9 +136,38 @@
 }
 
 
+template< class Container >
+void test_mapped_container(Container &)
+{
+ typedef BOOST_DEDUCED_TYPENAME Container:: value_type value_type ;
+ typedef BOOST_DEDUCED_TYPENAME Container:: key_type key_type ;
+ typedef BOOST_DEDUCED_TYPENAME Container:: data_type data_type ;
+ typedef BOOST_DEDUCED_TYPENAME Container::mapped_type mapped_type ;
+
+ typedef BOOST_DEDUCED_TYPENAME
+ boost::is_same< key_type
+ , BOOST_DEDUCED_TYPENAME value_type::first_type
+ >::type test_key_type;
+ BOOST_STATIC_ASSERT(test_key_type::value);
+
+ typedef BOOST_DEDUCED_TYPENAME
+ boost::is_same< data_type
+ , BOOST_DEDUCED_TYPENAME value_type::second_type
+ >::type test_data_type;
+ BOOST_STATIC_ASSERT(test_data_type::value);
+
+ typedef BOOST_DEDUCED_TYPENAME
+ boost::is_same< mapped_type
+ , BOOST_DEDUCED_TYPENAME value_type::second_type
+ >::type test_mapped_type;
+ BOOST_STATIC_ASSERT(test_mapped_type::value);
+}
+
 template< class Container, class Data >
 void test_pair_associative_container(Container & c, const Data & d)
 {
+ test_mapped_container(c);
+
     assert( d.size() > 2 );
 
     c.clear();

Modified: branches/release/libs/bimap/test/test_bimap_sequenced.cpp
==============================================================================
--- branches/release/libs/bimap/test/test_bimap_sequenced.cpp (original)
+++ branches/release/libs/bimap/test/test_bimap_sequenced.cpp 2012-05-29 07:20:11 EDT (Tue, 29 May 2012)
@@ -81,6 +81,9 @@
         test_sequence_container(b.left , left_data);
         test_sequence_container(b.right,right_data);
 
+ test_mapped_container(b.left );
+ test_mapped_container(b.right);
+
         bm_type c;
 
         // Test assign


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