annotate DEPENDENCIES/generic/include/boost/bimap/views/unordered_set_view.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 // Boost.Bimap
Chris@16 2 //
Chris@16 3 // Copyright (c) 2006-2007 Matias Capeletto
Chris@16 4 //
Chris@16 5 // Distributed under the Boost Software License, Version 1.0.
Chris@16 6 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 7 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 8
Chris@16 9 /// \file views/unordered_set_view.hpp
Chris@16 10 /// \brief View of a bimap that is signature compatible with tr1::unordered_set.
Chris@16 11
Chris@16 12 #ifndef BOOST_BIMAP_VIEWS_UNORDERED_SET_VIEW_HPP
Chris@16 13 #define BOOST_BIMAP_VIEWS_UNORDERED_SET_VIEW_HPP
Chris@16 14
Chris@101 15 #if defined(_MSC_VER)
Chris@16 16 #pragma once
Chris@16 17 #endif
Chris@16 18
Chris@16 19 #include <boost/config.hpp>
Chris@16 20
Chris@16 21 #include <boost/bimap/container_adaptor/unordered_set_adaptor.hpp>
Chris@16 22 #include <boost/bimap/detail/set_view_base.hpp>
Chris@16 23
Chris@16 24 namespace boost {
Chris@16 25 namespace bimaps {
Chris@16 26 namespace views {
Chris@16 27
Chris@16 28 /// \brief View of a bimap that is signature compatible with std::unordered_set.
Chris@16 29 /**
Chris@16 30
Chris@16 31 This class uses container_adaptor and iterator_adaptor to wrapped a index of the
Chris@16 32 multi_index bimap core so it can be used as a std::unordered_set.
Chris@16 33
Chris@16 34 See also const_unordered_set_view.
Chris@16 35 **/
Chris@16 36
Chris@16 37 template< class CoreIndex >
Chris@16 38 class unordered_set_view
Chris@16 39 :
Chris@16 40 public BOOST_BIMAP_SET_VIEW_CONTAINER_ADAPTOR(
Chris@16 41 unordered_set_adaptor,
Chris@16 42 CoreIndex,
Chris@16 43 local_iterator,
Chris@16 44 const_local_iterator
Chris@16 45 ),
Chris@16 46
Chris@16 47 public ::boost::bimaps::detail::
Chris@16 48 set_view_base< unordered_set_view< CoreIndex >, CoreIndex >
Chris@16 49 {
Chris@16 50 BOOST_BIMAP_SET_VIEW_BASE_FRIEND(unordered_set_view,CoreIndex)
Chris@16 51
Chris@16 52 typedef BOOST_BIMAP_SET_VIEW_CONTAINER_ADAPTOR(
Chris@16 53 unordered_set_adaptor,
Chris@16 54 CoreIndex,
Chris@16 55 local_iterator,
Chris@16 56 const_local_iterator
Chris@16 57
Chris@16 58 ) base_;
Chris@16 59
Chris@16 60 public:
Chris@16 61
Chris@16 62 unordered_set_view(BOOST_DEDUCED_TYPENAME base_::base_type & c)
Chris@16 63 : base_(c) {}
Chris@16 64
Chris@16 65 unordered_set_view & operator=(const unordered_set_view & v)
Chris@16 66 {
Chris@16 67 this->base() = v.base();
Chris@16 68 return *this;
Chris@16 69 }
Chris@16 70 };
Chris@16 71
Chris@16 72
Chris@16 73 } // namespace views
Chris@16 74 } // namespace bimaps
Chris@16 75 } // namespace boost
Chris@16 76
Chris@16 77 #endif // BOOST_BIMAP_VIEWS_UNORDERED_SET_VIEW_HPP
Chris@16 78