fix doc example typo
[boost.git] / boost / bimap / views / unordered_multiset_view.hpp
blob3a72e36c7956b08453d7d132ce92f86ffda42514
1 // Boost.Bimap
2 //
3 // Copyright (c) 2006-2007 Matias Capeletto
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 /// \file views/unordered_multiset_view.hpp
10 /// \brief View of a bimap that is signature compatible with tr1::unordered_multiset.
12 #ifndef BOOST_BIMAP_VIEWS_UNORDERED_MULTISET_VIEW_HPP
13 #define BOOST_BIMAP_VIEWS_UNORDERED_MULTISET_VIEW_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
16 #pragma once
17 #endif
19 #include <boost/config.hpp>
21 #include <boost/bimap/container_adaptor/unordered_multiset_adaptor.hpp>
22 #include <boost/bimap/detail/non_unique_views_helper.hpp>
23 #include <boost/bimap/detail/set_view_base.hpp>
25 namespace boost {
26 namespace bimaps {
27 namespace views {
29 /// \brief View of a bimap that is signature compatible with std::unordered_multiset.
30 /**
32 This class uses container_adaptor and iterator_adaptor to wrapped a index of the
33 multi_index bimap core so it can be used as a std::unordered_multiset.
35 See also const_unordered_multiset_view.
36 **/
38 template< class CoreIndex >
39 class unordered_multiset_view
41 public BOOST_BIMAP_SET_VIEW_CONTAINER_ADAPTOR(
42 unordered_multiset_adaptor,
43 CoreIndex,
44 local_iterator,
45 const_local_iterator
49 public ::boost::bimaps::detail::
50 set_view_base< unordered_multiset_view< CoreIndex >, CoreIndex >
52 BOOST_BIMAP_SET_VIEW_BASE_FRIEND(unordered_multiset_view,CoreIndex)
54 typedef BOOST_BIMAP_SET_VIEW_CONTAINER_ADAPTOR(
55 unordered_multiset_adaptor,
56 CoreIndex,
57 local_iterator,
58 const_local_iterator
60 ) base_;
62 public:
64 unordered_multiset_view(BOOST_DEDUCED_TYPENAME base_::base_type & c)
65 : base_(c) {}
67 BOOST_BIMAP_NON_UNIQUE_VIEW_INSERT_FUNCTIONS
69 unordered_multiset_view & operator=(const unordered_multiset_view & v)
71 this->base() = v.base();
72 return *this;
77 } // namespace views
78 } // namespace bimaps
79 } // namespace boost
81 #endif // BOOST_BIMAP_VIEWS_UNORDERED_MULTISET_VIEW_HPP