summaryrefslogtreecommitdiff
path: root/boost/bimap
diff options
context:
space:
mode:
Diffstat (limited to 'boost/bimap')
-rw-r--r--boost/bimap/bimap.hpp55
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/container_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/detail/comparison_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/detail/functor_bag.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/detail/identity_converters.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/detail/key_extractor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/detail/non_unique_container_helper.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/list_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/multiset_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/ordered_associative_container_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/set_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/support/iterator_facade_converters.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/unordered_associative_container_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/unordered_multiset_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/container_adaptor/unordered_set_adaptor.hpp0
-rw-r--r--boost/bimap/container_adaptor/vector_adaptor.hpp16
-rw-r--r--boost/bimap/detail/bimap_core.hpp45
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/concept_tags.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/debug/static_error.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/generate_index_binder.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/generate_relation_binder.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/generate_view_binder.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/is_set_type_of.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/manage_additional_parameters.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/manage_bimap_key.hpp0
-rw-r--r--boost/bimap/detail/map_view_base.hpp63
-rw-r--r--boost/bimap/detail/map_view_iterator.hpp327
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/modifier_adaptor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/non_unique_views_helper.hpp0
-rw-r--r--boost/bimap/detail/set_view_base.hpp4
-rw-r--r--boost/bimap/detail/set_view_iterator.hpp8
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/test/check_metadata.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/detail/user_interface_config.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/detail/access_builder.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/detail/metadata_access_builder.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/detail/static_access_builder.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/detail/to_mutable_relation_functor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/member_at.hpp0
-rw-r--r--boost/bimap/relation/mutant_relation.hpp50
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/pair_layout.hpp0
-rw-r--r--boost/bimap/relation/structured_pair.hpp44
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/support/get.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/support/get_pair_functor.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/support/is_tag_of_member_at.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/support/member_with_tag.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/support/opposite_tag.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/support/pair_by.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/support/pair_type_by.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/support/value_type_of.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/relation/symmetrical_base.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/support/data_type_by.hpp0
-rw-r--r--boost/bimap/support/iterator_type_by.hpp122
-rwxr-xr-x[-rw-r--r--]boost/bimap/support/key_type_by.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/support/lambda.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/support/map_by.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/support/map_type_by.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/support/value_type_by.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/tags/support/apply_to_value_type.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/tags/support/default_tagged.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/tags/support/is_tagged.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/tags/support/overwrite_tagged.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/tags/support/tag_of.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/tags/support/value_type_of.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/tags/tagged.hpp0
-rw-r--r--boost/bimap/views/list_map_view.hpp25
-rw-r--r--boost/bimap/views/map_view.hpp4
-rw-r--r--boost/bimap/views/multimap_view.hpp4
-rwxr-xr-x[-rw-r--r--]boost/bimap/views/multiset_view.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/views/set_view.hpp0
-rw-r--r--boost/bimap/views/unconstrained_map_view.hpp2
-rw-r--r--boost/bimap/views/unordered_map_view.hpp4
-rw-r--r--boost/bimap/views/unordered_multimap_view.hpp4
-rwxr-xr-x[-rw-r--r--]boost/bimap/views/unordered_multiset_view.hpp0
-rwxr-xr-x[-rw-r--r--]boost/bimap/views/unordered_set_view.hpp0
-rw-r--r--boost/bimap/views/vector_map_view.hpp40
-rw-r--r--boost/bimap/views/vector_set_view.hpp34
76 files changed, 511 insertions, 340 deletions
diff --git a/boost/bimap/bimap.hpp b/boost/bimap/bimap.hpp
index 3021b04ff0..2929ce58e4 100644
--- a/boost/bimap/bimap.hpp
+++ b/boost/bimap/bimap.hpp
@@ -166,28 +166,37 @@ class bimap
/*
// The rest is computed in the core, because it is quite difficult to
// expose a nice interface with so many metaprogramming stuff.
- // Here it is the complete metadat list.
-
+
// Map by {side} metadata
typedef -unspecified- {side}_tag;
typedef -unspecified- {side}_data_type;
typedef -unspecified- {side}_value_type;
typedef -unspecified- {side}_key_type;
- typedef -unspecified- {side}_iterator;
- typedef -unspecified- {side}_const_iterator;
-
+
+ // There are other typedefs for definitions of different map views
+
------------------------------------------------------------------*/
typedef BOOST_DEDUCED_TYPENAME ::boost::bimaps::detail::
left_map_view_type<base_>::type left_map;
typedef BOOST_DEDUCED_TYPENAME ::boost::bimaps::detail::
right_map_view_type<base_>::type right_map;
+
+ typedef BOOST_DEDUCED_TYPENAME
+ left_map::iterator left_iterator;
+ typedef BOOST_DEDUCED_TYPENAME
+ left_map::const_iterator left_const_iterator;
+
+ typedef BOOST_DEDUCED_TYPENAME
+ right_map::iterator right_iterator;
+ typedef BOOST_DEDUCED_TYPENAME
+ right_map::const_iterator right_const_iterator;
typedef BOOST_DEDUCED_TYPENAME
- left_map::reference left_reference;
+ left_map::reference left_reference;
typedef BOOST_DEDUCED_TYPENAME
- left_map::const_reference left_const_reference;
+ left_map::const_reference left_const_reference;
typedef BOOST_DEDUCED_TYPENAME
right_map::reference right_reference;
@@ -239,16 +248,19 @@ class bimap
const allocator_type& al = allocator_type()) :
base_::relation_set(
- ::boost::multi_index::get<logic_relation_set_tag>(core)
+ ::boost::multi_index::get<
+ BOOST_DEDUCED_TYPENAME base_::logic_relation_set_tag>(core)
),
core(first,last,ctor_args_list(),al),
left (
- ::boost::multi_index::get<logic_left_tag>(core)
+ ::boost::multi_index::get<
+ BOOST_DEDUCED_TYPENAME base_::logic_left_tag>(core)
),
right (
- ::boost::multi_index::get<logic_right_tag>(core)
+ ::boost::multi_index::get<
+ BOOST_DEDUCED_TYPENAME base_::logic_right_tag>(core)
)
{}
@@ -256,16 +268,19 @@ class bimap
bimap(const bimap& x) :
base_::relation_set(
- ::boost::multi_index::get<logic_relation_set_tag>(core)
+ ::boost::multi_index::get<
+ BOOST_DEDUCED_TYPENAME base_::logic_relation_set_tag>(core)
),
core(x.core),
left (
- ::boost::multi_index::get<logic_left_tag>(core)
+ ::boost::multi_index::get<
+ BOOST_DEDUCED_TYPENAME base_::logic_left_tag>(core)
),
right (
- ::boost::multi_index::get<logic_right_tag>(core)
+ ::boost::multi_index::get<
+ BOOST_DEDUCED_TYPENAME base_::logic_right_tag>(core)
)
{}
@@ -279,32 +294,28 @@ class bimap
// Projection of iterators
template< class IteratorType >
- BOOST_DEDUCED_TYPENAME base_::left_iterator
- project_left(IteratorType iter)
+ left_iterator project_left(IteratorType iter)
{
return core.template project<
BOOST_DEDUCED_TYPENAME base_::logic_left_tag>(iter.base());
}
template< class IteratorType >
- BOOST_DEDUCED_TYPENAME base_::left_const_iterator
- project_left(IteratorType iter) const
+ left_const_iterator project_left(IteratorType iter) const
{
return core.template project<
BOOST_DEDUCED_TYPENAME base_::logic_left_tag>(iter.base());
}
template< class IteratorType >
- BOOST_DEDUCED_TYPENAME base_::right_iterator
- project_right(IteratorType iter)
+ right_iterator project_right(IteratorType iter)
{
return core.template project<
BOOST_DEDUCED_TYPENAME base_::logic_right_tag>(iter.base());
}
template< class IteratorType >
- BOOST_DEDUCED_TYPENAME base_::right_const_iterator
- project_right(IteratorType iter) const
+ right_const_iterator project_right(IteratorType iter) const
{
return core.template project<
BOOST_DEDUCED_TYPENAME base_::logic_right_tag>(iter.base());
@@ -382,7 +393,7 @@ class bimap
friend class boost::serialization::access;
template<class Archive>
- void serialize(Archive & ar, const unsigned int version)
+ void serialize(Archive & ar, const unsigned int)
{
ar & serialization::make_nvp("mi_core",core);
}
diff --git a/boost/bimap/container_adaptor/container_adaptor.hpp b/boost/bimap/container_adaptor/container_adaptor.hpp
index 8e78090a9b..8e78090a9b 100644..100755
--- a/boost/bimap/container_adaptor/container_adaptor.hpp
+++ b/boost/bimap/container_adaptor/container_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/detail/comparison_adaptor.hpp b/boost/bimap/container_adaptor/detail/comparison_adaptor.hpp
index 9051a461af..9051a461af 100644..100755
--- a/boost/bimap/container_adaptor/detail/comparison_adaptor.hpp
+++ b/boost/bimap/container_adaptor/detail/comparison_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/detail/functor_bag.hpp b/boost/bimap/container_adaptor/detail/functor_bag.hpp
index fd8c435e03..fd8c435e03 100644..100755
--- a/boost/bimap/container_adaptor/detail/functor_bag.hpp
+++ b/boost/bimap/container_adaptor/detail/functor_bag.hpp
diff --git a/boost/bimap/container_adaptor/detail/identity_converters.hpp b/boost/bimap/container_adaptor/detail/identity_converters.hpp
index f6f5864122..f6f5864122 100644..100755
--- a/boost/bimap/container_adaptor/detail/identity_converters.hpp
+++ b/boost/bimap/container_adaptor/detail/identity_converters.hpp
diff --git a/boost/bimap/container_adaptor/detail/key_extractor.hpp b/boost/bimap/container_adaptor/detail/key_extractor.hpp
index 3835b7c43e..3835b7c43e 100644..100755
--- a/boost/bimap/container_adaptor/detail/key_extractor.hpp
+++ b/boost/bimap/container_adaptor/detail/key_extractor.hpp
diff --git a/boost/bimap/container_adaptor/detail/non_unique_container_helper.hpp b/boost/bimap/container_adaptor/detail/non_unique_container_helper.hpp
index 695704535a..695704535a 100644..100755
--- a/boost/bimap/container_adaptor/detail/non_unique_container_helper.hpp
+++ b/boost/bimap/container_adaptor/detail/non_unique_container_helper.hpp
diff --git a/boost/bimap/container_adaptor/list_adaptor.hpp b/boost/bimap/container_adaptor/list_adaptor.hpp
index 310e2b4630..310e2b4630 100644..100755
--- a/boost/bimap/container_adaptor/list_adaptor.hpp
+++ b/boost/bimap/container_adaptor/list_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/multiset_adaptor.hpp b/boost/bimap/container_adaptor/multiset_adaptor.hpp
index fe89d9a99d..fe89d9a99d 100644..100755
--- a/boost/bimap/container_adaptor/multiset_adaptor.hpp
+++ b/boost/bimap/container_adaptor/multiset_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/ordered_associative_container_adaptor.hpp b/boost/bimap/container_adaptor/ordered_associative_container_adaptor.hpp
index 6278844323..6278844323 100644..100755
--- a/boost/bimap/container_adaptor/ordered_associative_container_adaptor.hpp
+++ b/boost/bimap/container_adaptor/ordered_associative_container_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/set_adaptor.hpp b/boost/bimap/container_adaptor/set_adaptor.hpp
index 6c8dbf3820..6c8dbf3820 100644..100755
--- a/boost/bimap/container_adaptor/set_adaptor.hpp
+++ b/boost/bimap/container_adaptor/set_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/support/iterator_facade_converters.hpp b/boost/bimap/container_adaptor/support/iterator_facade_converters.hpp
index 4bde159df0..4bde159df0 100644..100755
--- a/boost/bimap/container_adaptor/support/iterator_facade_converters.hpp
+++ b/boost/bimap/container_adaptor/support/iterator_facade_converters.hpp
diff --git a/boost/bimap/container_adaptor/unordered_associative_container_adaptor.hpp b/boost/bimap/container_adaptor/unordered_associative_container_adaptor.hpp
index 937a0d8765..937a0d8765 100644..100755
--- a/boost/bimap/container_adaptor/unordered_associative_container_adaptor.hpp
+++ b/boost/bimap/container_adaptor/unordered_associative_container_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/unordered_multiset_adaptor.hpp b/boost/bimap/container_adaptor/unordered_multiset_adaptor.hpp
index 1d8e4c980f..1d8e4c980f 100644..100755
--- a/boost/bimap/container_adaptor/unordered_multiset_adaptor.hpp
+++ b/boost/bimap/container_adaptor/unordered_multiset_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/unordered_set_adaptor.hpp b/boost/bimap/container_adaptor/unordered_set_adaptor.hpp
index cf00b0f507..cf00b0f507 100644..100755
--- a/boost/bimap/container_adaptor/unordered_set_adaptor.hpp
+++ b/boost/bimap/container_adaptor/unordered_set_adaptor.hpp
diff --git a/boost/bimap/container_adaptor/vector_adaptor.hpp b/boost/bimap/container_adaptor/vector_adaptor.hpp
index de6e391c9f..87d41726e8 100644
--- a/boost/bimap/container_adaptor/vector_adaptor.hpp
+++ b/boost/bimap/container_adaptor/vector_adaptor.hpp
@@ -109,25 +109,33 @@ class vector_adaptor :
BOOST_DEDUCED_TYPENAME base_::const_reference
operator[](BOOST_DEDUCED_TYPENAME base_::size_type n) const
{
- return this->base().operator[](n);
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ this->base().operator[](n)
+ );
}
BOOST_DEDUCED_TYPENAME base_::const_reference
at(BOOST_DEDUCED_TYPENAME base_::size_type n) const
{
- return this->base().at(n);
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ this->base().at(n)
+ );
}
BOOST_DEDUCED_TYPENAME base_::reference
operator[](BOOST_DEDUCED_TYPENAME base_::size_type n)
{
- return this->base().operator[](n);
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ this->base().operator[](n)
+ );
}
BOOST_DEDUCED_TYPENAME base_::reference
at(BOOST_DEDUCED_TYPENAME base_::size_type n)
{
- return this->base().at(n);
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ this->base().at(n)
+ );
}
};
diff --git a/boost/bimap/detail/bimap_core.hpp b/boost/bimap/detail/bimap_core.hpp
index f37d968105..28a91a4631 100644
--- a/boost/bimap/detail/bimap_core.hpp
+++ b/boost/bimap/detail/bimap_core.hpp
@@ -425,50 +425,6 @@ class bimap_core
typedef BOOST_DEDUCED_TYPENAME right_index::iterator right_core_iterator;
typedef BOOST_DEDUCED_TYPENAME right_index::const_iterator right_core_const_iterator;
- // Map by {side} iterator metadata
- // --------------------------------------------------------------------
- public:
-
- //@{
-
- typedef ::boost::bimaps::detail::map_view_iterator
- <
- left_tag,
- relation,
- left_core_iterator
-
- > left_iterator;
-
- typedef ::boost::bimaps::detail::map_view_iterator
- <
- right_tag,
- relation,
- right_core_iterator
-
- > right_iterator;
-
- //@}
-
- //@{
-
- typedef ::boost::bimaps::detail::const_map_view_iterator
- <
- left_tag,
- relation,
- left_core_const_iterator
-
- > left_const_iterator;
-
- typedef ::boost::bimaps::detail::const_map_view_iterator
- <
- right_tag,
- relation,
- right_core_const_iterator
-
- > right_const_iterator;
-
- //@}
-
// Relation set view
typedef BOOST_DEDUCED_TYPENAME ::boost::multi_index::index
@@ -513,6 +469,7 @@ struct right_map_view_type
>::type type;
};
+
} // namespace detail
} // namespace bimaps
} // namespace boost
diff --git a/boost/bimap/detail/concept_tags.hpp b/boost/bimap/detail/concept_tags.hpp
index 1f252e3092..1f252e3092 100644..100755
--- a/boost/bimap/detail/concept_tags.hpp
+++ b/boost/bimap/detail/concept_tags.hpp
diff --git a/boost/bimap/detail/debug/static_error.hpp b/boost/bimap/detail/debug/static_error.hpp
index 3a8ed632ae..3a8ed632ae 100644..100755
--- a/boost/bimap/detail/debug/static_error.hpp
+++ b/boost/bimap/detail/debug/static_error.hpp
diff --git a/boost/bimap/detail/generate_index_binder.hpp b/boost/bimap/detail/generate_index_binder.hpp
index 01c899d4d8..01c899d4d8 100644..100755
--- a/boost/bimap/detail/generate_index_binder.hpp
+++ b/boost/bimap/detail/generate_index_binder.hpp
diff --git a/boost/bimap/detail/generate_relation_binder.hpp b/boost/bimap/detail/generate_relation_binder.hpp
index 0ff47621bd..0ff47621bd 100644..100755
--- a/boost/bimap/detail/generate_relation_binder.hpp
+++ b/boost/bimap/detail/generate_relation_binder.hpp
diff --git a/boost/bimap/detail/generate_view_binder.hpp b/boost/bimap/detail/generate_view_binder.hpp
index 925184cff7..925184cff7 100644..100755
--- a/boost/bimap/detail/generate_view_binder.hpp
+++ b/boost/bimap/detail/generate_view_binder.hpp
diff --git a/boost/bimap/detail/is_set_type_of.hpp b/boost/bimap/detail/is_set_type_of.hpp
index 13d52c1d04..13d52c1d04 100644..100755
--- a/boost/bimap/detail/is_set_type_of.hpp
+++ b/boost/bimap/detail/is_set_type_of.hpp
diff --git a/boost/bimap/detail/manage_additional_parameters.hpp b/boost/bimap/detail/manage_additional_parameters.hpp
index 3d22d730e7..3d22d730e7 100644..100755
--- a/boost/bimap/detail/manage_additional_parameters.hpp
+++ b/boost/bimap/detail/manage_additional_parameters.hpp
diff --git a/boost/bimap/detail/manage_bimap_key.hpp b/boost/bimap/detail/manage_bimap_key.hpp
index d485e50aee..d485e50aee 100644..100755
--- a/boost/bimap/detail/manage_bimap_key.hpp
+++ b/boost/bimap/detail/manage_bimap_key.hpp
diff --git a/boost/bimap/detail/map_view_base.hpp b/boost/bimap/detail/map_view_base.hpp
index 7900901bfb..51059c38c4 100644
--- a/boost/bimap/detail/map_view_base.hpp
+++ b/boost/bimap/detail/map_view_base.hpp
@@ -31,12 +31,13 @@
#include <boost/bimap/relation/support/data_extractor.hpp>
#include <boost/bimap/relation/support/opposite_tag.hpp>
#include <boost/bimap/relation/support/pair_type_by.hpp>
-#include <boost/bimap/support/iterator_type_by.hpp>
+//#include <boost/bimap/support/iterator_type_by.hpp>
#include <boost/bimap/support/key_type_by.hpp>
#include <boost/bimap/support/data_type_by.hpp>
#include <boost/bimap/support/value_type_by.hpp>
#include <boost/bimap/detail/modifier_adaptor.hpp>
#include <boost/bimap/detail/debug/static_error.hpp>
+#include <boost/bimap/detail/map_view_iterator.hpp>
namespace boost {
namespace bimaps {
@@ -47,27 +48,20 @@ namespace detail {
// The next macro can be converted in a metafunctor to gain code robustness.
/*===========================================================================*/
#define BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR( \
- CONTAINER_ADAPTOR, TAG,BIMAP, OTHER_ITER, CONST_OTHER_ITER \
+ CONTAINER_ADAPTOR, TAG, BIMAP, OTHER_ITER, CONST_OTHER_ITER \
) \
::boost::bimaps::container_adaptor::CONTAINER_ADAPTOR \
< \
BOOST_DEDUCED_TYPENAME BIMAP::core_type:: \
BOOST_NESTED_TEMPLATE index<TAG>::type, \
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support:: \
- iterator_type_by<TAG,BIMAP>::type, \
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support:: \
- const_iterator_type_by<TAG,BIMAP>::type, \
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support:: \
- OTHER_ITER<TAG,BIMAP>::type, \
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support:: \
- CONST_OTHER_ITER<TAG,BIMAP>::type, \
+ ::boost::bimaps::detail:: map_view_iterator<TAG,BIMAP>, \
+ ::boost::bimaps::detail::const_map_view_iterator<TAG,BIMAP>, \
+ ::boost::bimaps::detail:: OTHER_ITER<TAG,BIMAP>, \
+ ::boost::bimaps::detail::CONST_OTHER_ITER<TAG,BIMAP>, \
::boost::bimaps::container_adaptor::support::iterator_facade_to_base \
< \
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support:: \
- iterator_type_by<TAG,BIMAP>::type, \
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support:: \
- const_iterator_type_by<TAG,BIMAP>::type \
- \
+ ::boost::bimaps::detail:: map_view_iterator<TAG,BIMAP>, \
+ ::boost::bimaps::detail::const_map_view_iterator<TAG,BIMAP> \
>, \
::boost::mpl::na, \
::boost::mpl::na, \
@@ -102,13 +96,8 @@ class map_view_base
{
typedef ::boost::bimaps::container_adaptor::support::
iterator_facade_to_base<
-
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- iterator_type_by<Tag,BimapType>::type,
-
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- const_iterator_type_by<Tag,BimapType>::type
-
+ ::boost::bimaps::detail:: map_view_iterator<Tag,BimapType>,
+ ::boost::bimaps::detail::const_map_view_iterator<Tag,BimapType>
> iterator_to_base_;
typedef ::boost::bimaps::relation::detail::
@@ -125,8 +114,8 @@ class map_view_base
pair_type_by<Tag,
BOOST_DEDUCED_TYPENAME BimapType::relation>::type value_type_;
- typedef BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- iterator_type_by<Tag,BimapType>::type iterator_;
+ typedef
+ ::boost::bimaps::detail::map_view_iterator<Tag,BimapType> iterator_;
public:
@@ -144,7 +133,8 @@ class map_view_base
return derived().base().replace(
derived().template functor<iterator_to_base_>()(position),
derived().template functor<value_to_base_>()(
- value_type_(k,position->second)
+ ::boost::bimaps::relation::detail::
+ copy_with_first_replaced(*position,k)
)
);
}
@@ -155,7 +145,8 @@ class map_view_base
return derived().base().replace(
derived().template functor<iterator_to_base_>()(position),
derived().template functor<value_to_base_>()(
- value_type_(position->first,d)
+ ::boost::bimaps::relation::detail::
+ copy_with_second_replaced(*position,d)
)
);
}
@@ -263,8 +254,8 @@ class mutable_data_unique_map_view_access
template< class CompatibleKey >
data_type_ & at(const CompatibleKey& k)
{
- typedef BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- iterator_type_by<Tag,BimapType>::type iterator;
+ typedef ::boost::bimaps::detail::
+ map_view_iterator<Tag,BimapType> iterator;
iterator iter = derived().find(k);
if( iter == derived().end() )
@@ -279,8 +270,8 @@ class mutable_data_unique_map_view_access
template< class CompatibleKey >
const data_type_ & at(const CompatibleKey& k) const
{
- typedef BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- const_iterator_type_by<Tag,BimapType>::type const_iterator;
+ typedef ::boost::bimaps::detail::
+ const_map_view_iterator<Tag,BimapType> const_iterator;
const_iterator iter = derived().find(k);
if( iter == derived().end() )
@@ -295,8 +286,8 @@ class mutable_data_unique_map_view_access
template< class CompatibleKey >
data_type_ & operator[](const CompatibleKey& k)
{
- typedef BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- iterator_type_by<Tag,BimapType>::type iterator;
+ typedef ::boost::bimaps::detail::
+ map_view_iterator<Tag,BimapType> iterator;
typedef BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
value_type_by<Tag,BimapType>::type value_type;
@@ -341,8 +332,8 @@ class non_mutable_data_unique_map_view_access
template< class CompatibleKey >
const data_type_ & at(const CompatibleKey& k) const
{
- typedef BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- const_iterator_type_by<Tag,BimapType>::type const_iterator;
+ typedef ::boost::bimaps::detail::
+ const_map_view_iterator<Tag,BimapType> const_iterator;
const_iterator iter = derived().find(k);
if( iter == derived().end() )
@@ -355,7 +346,7 @@ class non_mutable_data_unique_map_view_access
}
template< class CompatibleKey >
- data_type_ & operator[](const CompatibleKey& k)
+ data_type_ & operator[](const CompatibleKey&)
{
BOOST_BIMAP_STATIC_ERROR( OPERATOR_BRACKET_IS_NOT_SUPPORTED, (Derived));
}
@@ -493,7 +484,7 @@ void assign(BOOST_DEDUCED_TYPENAME BASE::size_type n, \
const BOOST_DEDUCED_TYPENAME BASE::value_type& v) \
{ \
this->clear(); \
- for(BOOST_DEDUCED_TYPENAME BASE::size_type i = 0 ; i < n ; ++n) \
+ for(BOOST_DEDUCED_TYPENAME BASE::size_type i = 0 ; i < n ; ++i) \
{ \
this->push_back(v); \
} \
diff --git a/boost/bimap/detail/map_view_iterator.hpp b/boost/bimap/detail/map_view_iterator.hpp
index 4f0e20e00a..c796a70156 100644
--- a/boost/bimap/detail/map_view_iterator.hpp
+++ b/boost/bimap/detail/map_view_iterator.hpp
@@ -28,50 +28,101 @@
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/bimap/relation/support/pair_by.hpp>
+// check
+#include <boost/bimap/relation/detail/metadata_access_builder.hpp>
+#include <boost/bimap/relation/detail/static_access_builder.hpp>
+
namespace boost {
namespace bimaps {
namespace detail {
+/** \brief Map View Iterator adaptors from multi index to bimap.
+
+These classes are based on transform iterators from Boost.Iterator.
+ **/
+
+template< class Tag, class BimapCore > struct map_view_iterator ;
+template< class Tag, class BimapCore > struct const_map_view_iterator ;
+
+template< class Tag, class BimapCore > struct reverse_map_view_iterator ;
+template< class Tag, class BimapCore > struct const_reverse_map_view_iterator ;
+
+template< class Tag, class BimapCore > struct local_map_view_iterator ;
+template< class Tag, class BimapCore > struct const_local_map_view_iterator ;
+
+
#ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
-template< class Tag, class Relation, class CoreIterator > struct map_view_iterator;
+#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
+/*===========================================================================*/
+#define BOOST_BIMAP_MAP_VIEW_ITERATOR_SERIALIZATION_SUPPORT \
+ BOOST_SERIALIZATION_SPLIT_MEMBER() \
+ \
+ friend class ::boost::serialization::access; \
+ \
+ template< class Archive > \
+ void save(Archive & ar, const unsigned int) const \
+ { \
+ ar << ::boost::serialization::make_nvp("mi_iterator",this->base()); \
+ } \
+ \
+ template< class Archive > \
+ void load(Archive & ar, const unsigned int) \
+ { \
+ BOOST_DEDUCED_TYPENAME base_::base_type iter; \
+ ar >> ::boost::serialization::make_nvp("mi_iterator",iter); \
+ this->base_reference() = iter; \
+ }
+/*===========================================================================*/
+#else
+#define BOOST_BIMAP_MAP_VIEW_ITERATOR_SERIALIZATION_SUPPORT // None
+#endif // BOOST_BIMAP_DISABLE_SERIALIZATION
-template< class Tag, class Relation, class CoreIterator >
-struct map_view_iterator_base
-{
- typedef iterator_adaptor
- <
- map_view_iterator< Tag, Relation, CoreIterator >,
- CoreIterator,
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::relation::support::
- pair_type_by<Tag,Relation>::type
+/*===========================================================================*/
+#define BOOST_BIMAP_CORE_ITERATOR_TYPE_BY_BUILDER( METANAME, ITERATOR ) \
+BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER( METANAME, BimapCore, \
+ typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE\
+ index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag> \
+ ::type::ITERATOR type, \
+ typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE\
+ index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag> \
+ ::type::ITERATOR type \
+)
+/*===========================================================================*/
- > type;
-};
-#endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
+BOOST_BIMAP_CORE_ITERATOR_TYPE_BY_BUILDER( core_iterator_type_by
+ , iterator )
-/** \brief Map View Iterator adaptor from multi index to bimap.
+BOOST_BIMAP_CORE_ITERATOR_TYPE_BY_BUILDER( reverse_core_iterator_type_by
+ , reverse_iterator )
-This is class is based on transform iterator from Boost.Iterator that is
-modified to allow serialization. It has been specialized for this
-library, and EBO optimization was applied to the functor.
+BOOST_BIMAP_CORE_ITERATOR_TYPE_BY_BUILDER( local_core_iterator_type_by
+ , local_iterator )
- **/
-template< class Tag, class Relation, class CoreIterator >
-struct map_view_iterator : public map_view_iterator_base<Tag,Relation,CoreIterator>::type
-{
- typedef BOOST_DEDUCED_TYPENAME
- map_view_iterator_base<Tag,Relation,CoreIterator>::type base_;
+// map_view_iterator
+template< class Tag, class BimapCore >
+struct map_view_iterator_adaptor {
+ typedef iterator_adaptor<
+ map_view_iterator<Tag,BimapCore>,
+ BOOST_DEDUCED_TYPENAME core_iterator_type_by<Tag,BimapCore>::type,
+ BOOST_DEDUCED_TYPENAME
+ ::boost::bimaps::support::value_type_by<Tag,BimapCore>::type
+ > type;
+};
+template< class Tag, class BimapCore >
+struct map_view_iterator :
+ public map_view_iterator_adaptor<Tag,BimapCore>::type
+{
+ typedef BOOST_DEDUCED_TYPENAME
+ map_view_iterator_adaptor<Tag,BimapCore>::type base_;
public:
map_view_iterator() {}
-
- map_view_iterator(CoreIterator const& iter)
+ map_view_iterator(BOOST_DEDUCED_TYPENAME base_::base_type const& iter)
: base_(iter) {}
-
map_view_iterator(map_view_iterator const & iter)
: base_(iter.base()) {}
@@ -83,117 +134,203 @@ struct map_view_iterator : public map_view_iterator_base<Tag,Relation,CoreIterat
)
);
}
-
private:
-
friend class iterator_core_access;
+ BOOST_BIMAP_MAP_VIEW_ITERATOR_SERIALIZATION_SUPPORT
+};
- #ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
-
- // Serialization support
-
- BOOST_SERIALIZATION_SPLIT_MEMBER()
- friend class ::boost::serialization::access;
+template< class Tag, class BimapCore >
+struct const_map_view_iterator_adaptor {
+ typedef iterator_adaptor<
+ const_map_view_iterator<Tag,BimapCore>,
+ BOOST_DEDUCED_TYPENAME core_iterator_type_by<Tag,BimapCore>::type,
+ const BOOST_DEDUCED_TYPENAME
+ ::boost::bimaps::support::value_type_by<Tag,BimapCore>::type
+ > type;
+};
+template< class Tag, class BimapCore >
+struct const_map_view_iterator :
+ public const_map_view_iterator_adaptor<Tag,BimapCore>::type
+{
+ typedef BOOST_DEDUCED_TYPENAME
+ const_map_view_iterator_adaptor<Tag,BimapCore>::type base_;
+ public:
- template< class Archive >
- void save(Archive & ar, const unsigned int version) const
- {
- ar << ::boost::serialization::make_nvp("mi_iterator",this->base());
- }
+ const_map_view_iterator() {}
+ const_map_view_iterator(
+ BOOST_DEDUCED_TYPENAME base_::base_type const& iter)
+ : base_(iter) {}
+ const_map_view_iterator(const_map_view_iterator const & iter)
+ : base_(iter.base()) {}
+ const_map_view_iterator(map_view_iterator<Tag,BimapCore> i)
+ : base_(i.base()) {}
- template< class Archive >
- void load(Archive & ar, const unsigned int version)
+ BOOST_DEDUCED_TYPENAME base_::reference dereference() const
{
- CoreIterator iter;
- ar >> ::boost::serialization::make_nvp("mi_iterator",iter);
- this->base_reference() = iter;
+ return ::boost::bimaps::relation::support::pair_by<Tag>(*this->base());
}
-
- #endif // BOOST_BIMAP_DISABLE_SERIALIZATION
+ private:
+ friend class iterator_core_access;
+ BOOST_BIMAP_MAP_VIEW_ITERATOR_SERIALIZATION_SUPPORT
};
-#ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
-
-template< class Tag, class Relation, class CoreIterator > struct const_map_view_iterator;
-
-template< class Tag, class Relation, class CoreIterator >
-struct const_map_view_iterator_base
-{
- typedef iterator_adaptor
- <
- const_map_view_iterator< Tag, Relation, CoreIterator >,
- CoreIterator,
- const BOOST_DEDUCED_TYPENAME ::boost::bimaps::relation::support::
- pair_type_by<Tag,Relation>::type
+// reverse_map_view_iterator
+template< class Tag, class BimapCore >
+struct reverse_map_view_iterator_adaptor {
+ typedef iterator_adaptor<
+ reverse_map_view_iterator<Tag,BimapCore>,
+ BOOST_DEDUCED_TYPENAME
+ reverse_core_iterator_type_by<Tag,BimapCore>::type,
+ BOOST_DEDUCED_TYPENAME
+ ::boost::bimaps::support::value_type_by<Tag,BimapCore>::type
> type;
};
+template< class Tag, class BimapCore >
+struct reverse_map_view_iterator :
+ public reverse_map_view_iterator_adaptor<Tag,BimapCore>::type
+{
+ typedef BOOST_DEDUCED_TYPENAME
+ reverse_map_view_iterator_adaptor<Tag,BimapCore>::type base_;
+ public:
-#endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
-
-
-/** \brief Const Map View Iterator adaptor from multi index to bimap.
-
-See also map_view_iterator.
- **/
+ reverse_map_view_iterator() {}
+ reverse_map_view_iterator(
+ BOOST_DEDUCED_TYPENAME base_::base_type const& iter)
+ : base_(iter) {}
+ reverse_map_view_iterator(reverse_map_view_iterator const & iter)
+ : base_(iter.base()) {}
-template< class Tag, class Relation, class CoreIterator >
-struct const_map_view_iterator :
+ BOOST_DEDUCED_TYPENAME base_::reference dereference() const
+ {
+ return ::boost::bimaps::relation::support::pair_by<Tag>(
+ *const_cast<BOOST_DEDUCED_TYPENAME base_::base_type::value_type*>(
+ &(*this->base())
+ )
+ );
+ }
+ private:
+ friend class iterator_core_access;
+ BOOST_BIMAP_MAP_VIEW_ITERATOR_SERIALIZATION_SUPPORT
+};
- public const_map_view_iterator_base<Tag,Relation,CoreIterator>::type
+template< class Tag, class BimapCore >
+struct const_reverse_map_view_iterator_adaptor {
+ typedef iterator_adaptor<
+ const_reverse_map_view_iterator<Tag,BimapCore>,
+ BOOST_DEDUCED_TYPENAME
+ reverse_core_iterator_type_by<Tag,BimapCore>::type,
+ const BOOST_DEDUCED_TYPENAME
+ ::boost::bimaps::support::value_type_by<Tag,BimapCore>::type
+ > type;
+};
+template< class Tag, class BimapCore >
+struct const_reverse_map_view_iterator :
+ public const_reverse_map_view_iterator_adaptor<Tag,BimapCore>::type
{
- typedef BOOST_DEDUCED_TYPENAME
- const_map_view_iterator_base<Tag,Relation,CoreIterator>::type base_;
-
+ typedef BOOST_DEDUCED_TYPENAME
+ const_reverse_map_view_iterator_adaptor<Tag,BimapCore>::type base_;
+
public:
- const_map_view_iterator() {}
-
- const_map_view_iterator(CoreIterator const& iter)
+ const_reverse_map_view_iterator() {}
+ const_reverse_map_view_iterator(
+ BOOST_DEDUCED_TYPENAME base_::base_type const& iter)
: base_(iter) {}
-
- const_map_view_iterator(const_map_view_iterator const & iter)
+ const_reverse_map_view_iterator(const_reverse_map_view_iterator const & iter)
: base_(iter.base()) {}
-
- const_map_view_iterator(map_view_iterator<Tag,Relation,CoreIterator> i)
+ const_reverse_map_view_iterator(reverse_map_view_iterator<Tag,BimapCore> i)
: base_(i.base()) {}
BOOST_DEDUCED_TYPENAME base_::reference dereference() const
{
return ::boost::bimaps::relation::support::pair_by<Tag>(*this->base());
}
-
private:
-
friend class iterator_core_access;
+ BOOST_BIMAP_MAP_VIEW_ITERATOR_SERIALIZATION_SUPPORT
+};
- #ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
- // Serialization support
+// local_map_view_iterator
- BOOST_SERIALIZATION_SPLIT_MEMBER()
+template< class Tag, class BimapCore >
+struct local_map_view_iterator_adaptor {
+ typedef iterator_adaptor<
+ local_map_view_iterator<Tag,BimapCore>,
+ BOOST_DEDUCED_TYPENAME
+ local_core_iterator_type_by<Tag,BimapCore>::type,
+ BOOST_DEDUCED_TYPENAME
+ ::boost::bimaps::support::value_type_by<Tag,BimapCore>::type
+ > type;
+};
+template< class Tag, class BimapCore >
+struct local_map_view_iterator :
+ public local_map_view_iterator_adaptor<Tag,BimapCore>::type
+{
+ typedef BOOST_DEDUCED_TYPENAME
+ local_map_view_iterator_adaptor<Tag,BimapCore>::type base_;
+ public:
- friend class ::boost::serialization::access;
+ local_map_view_iterator() {}
+ local_map_view_iterator(
+ BOOST_DEDUCED_TYPENAME base_::base_type const& iter)
+ : base_(iter) {}
+ local_map_view_iterator(local_map_view_iterator const & iter)
+ : base_(iter.base()) {}
- template< class Archive >
- void save(Archive & ar, const unsigned int version) const
+ BOOST_DEDUCED_TYPENAME base_::reference dereference() const
{
- ar << ::boost::serialization::make_nvp("mi_iterator",this->base());
+ return ::boost::bimaps::relation::support::pair_by<Tag>(
+ *const_cast<BOOST_DEDUCED_TYPENAME base_::base_type::value_type*>(
+ &(*this->base())
+ )
+ );
}
+ private:
+ friend class iterator_core_access;
+ BOOST_BIMAP_MAP_VIEW_ITERATOR_SERIALIZATION_SUPPORT
+};
+
+template< class Tag, class BimapCore >
+struct const_local_map_view_iterator_adaptor {
+ typedef iterator_adaptor<
+ const_local_map_view_iterator<Tag,BimapCore>,
+ BOOST_DEDUCED_TYPENAME
+ local_core_iterator_type_by<Tag,BimapCore>::type,
+ const BOOST_DEDUCED_TYPENAME
+ ::boost::bimaps::support::value_type_by<Tag,BimapCore>::type
+ > type;
+};
+template< class Tag, class BimapCore >
+struct const_local_map_view_iterator :
+ public const_local_map_view_iterator_adaptor<Tag,BimapCore>::type
+{
+ typedef BOOST_DEDUCED_TYPENAME
+ const_local_map_view_iterator_adaptor<Tag,BimapCore>::type base_;
+ public:
+
+ const_local_map_view_iterator() {}
+ const_local_map_view_iterator(
+ BOOST_DEDUCED_TYPENAME base_::base_type const& iter)
+ : base_(iter) {}
+ const_local_map_view_iterator(const_local_map_view_iterator const & iter)
+ : base_(iter.base()) {}
+ const_local_map_view_iterator(local_map_view_iterator<Tag,BimapCore> i)
+ : base_(i.base()) {}
- template< class Archive >
- void load(Archive & ar, const unsigned int version)
+ BOOST_DEDUCED_TYPENAME base_::reference dereference() const
{
- CoreIterator iter;
- ar >> ::boost::serialization::make_nvp("mi_iterator",iter);
- this->base_reference() = iter;
+ return ::boost::bimaps::relation::support::pair_by<Tag>(*this->base());
}
-
- #endif // BOOST_BIMAP_DISABLE_SERIALIZATION
+ private:
+ friend class iterator_core_access;
+ BOOST_BIMAP_MAP_VIEW_ITERATOR_SERIALIZATION_SUPPORT
};
+#endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
} // namespace detail
} // namespace bimaps
diff --git a/boost/bimap/detail/modifier_adaptor.hpp b/boost/bimap/detail/modifier_adaptor.hpp
index b170549d08..b170549d08 100644..100755
--- a/boost/bimap/detail/modifier_adaptor.hpp
+++ b/boost/bimap/detail/modifier_adaptor.hpp
diff --git a/boost/bimap/detail/non_unique_views_helper.hpp b/boost/bimap/detail/non_unique_views_helper.hpp
index 6801632019..6801632019 100644..100755
--- a/boost/bimap/detail/non_unique_views_helper.hpp
+++ b/boost/bimap/detail/non_unique_views_helper.hpp
diff --git a/boost/bimap/detail/set_view_base.hpp b/boost/bimap/detail/set_view_base.hpp
index 7c7f0d0a62..45305f0396 100644
--- a/boost/bimap/detail/set_view_base.hpp
+++ b/boost/bimap/detail/set_view_base.hpp
@@ -199,7 +199,7 @@ class set_view_base
{
return derived().base().replace(
derived().template functor<iterator_to_base_>()(position),
- value_type_(l,position->right)
+ ::boost::bimaps::relation::detail::copy_with_left_replaced(*position,l)
);
}
@@ -209,7 +209,7 @@ class set_view_base
{
return derived().base().replace(
derived().template functor<iterator_to_base_>()(position),
- value_type_(position->left,r)
+ ::boost::bimaps::relation::detail::copy_with_right_replaced(*position,r)
);
}
diff --git a/boost/bimap/detail/set_view_iterator.hpp b/boost/bimap/detail/set_view_iterator.hpp
index d48f5c05b1..08d7a42b71 100644
--- a/boost/bimap/detail/set_view_iterator.hpp
+++ b/boost/bimap/detail/set_view_iterator.hpp
@@ -95,13 +95,13 @@ struct set_view_iterator : public set_view_iterator_base<CoreIterator>::type
friend class ::boost::serialization::access;
template< class Archive >
- void save(Archive & ar, const unsigned int version) const
+ void save(Archive & ar, const unsigned int) const
{
ar << ::boost::serialization::make_nvp("mi_iterator",this->base());
}
template< class Archive >
- void load(Archive & ar, const unsigned int version)
+ void load(Archive & ar, const unsigned int)
{
CoreIterator iter;
ar >> ::boost::serialization::make_nvp("mi_iterator",iter);
@@ -171,13 +171,13 @@ struct const_set_view_iterator : public const_set_view_iterator_base<CoreIterato
friend class ::boost::serialization::access;
template< class Archive >
- void save(Archive & ar, const unsigned int version) const
+ void save(Archive & ar, const unsigned int) const
{
ar << ::boost::serialization::make_nvp("mi_iterator",this->base());
}
template< class Archive >
- void load(Archive & ar, const unsigned int version)
+ void load(Archive & ar, const unsigned int)
{
CoreIterator iter;
ar >> ::boost::serialization::make_nvp("mi_iterator",iter);
diff --git a/boost/bimap/detail/test/check_metadata.hpp b/boost/bimap/detail/test/check_metadata.hpp
index b669ee082d..b669ee082d 100644..100755
--- a/boost/bimap/detail/test/check_metadata.hpp
+++ b/boost/bimap/detail/test/check_metadata.hpp
diff --git a/boost/bimap/detail/user_interface_config.hpp b/boost/bimap/detail/user_interface_config.hpp
index 1d9a8e8e15..1d9a8e8e15 100644..100755
--- a/boost/bimap/detail/user_interface_config.hpp
+++ b/boost/bimap/detail/user_interface_config.hpp
diff --git a/boost/bimap/relation/detail/access_builder.hpp b/boost/bimap/relation/detail/access_builder.hpp
index a1e939f827..a1e939f827 100644..100755
--- a/boost/bimap/relation/detail/access_builder.hpp
+++ b/boost/bimap/relation/detail/access_builder.hpp
diff --git a/boost/bimap/relation/detail/metadata_access_builder.hpp b/boost/bimap/relation/detail/metadata_access_builder.hpp
index 4ef6cae938..4ef6cae938 100644..100755
--- a/boost/bimap/relation/detail/metadata_access_builder.hpp
+++ b/boost/bimap/relation/detail/metadata_access_builder.hpp
diff --git a/boost/bimap/relation/detail/static_access_builder.hpp b/boost/bimap/relation/detail/static_access_builder.hpp
index 72f9925b0c..72f9925b0c 100644..100755
--- a/boost/bimap/relation/detail/static_access_builder.hpp
+++ b/boost/bimap/relation/detail/static_access_builder.hpp
diff --git a/boost/bimap/relation/detail/to_mutable_relation_functor.hpp b/boost/bimap/relation/detail/to_mutable_relation_functor.hpp
index 1e8b521044..1e8b521044 100644..100755
--- a/boost/bimap/relation/detail/to_mutable_relation_functor.hpp
+++ b/boost/bimap/relation/detail/to_mutable_relation_functor.hpp
diff --git a/boost/bimap/relation/member_at.hpp b/boost/bimap/relation/member_at.hpp
index c39738fc2f..c39738fc2f 100644..100755
--- a/boost/bimap/relation/member_at.hpp
+++ b/boost/bimap/relation/member_at.hpp
diff --git a/boost/bimap/relation/mutant_relation.hpp b/boost/bimap/relation/mutant_relation.hpp
index 9aa28e4cac..60294a3b60 100644
--- a/boost/bimap/relation/mutant_relation.hpp
+++ b/boost/bimap/relation/mutant_relation.hpp
@@ -142,7 +142,7 @@ class relation_info_hook : public
#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
template< class Archive >
- void serialize(Archive & ar, const unsigned int version)
+ void serialize(Archive & ar, const unsigned int)
{
ar & ::boost::serialization::make_nvp("left" , base_::left );
ar & ::boost::serialization::make_nvp("right", base_::right);
@@ -188,7 +188,7 @@ class relation_info_hook<TA,TB,::boost::mpl::na,force_mutable> :
#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
template< class Archive >
- void serialize(Archive & ar, const unsigned int version)
+ void serialize(Archive & ar, const unsigned int)
{
ar & ::boost::serialization::make_nvp("left" , base_::left );
ar & ::boost::serialization::make_nvp("right", base_::right);
@@ -346,7 +346,7 @@ class mutant_relation : public
{
return ::boost::bimaps::relation::support::get<Tag>(*this);
}
-
+
#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
private:
@@ -422,6 +422,50 @@ bool operator>=(const detail::relation_storage<FirstType,SecondType,FM1> & a,
(( a.left == b.left ) && ( a.right >= b.right )));
}
+namespace detail {
+
+template< class TA, class TB, class Info, bool force_mutable>
+mutant_relation<TA,TB,Info,force_mutable>
+ copy_with_left_replaced(mutant_relation<TA,TB,Info,force_mutable> const& rel,
+ BOOST_DEDUCED_TYPENAME ::boost::call_traits< BOOST_DEDUCED_TYPENAME
+ mutant_relation<TA,TB,Info,force_mutable>::left_value_type>
+ ::param_type l)
+{
+ return mutant_relation<TA,TB,Info,force_mutable>(l,rel.right,rel.info);
+}
+
+template< class TA, class TB, bool force_mutable>
+mutant_relation<TA,TB,::boost::mpl::na,force_mutable>
+ copy_with_left_replaced(mutant_relation<TA,TB,::boost::mpl::na,force_mutable> const& rel,
+ BOOST_DEDUCED_TYPENAME ::boost::call_traits< BOOST_DEDUCED_TYPENAME
+ mutant_relation<TA,TB,::boost::mpl::na,force_mutable>::left_value_type>
+ ::param_type l)
+{
+ return mutant_relation<TA,TB,::boost::mpl::na,force_mutable>(l,rel.right);
+}
+
+template< class TA, class TB, class Info, bool force_mutable>
+mutant_relation<TA,TB,Info,force_mutable>
+ copy_with_right_replaced(mutant_relation<TA,TB,Info,force_mutable> const& rel,
+ BOOST_DEDUCED_TYPENAME ::boost::call_traits< BOOST_DEDUCED_TYPENAME
+ mutant_relation<TA,TB,Info,force_mutable>::right_value_type>
+ ::param_type r)
+{
+ return mutant_relation<TA,TB,Info,force_mutable>(rel.left,r,rel.info);
+}
+
+template< class TA, class TB, bool force_mutable>
+mutant_relation<TA,TB,::boost::mpl::na,force_mutable>
+ copy_with_right_replaced(mutant_relation<TA,TB,::boost::mpl::na,force_mutable> const& rel,
+ BOOST_DEDUCED_TYPENAME ::boost::call_traits< BOOST_DEDUCED_TYPENAME
+ mutant_relation<TA,TB,::boost::mpl::na,force_mutable>::right_value_type>
+ ::param_type r)
+{
+ return mutant_relation<TA,TB,::boost::mpl::na,force_mutable>(rel.left,r);
+}
+
+} // namespace detail
+
} // namespace relation
} // namespace bimaps
} // namespace boost
diff --git a/boost/bimap/relation/pair_layout.hpp b/boost/bimap/relation/pair_layout.hpp
index 24368db105..24368db105 100644..100755
--- a/boost/bimap/relation/pair_layout.hpp
+++ b/boost/bimap/relation/pair_layout.hpp
diff --git a/boost/bimap/relation/structured_pair.hpp b/boost/bimap/relation/structured_pair.hpp
index 2325b3d323..53a0b300bc 100644
--- a/boost/bimap/relation/structured_pair.hpp
+++ b/boost/bimap/relation/structured_pair.hpp
@@ -499,6 +499,50 @@ bool operator>=(const std::pair<F,S> & a,
}
+namespace detail {
+
+template< class FirstType, class SecondType, class Info, class Layout>
+structured_pair<FirstType,SecondType,Info,Layout>
+ copy_with_first_replaced(structured_pair<FirstType,SecondType,Info,Layout> const& p,
+ BOOST_DEDUCED_TYPENAME ::boost::call_traits< BOOST_DEDUCED_TYPENAME
+ structured_pair<FirstType,SecondType,Info,Layout>::first_type>
+ ::param_type f)
+{
+ return structured_pair<FirstType,SecondType,Info,Layout>(f,p.second,p.info);
+}
+
+template< class FirstType, class SecondType, class Layout>
+structured_pair<FirstType,SecondType,::boost::mpl::na,Layout>
+ copy_with_first_replaced(structured_pair<FirstType,SecondType,::boost::mpl::na,Layout> const& p,
+ BOOST_DEDUCED_TYPENAME ::boost::call_traits< BOOST_DEDUCED_TYPENAME
+ structured_pair<FirstType,SecondType,::boost::mpl::na,Layout>::first_type>
+ ::param_type f)
+{
+ return structured_pair<FirstType,SecondType,::boost::mpl::na,Layout>(f,p.second);
+}
+
+template< class FirstType, class SecondType, class Info, class Layout>
+structured_pair<FirstType,SecondType,Info,Layout>
+ copy_with_second_replaced(structured_pair<FirstType,SecondType,Info,Layout> const& p,
+ BOOST_DEDUCED_TYPENAME ::boost::call_traits< BOOST_DEDUCED_TYPENAME
+ structured_pair<FirstType,SecondType,Info,Layout>::second_type>
+ ::param_type s)
+{
+ return structured_pair<FirstType,SecondType,Info,Layout>(p.first,s,p.info);
+}
+
+template< class FirstType, class SecondType, class Layout>
+structured_pair<FirstType,SecondType,::boost::mpl::na,Layout>
+ copy_with_second_replaced(structured_pair<FirstType,SecondType,::boost::mpl::na,Layout> const& p,
+ BOOST_DEDUCED_TYPENAME ::boost::call_traits< BOOST_DEDUCED_TYPENAME
+ structured_pair<FirstType,SecondType,::boost::mpl::na,Layout>::second_type>
+ ::param_type s)
+{
+ return structured_pair<FirstType,SecondType,::boost::mpl::na,Layout>(p.first,s);
+}
+
+} // namespace detail
+
} // namespace relation
} // namespace bimaps
diff --git a/boost/bimap/relation/support/get.hpp b/boost/bimap/relation/support/get.hpp
index 3a3afde15d..3a3afde15d 100644..100755
--- a/boost/bimap/relation/support/get.hpp
+++ b/boost/bimap/relation/support/get.hpp
diff --git a/boost/bimap/relation/support/get_pair_functor.hpp b/boost/bimap/relation/support/get_pair_functor.hpp
index 5f37bf6cfe..5f37bf6cfe 100644..100755
--- a/boost/bimap/relation/support/get_pair_functor.hpp
+++ b/boost/bimap/relation/support/get_pair_functor.hpp
diff --git a/boost/bimap/relation/support/is_tag_of_member_at.hpp b/boost/bimap/relation/support/is_tag_of_member_at.hpp
index b2b1b7497b..b2b1b7497b 100644..100755
--- a/boost/bimap/relation/support/is_tag_of_member_at.hpp
+++ b/boost/bimap/relation/support/is_tag_of_member_at.hpp
diff --git a/boost/bimap/relation/support/member_with_tag.hpp b/boost/bimap/relation/support/member_with_tag.hpp
index a8324ff281..a8324ff281 100644..100755
--- a/boost/bimap/relation/support/member_with_tag.hpp
+++ b/boost/bimap/relation/support/member_with_tag.hpp
diff --git a/boost/bimap/relation/support/opposite_tag.hpp b/boost/bimap/relation/support/opposite_tag.hpp
index 174bd985c0..174bd985c0 100644..100755
--- a/boost/bimap/relation/support/opposite_tag.hpp
+++ b/boost/bimap/relation/support/opposite_tag.hpp
diff --git a/boost/bimap/relation/support/pair_by.hpp b/boost/bimap/relation/support/pair_by.hpp
index 1ce25fbe5c..1ce25fbe5c 100644..100755
--- a/boost/bimap/relation/support/pair_by.hpp
+++ b/boost/bimap/relation/support/pair_by.hpp
diff --git a/boost/bimap/relation/support/pair_type_by.hpp b/boost/bimap/relation/support/pair_type_by.hpp
index 64f98d1ecc..64f98d1ecc 100644..100755
--- a/boost/bimap/relation/support/pair_type_by.hpp
+++ b/boost/bimap/relation/support/pair_type_by.hpp
diff --git a/boost/bimap/relation/support/value_type_of.hpp b/boost/bimap/relation/support/value_type_of.hpp
index 9dc5761119..9dc5761119 100644..100755
--- a/boost/bimap/relation/support/value_type_of.hpp
+++ b/boost/bimap/relation/support/value_type_of.hpp
diff --git a/boost/bimap/relation/symmetrical_base.hpp b/boost/bimap/relation/symmetrical_base.hpp
index ea787c3731..ea787c3731 100644..100755
--- a/boost/bimap/relation/symmetrical_base.hpp
+++ b/boost/bimap/relation/symmetrical_base.hpp
diff --git a/boost/bimap/support/data_type_by.hpp b/boost/bimap/support/data_type_by.hpp
index c6d2e2cc99..c6d2e2cc99 100644..100755
--- a/boost/bimap/support/data_type_by.hpp
+++ b/boost/bimap/support/data_type_by.hpp
diff --git a/boost/bimap/support/iterator_type_by.hpp b/boost/bimap/support/iterator_type_by.hpp
index 6d1cff3ffa..7141835042 100644
--- a/boost/bimap/support/iterator_type_by.hpp
+++ b/boost/bimap/support/iterator_type_by.hpp
@@ -21,14 +21,11 @@
#include <boost/bimap/relation/detail/metadata_access_builder.hpp>
#include <boost/bimap/relation/detail/static_access_builder.hpp>
-#include <boost/bimap/relation/support/pair_type_by.hpp>
-
-#include <boost/bimap/detail/map_view_iterator.hpp>
-
/** \struct boost::bimaps::support::iterator_type_by
\brief Metafunction to obtain the iterator type of the map view by one of the sides.
-
+These metafunctions can be used outside the bimap framework for other bimap
+signature compatible classes.
\code
template< class Tag, class Bimap >
@@ -79,7 +76,6 @@ namespace boost {
namespace bimaps {
namespace support {
-
// Implementation of iterator type by metafunction
BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
@@ -101,123 +97,41 @@ BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
// Implementation of reverse iterator type by metafunction
-BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER
+BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
(
- core_reverse_iterator_type_by,
- BimapCore,
-
- typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
- index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag>
- ::type::reverse_iterator type,
-
- typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
- index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag>
- ::type::reverse_iterator type
+ reverse_iterator_type_by,
+ left_reverse_iterator,
+ right_reverse_iterator
)
-template< class Tag, class BimapCore >
-struct reverse_iterator_type_by
-{
- typedef ::boost::bimaps::detail::map_view_iterator
- <
- Tag,
- BOOST_DEDUCED_TYPENAME BimapCore::relation,
- BOOST_DEDUCED_TYPENAME core_reverse_iterator_type_by<Tag,BimapCore>::type
-
- > type;
-};
-
// Implementation of const reverse iterator type by metafunction
-BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER
+BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
(
- core_const_reverse_iterator_type_by,
- BimapCore,
-
- typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
- index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag>
- ::type::const_reverse_iterator type,
-
- typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
- index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag>
- ::type::const_reverse_iterator type
+ const_reverse_iterator_type_by,
+ left_const_reverse_iterator,
+ right_const_reverse_iterator
)
-template< class Tag, class BimapCore >
-struct const_reverse_iterator_type_by
-{
-
- typedef ::boost::bimaps::detail::map_view_iterator
- <
- Tag,
- BOOST_DEDUCED_TYPENAME BimapCore::relation,
- BOOST_DEDUCED_TYPENAME core_const_reverse_iterator_type_by<Tag,BimapCore>::type
-
- > type;
-};
-
// Implementation of local iterator type by metafunction
-BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER
+BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
(
- core_local_iterator_type_by,
- BimapCore,
-
- typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
- index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag>
- ::type::local_iterator type,
-
- typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
- index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag>
- ::type::local_iterator type
+ local_iterator_type_by,
+ left_local_iterator,
+ right_local_iterator
)
-
-template< class Tag, class BimapCore >
-struct local_iterator_type_by
-{
-
- typedef ::boost::bimaps::detail::map_view_iterator
- <
- Tag,
- BOOST_DEDUCED_TYPENAME BimapCore::relation,
- BOOST_DEDUCED_TYPENAME core_local_iterator_type_by<Tag,BimapCore>::type
-
- > type;
-};
-
-
// Implementation of const local iterator type by metafunction
-BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER
+BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
(
- core_const_local_iterator_type_by,
- BimapCore,
-
- typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
- index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag>
- ::type::const_local_iterator type,
-
- typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
- index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag>
- ::type::const_local_iterator type
+ const_local_iterator_type_by,
+ left_const_local_iterator,
+ right_const_local_iterator
)
-template< class Tag, class BimapCore >
-struct const_local_iterator_type_by
-{
-
- typedef ::boost::bimaps::detail::map_view_iterator
- <
- Tag,
- BOOST_DEDUCED_TYPENAME BimapCore::relation,
- BOOST_DEDUCED_TYPENAME core_const_local_iterator_type_by<Tag,BimapCore>::type
-
- > type;
-};
-
-
} // namespace support
} // namespace bimaps
} // namespace boost
diff --git a/boost/bimap/support/key_type_by.hpp b/boost/bimap/support/key_type_by.hpp
index 0b4abb5d28..0b4abb5d28 100644..100755
--- a/boost/bimap/support/key_type_by.hpp
+++ b/boost/bimap/support/key_type_by.hpp
diff --git a/boost/bimap/support/lambda.hpp b/boost/bimap/support/lambda.hpp
index cffa2c3f9d..cffa2c3f9d 100644..100755
--- a/boost/bimap/support/lambda.hpp
+++ b/boost/bimap/support/lambda.hpp
diff --git a/boost/bimap/support/map_by.hpp b/boost/bimap/support/map_by.hpp
index ac57f1bccc..ac57f1bccc 100644..100755
--- a/boost/bimap/support/map_by.hpp
+++ b/boost/bimap/support/map_by.hpp
diff --git a/boost/bimap/support/map_type_by.hpp b/boost/bimap/support/map_type_by.hpp
index 00b4d20be5..00b4d20be5 100644..100755
--- a/boost/bimap/support/map_type_by.hpp
+++ b/boost/bimap/support/map_type_by.hpp
diff --git a/boost/bimap/support/value_type_by.hpp b/boost/bimap/support/value_type_by.hpp
index a7ce6c0e5d..a7ce6c0e5d 100644..100755
--- a/boost/bimap/support/value_type_by.hpp
+++ b/boost/bimap/support/value_type_by.hpp
diff --git a/boost/bimap/tags/support/apply_to_value_type.hpp b/boost/bimap/tags/support/apply_to_value_type.hpp
index bb6aa60613..bb6aa60613 100644..100755
--- a/boost/bimap/tags/support/apply_to_value_type.hpp
+++ b/boost/bimap/tags/support/apply_to_value_type.hpp
diff --git a/boost/bimap/tags/support/default_tagged.hpp b/boost/bimap/tags/support/default_tagged.hpp
index 4c02a65952..4c02a65952 100644..100755
--- a/boost/bimap/tags/support/default_tagged.hpp
+++ b/boost/bimap/tags/support/default_tagged.hpp
diff --git a/boost/bimap/tags/support/is_tagged.hpp b/boost/bimap/tags/support/is_tagged.hpp
index 892b3b1022..892b3b1022 100644..100755
--- a/boost/bimap/tags/support/is_tagged.hpp
+++ b/boost/bimap/tags/support/is_tagged.hpp
diff --git a/boost/bimap/tags/support/overwrite_tagged.hpp b/boost/bimap/tags/support/overwrite_tagged.hpp
index 55cd0fc8e4..55cd0fc8e4 100644..100755
--- a/boost/bimap/tags/support/overwrite_tagged.hpp
+++ b/boost/bimap/tags/support/overwrite_tagged.hpp
diff --git a/boost/bimap/tags/support/tag_of.hpp b/boost/bimap/tags/support/tag_of.hpp
index 413703b41c..413703b41c 100644..100755
--- a/boost/bimap/tags/support/tag_of.hpp
+++ b/boost/bimap/tags/support/tag_of.hpp
diff --git a/boost/bimap/tags/support/value_type_of.hpp b/boost/bimap/tags/support/value_type_of.hpp
index a4ea82814c..a4ea82814c 100644..100755
--- a/boost/bimap/tags/support/value_type_of.hpp
+++ b/boost/bimap/tags/support/value_type_of.hpp
diff --git a/boost/bimap/tags/tagged.hpp b/boost/bimap/tags/tagged.hpp
index ca2a24c2f9..ca2a24c2f9 100644..100755
--- a/boost/bimap/tags/tagged.hpp
+++ b/boost/bimap/tags/tagged.hpp
diff --git a/boost/bimap/views/list_map_view.hpp b/boost/bimap/views/list_map_view.hpp
index 2a7d2b1f68..1014fed846 100644
--- a/boost/bimap/views/list_map_view.hpp
+++ b/boost/bimap/views/list_map_view.hpp
@@ -36,22 +36,17 @@ struct list_map_view_base
{
typedef ::boost::bimaps::container_adaptor::list_map_adaptor
<
- BOOST_DEDUCED_TYPENAME BimapType::core_type::BOOST_NESTED_TEMPLATE index<Tag>::type,
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- iterator_type_by<Tag,BimapType>::type,
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- const_iterator_type_by<Tag,BimapType>::type,
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- reverse_iterator_type_by<Tag,BimapType>::type,
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- const_reverse_iterator_type_by<Tag,BimapType>::type,
+ BOOST_DEDUCED_TYPENAME BimapType::core_type::
+ BOOST_NESTED_TEMPLATE index<Tag>::type,
+ ::boost::bimaps::detail:: map_view_iterator<Tag,BimapType>,
+ ::boost::bimaps::detail:: const_map_view_iterator<Tag,BimapType>,
+ ::boost::bimaps::detail:: reverse_map_view_iterator<Tag,BimapType>,
+ ::boost::bimaps::detail::const_reverse_map_view_iterator<Tag,BimapType>,
::boost::bimaps::container_adaptor::support::iterator_facade_to_base
<
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- iterator_type_by<Tag,BimapType>::type,
- BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::
- const_iterator_type_by<Tag,BimapType>::type
-
+ ::boost::bimaps::detail:: map_view_iterator<Tag,BimapType>,
+ ::boost::bimaps::detail::const_map_view_iterator<Tag,BimapType>
+
>,
::boost::mpl::na,
::boost::mpl::na,
@@ -64,7 +59,7 @@ struct list_map_view_base
<
Tag,
BOOST_DEDUCED_TYPENAME BimapType::relation
-
+
>::type
> type;
diff --git a/boost/bimap/views/map_view.hpp b/boost/bimap/views/map_view.hpp
index 245b5d6fe6..b8c2e01afe 100644
--- a/boost/bimap/views/map_view.hpp
+++ b/boost/bimap/views/map_view.hpp
@@ -40,7 +40,7 @@ class map_view
public BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
map_adaptor,
Tag,BimapType,
- reverse_iterator_type_by,const_reverse_iterator_type_by
+ reverse_map_view_iterator,const_reverse_map_view_iterator
),
public ::boost::bimaps::detail::
map_view_base< map_view<Tag,BimapType>,Tag,BimapType >,
@@ -50,7 +50,7 @@ class map_view
typedef BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
map_adaptor,
Tag,BimapType,
- reverse_iterator_type_by,const_reverse_iterator_type_by
+ reverse_map_view_iterator,const_reverse_map_view_iterator
) base_;
diff --git a/boost/bimap/views/multimap_view.hpp b/boost/bimap/views/multimap_view.hpp
index 41769496c5..08022e7c35 100644
--- a/boost/bimap/views/multimap_view.hpp
+++ b/boost/bimap/views/multimap_view.hpp
@@ -42,7 +42,7 @@ class multimap_view
public BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
multimap_adaptor,
Tag,BimapType,
- reverse_iterator_type_by,const_reverse_iterator_type_by
+ reverse_map_view_iterator,const_reverse_map_view_iterator
),
public ::boost::bimaps::detail::
map_view_base< multimap_view<Tag,BimapType>,Tag,BimapType >
@@ -51,7 +51,7 @@ class multimap_view
typedef BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
multimap_adaptor,
Tag,BimapType,
- reverse_iterator_type_by,const_reverse_iterator_type_by
+ reverse_map_view_iterator,const_reverse_map_view_iterator
) base_;
diff --git a/boost/bimap/views/multiset_view.hpp b/boost/bimap/views/multiset_view.hpp
index c49230b2cb..c49230b2cb 100644..100755
--- a/boost/bimap/views/multiset_view.hpp
+++ b/boost/bimap/views/multiset_view.hpp
diff --git a/boost/bimap/views/set_view.hpp b/boost/bimap/views/set_view.hpp
index 8a857afc7b..8a857afc7b 100644..100755
--- a/boost/bimap/views/set_view.hpp
+++ b/boost/bimap/views/set_view.hpp
diff --git a/boost/bimap/views/unconstrained_map_view.hpp b/boost/bimap/views/unconstrained_map_view.hpp
index ce47541e48..b78a80ef1e 100644
--- a/boost/bimap/views/unconstrained_map_view.hpp
+++ b/boost/bimap/views/unconstrained_map_view.hpp
@@ -31,6 +31,8 @@ class unconstrained_map_view
template< class T >
unconstrained_map_view(const T &) {}
+ typedef void iterator;
+ typedef void const_iterator;
typedef void reference;
typedef void const_reference;
typedef void info_type;
diff --git a/boost/bimap/views/unordered_map_view.hpp b/boost/bimap/views/unordered_map_view.hpp
index 14813e2fce..90eeb1e719 100644
--- a/boost/bimap/views/unordered_map_view.hpp
+++ b/boost/bimap/views/unordered_map_view.hpp
@@ -43,7 +43,7 @@ class unordered_map_view
public BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
unordered_map_adaptor,
Tag,BimapType,
- local_iterator_type_by,const_local_iterator_type_by
+ local_map_view_iterator,const_local_map_view_iterator
),
public ::boost::bimaps::detail::map_view_base<
@@ -56,7 +56,7 @@ class unordered_map_view
typedef BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
unordered_map_adaptor,
Tag,BimapType,
- local_iterator_type_by,const_local_iterator_type_by
+ local_map_view_iterator,const_local_map_view_iterator
) base_;
diff --git a/boost/bimap/views/unordered_multimap_view.hpp b/boost/bimap/views/unordered_multimap_view.hpp
index db222056e4..ac4579cf91 100644
--- a/boost/bimap/views/unordered_multimap_view.hpp
+++ b/boost/bimap/views/unordered_multimap_view.hpp
@@ -44,7 +44,7 @@ class unordered_multimap_view
public BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
unordered_multimap_adaptor,
Tag,BimapType,
- local_iterator_type_by,const_local_iterator_type_by
+ local_map_view_iterator,const_local_map_view_iterator
),
public ::boost::bimaps::detail::map_view_base<
@@ -54,7 +54,7 @@ class unordered_multimap_view
typedef BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
unordered_multimap_adaptor,
Tag,BimapType,
- local_iterator_type_by,const_local_iterator_type_by
+ local_map_view_iterator,const_local_map_view_iterator
) base_;
diff --git a/boost/bimap/views/unordered_multiset_view.hpp b/boost/bimap/views/unordered_multiset_view.hpp
index 3a72e36c79..3a72e36c79 100644..100755
--- a/boost/bimap/views/unordered_multiset_view.hpp
+++ b/boost/bimap/views/unordered_multiset_view.hpp
diff --git a/boost/bimap/views/unordered_set_view.hpp b/boost/bimap/views/unordered_set_view.hpp
index 02187aef2a..02187aef2a 100644..100755
--- a/boost/bimap/views/unordered_set_view.hpp
+++ b/boost/bimap/views/unordered_set_view.hpp
diff --git a/boost/bimap/views/vector_map_view.hpp b/boost/bimap/views/vector_map_view.hpp
index 1837c2797c..d8fdd8d82b 100644
--- a/boost/bimap/views/vector_map_view.hpp
+++ b/boost/bimap/views/vector_map_view.hpp
@@ -41,7 +41,7 @@ class vector_map_view
public BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
vector_map_adaptor,
Tag,BimapType,
- reverse_iterator_type_by, const_reverse_iterator_type_by
+ reverse_map_view_iterator, const_reverse_map_view_iterator
),
public ::boost::bimaps::detail::
@@ -50,7 +50,7 @@ class vector_map_view
typedef BOOST_BIMAP_MAP_VIEW_CONTAINER_ADAPTOR(
vector_map_adaptor,
Tag,BimapType,
- reverse_iterator_type_by, const_reverse_iterator_type_by
+ reverse_map_view_iterator, const_reverse_map_view_iterator
) base_;
@@ -75,7 +75,41 @@ class vector_map_view
this->base() = v.base();
return *this;
}
+
+ BOOST_DEDUCED_TYPENAME base_::const_reference
+ operator[](BOOST_DEDUCED_TYPENAME base_::size_type n) const
+ {
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ this->base().operator[](n)
+ );
+ }
+
+ BOOST_DEDUCED_TYPENAME base_::const_reference
+ at(BOOST_DEDUCED_TYPENAME base_::size_type n) const
+ {
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ this->base().at(n)
+ );
+ }
+
+ BOOST_DEDUCED_TYPENAME base_::reference
+ operator[](BOOST_DEDUCED_TYPENAME base_::size_type n)
+ {
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ const_cast<BOOST_DEDUCED_TYPENAME base_::base_type::value_type &>(
+ this->base().operator[](n)
+ ));
+ }
+ BOOST_DEDUCED_TYPENAME base_::reference
+ at(BOOST_DEDUCED_TYPENAME base_::size_type n)
+ {
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ const_cast<BOOST_DEDUCED_TYPENAME base_::base_type::value_type &>(
+ this->base().at(n)
+ ));
+ }
+
BOOST_BIMAP_VIEW_ASSIGN_IMPLEMENTATION(base_)
BOOST_BIMAP_VIEW_FRONT_BACK_IMPLEMENTATION(base_)
@@ -273,7 +307,7 @@ typedef BOOST_DEDUCED_TYPENAME MAP_VIEW::TYPENAME \
/*===========================================================================*/
#define BOOST_BIMAP_MAP_VIEW_EXTRA_TYPEDEFS_BODY(MAP_VIEW,SIDE) \
BOOST_BIMAP_MAP_VIEW_EXTRA_TYPEDEF(MAP_VIEW,SIDE,reverse_iterator) \
- BOOST_BIMAP_MAP_VIEW_EXTRA_TYPEDEF(MAP_VIEW,SIDE,const_reverse_iterator) \
+ BOOST_BIMAP_MAP_VIEW_EXTRA_TYPEDEF(MAP_VIEW,SIDE,const_reverse_iterator)
/*===========================================================================*/
namespace detail {
diff --git a/boost/bimap/views/vector_set_view.hpp b/boost/bimap/views/vector_set_view.hpp
index 58e347af2d..890ffd02a9 100644
--- a/boost/bimap/views/vector_set_view.hpp
+++ b/boost/bimap/views/vector_set_view.hpp
@@ -68,6 +68,40 @@ class vector_set_view
return *this;
}
+ BOOST_DEDUCED_TYPENAME base_::const_reference
+ operator[](BOOST_DEDUCED_TYPENAME base_::size_type n) const
+ {
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ this->base().operator[](n)
+ );
+ }
+
+ BOOST_DEDUCED_TYPENAME base_::const_reference
+ at(BOOST_DEDUCED_TYPENAME base_::size_type n) const
+ {
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ this->base().at(n)
+ );
+ }
+
+ BOOST_DEDUCED_TYPENAME base_::reference
+ operator[](BOOST_DEDUCED_TYPENAME base_::size_type n)
+ {
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ const_cast<BOOST_DEDUCED_TYPENAME base_::base_type::value_type &>(
+ this->base().operator[](n)
+ ));
+ }
+
+ BOOST_DEDUCED_TYPENAME base_::reference
+ at(BOOST_DEDUCED_TYPENAME base_::size_type n)
+ {
+ return this->template functor<BOOST_DEDUCED_TYPENAME base_::value_from_base>()(
+ const_cast<BOOST_DEDUCED_TYPENAME base_::base_type::value_type &>(
+ this->base().at(n)
+ ));
+ }
+
BOOST_BIMAP_VIEW_ASSIGN_IMPLEMENTATION(base_)
BOOST_BIMAP_VIEW_FRONT_BACK_IMPLEMENTATION(base_)