Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:34:16

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 property_map/unordered_set_support.hpp
0010 /// \brief Support for the property map concept.
0011 
0012 #ifndef BOOST_BIMAP_PROPERTY_MAP_UNORDERED_SET_SUPPORT_HPP
0013 #define BOOST_BIMAP_PROPERTY_MAP_UNORDERED_SET_SUPPORT_HPP
0014 
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018 
0019 #include <boost/config.hpp>
0020 
0021 #include <boost/bimap/unordered_set_of.hpp>
0022 #include <boost/bimap/support/data_type_by.hpp>
0023 #include <boost/bimap/support/key_type_by.hpp>
0024 
0025 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
0026 
0027 namespace boost {
0028 
0029 template <typename PA> struct property_traits;
0030 struct readable_property_map_tag;
0031 
0032 template< class Tag, class Bimap >
0033 struct property_traits< ::boost::bimaps::views::unordered_map_view<Tag,Bimap> >
0034 {
0035     typedef BOOST_DEDUCED_TYPENAME
0036         ::boost::bimaps::support::data_type_by<Tag,Bimap>::type value_type;
0037     typedef BOOST_DEDUCED_TYPENAME
0038         ::boost::bimaps::support:: key_type_by<Tag,Bimap>::type   key_type;
0039 
0040     typedef readable_property_map_tag category;
0041 };
0042 
0043 
0044 template< class Tag, class Bimap >
0045 const BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::data_type_by<Tag,Bimap>::type &
0046     get(const ::boost::bimaps::views::unordered_map_view<Tag,Bimap> & m,
0047         const BOOST_DEDUCED_TYPENAME
0048             ::boost::bimaps::support::key_type_by<Tag,Bimap>::type & key)
0049 {
0050     return m.at(key);
0051 }
0052 
0053 } // namespace boost
0054 
0055 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
0056 
0057 #endif // BOOST_BIMAP_PROPERTY_MAP_UNORDERED_SET_SUPPORT_HPP