diff options
Diffstat (limited to 'boost/bimap/views')
-rw-r--r-- | boost/bimap/views/list_map_view.hpp | 25 | ||||
-rw-r--r-- | boost/bimap/views/map_view.hpp | 4 | ||||
-rw-r--r-- | boost/bimap/views/multimap_view.hpp | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | boost/bimap/views/multiset_view.hpp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | boost/bimap/views/set_view.hpp | 0 | ||||
-rw-r--r-- | boost/bimap/views/unconstrained_map_view.hpp | 2 | ||||
-rw-r--r-- | boost/bimap/views/unordered_map_view.hpp | 4 | ||||
-rw-r--r-- | boost/bimap/views/unordered_multimap_view.hpp | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | boost/bimap/views/unordered_multiset_view.hpp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | boost/bimap/views/unordered_set_view.hpp | 0 | ||||
-rw-r--r-- | boost/bimap/views/vector_map_view.hpp | 40 | ||||
-rw-r--r-- | boost/bimap/views/vector_set_view.hpp | 34 |
12 files changed, 91 insertions, 26 deletions
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_) |