Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:44:10

0001 // Boost.Bimap
0002 //
0003 // Copyright (c) 2006-2007 Matias Capeletto
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 /// \file views/unordered_multiset_view.hpp
0010 /// \brief View of a bimap that is signature compatible with tr1::unordered_multiset.
0011 
0012 #ifndef BOOST_BIMAP_VIEWS_UNORDERED_MULTISET_VIEW_HPP
0013 #define BOOST_BIMAP_VIEWS_UNORDERED_MULTISET_VIEW_HPP
0014 
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018 
0019 #include <boost/config.hpp>
0020 
0021 #include <boost/bimap/container_adaptor/unordered_multiset_adaptor.hpp>
0022 #include <boost/bimap/detail/non_unique_views_helper.hpp>
0023 #include <boost/bimap/detail/set_view_base.hpp>
0024 
0025 namespace boost {
0026 namespace bimaps {
0027 namespace views {
0028 
0029 /// \brief View of a bimap that is signature compatible with std::unordered_multiset.
0030 /**
0031 
0032 This class uses container_adaptor and iterator_adaptor to wrapped a index of the
0033 multi_index bimap core so it can be used as a std::unordered_multiset.
0034 
0035 See also const_unordered_multiset_view.
0036                                                                                     **/
0037 
0038 template< class CoreIndex >
0039 class unordered_multiset_view
0040 :
0041     public BOOST_BIMAP_SET_VIEW_CONTAINER_ADAPTOR(
0042         unordered_multiset_adaptor,
0043         CoreIndex,
0044         local_iterator,
0045         const_local_iterator
0046 
0047     ),
0048 
0049     public ::boost::bimaps::detail::
0050                 set_view_base< unordered_multiset_view< CoreIndex >, CoreIndex >
0051 {
0052     BOOST_BIMAP_SET_VIEW_BASE_FRIEND(unordered_multiset_view,CoreIndex)
0053 
0054     typedef BOOST_BIMAP_SET_VIEW_CONTAINER_ADAPTOR(
0055         unordered_multiset_adaptor,
0056         CoreIndex,
0057         local_iterator,
0058         const_local_iterator
0059 
0060     ) base_;
0061 
0062     public:
0063 
0064     unordered_multiset_view(BOOST_DEDUCED_TYPENAME base_::base_type & c)
0065         : base_(c) {}
0066 
0067     BOOST_BIMAP_NON_UNIQUE_VIEW_INSERT_FUNCTIONS
0068 
0069     unordered_multiset_view & operator=(const unordered_multiset_view & v)
0070     {
0071         this->base() = v.base();
0072         return *this;
0073     }
0074 };
0075 
0076 
0077 } // namespace views
0078 } // namespace bimaps
0079 } // namespace boost
0080 
0081 #endif // BOOST_BIMAP_VIEWS_UNORDERED_MULTISET_VIEW_HPP
0082 
0083