Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:37

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 container_adaptor/unordered_set_adaptor.hpp
0010 /// \brief Container adaptor to easily build a std::unordered_set signature compatible container.
0011 
0012 #ifndef BOOST_BIMAP_CONTAINER_ADAPTOR_UNORDERED_SET_ADAPTOR_HPP
0013 #define BOOST_BIMAP_CONTAINER_ADAPTOR_UNORDERED_SET_ADAPTOR_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_associative_container_adaptor.hpp>
0022 #include <boost/mpl/aux_/na.hpp>
0023 #include <boost/mpl/vector.hpp>
0024 
0025 namespace boost {
0026 namespace bimaps {
0027 namespace container_adaptor {
0028 
0029 /// \brief Container adaptor to easily build a std::unordered_set signature compatible container.
0030 
0031 template
0032 <
0033     class Base,
0034 
0035     class Iterator,
0036     class ConstIterator,
0037     class LocalIterator,
0038     class ConstLocalIterator,
0039 
0040     class IteratorToBaseConverter        = ::boost::mpl::na,
0041     class IteratorFromBaseConverter      = ::boost::mpl::na,
0042     class LocalIteratorFromBaseConverter = ::boost::mpl::na,
0043     class ValueToBaseConverter           = ::boost::mpl::na,
0044     class ValueFromBaseConverter         = ::boost::mpl::na,
0045     class KeyToBaseConverter             = ::boost::mpl::na,
0046 
0047     class FunctorsFromDerivedClasses = mpl::vector<>
0048 >
0049 class unordered_set_adaptor :
0050 
0051     public ::boost::bimaps::container_adaptor::
0052                 unordered_associative_container_adaptor
0053     <
0054         Base,
0055         Iterator, ConstIterator, LocalIterator, ConstLocalIterator,
0056         BOOST_DEDUCED_TYPENAME Iterator::value_type,
0057         IteratorToBaseConverter, IteratorFromBaseConverter,
0058         LocalIteratorFromBaseConverter,
0059         ValueToBaseConverter, ValueFromBaseConverter,
0060         KeyToBaseConverter,
0061         FunctorsFromDerivedClasses
0062     >
0063 {
0064     typedef ::boost::bimaps::container_adaptor::
0065                 unordered_associative_container_adaptor
0066     <
0067         Base,
0068         Iterator, ConstIterator, LocalIterator, ConstLocalIterator,
0069         BOOST_DEDUCED_TYPENAME Iterator::value_type,
0070         IteratorToBaseConverter, IteratorFromBaseConverter,
0071         LocalIteratorFromBaseConverter,
0072         ValueToBaseConverter, ValueFromBaseConverter,
0073         KeyToBaseConverter,
0074         FunctorsFromDerivedClasses
0075 
0076     > base_;
0077 
0078     // Access -----------------------------------------------------------------
0079 
0080     public:
0081 
0082     explicit unordered_set_adaptor(Base & c) :
0083         base_(c) {}
0084 
0085     protected:
0086 
0087     typedef unordered_set_adaptor unordered_set_adaptor_;
0088 
0089 };
0090 
0091 
0092 } // namespace container_adaptor
0093 } // namespace bimaps
0094 } // namespace boost
0095 
0096 
0097 #endif // BOOST_BIMAP_CONTAINER_ADAPTOR_UNORDERED_SET_ADAPTOR_HPP
0098