Project revived from Feb2017
[EroSomnia.git] / deps / boost_1_63_0 / boost / bimap / property_map / set_support.hpp
blobdcbad2f5eaedc6c48fd9b03e554d649777ee67aa
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 property_map/set_support.hpp
10 /// \brief Support for the property map concept.
12 #ifndef BOOST_BIMAP_PROPERTY_MAP_SET_SUPPORT_HPP
13 #define BOOST_BIMAP_PROPERTY_MAP_SET_SUPPORT_HPP
15 #if defined(_MSC_VER)
16 #pragma once
17 #endif
19 #include <boost/config.hpp>
21 #include <boost/property_map/property_map.hpp>
22 #include <boost/bimap/set_of.hpp>
23 #include <boost/bimap/support/data_type_by.hpp>
24 #include <boost/bimap/support/key_type_by.hpp>
26 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
28 namespace boost {
30 template< class Tag, class Bimap >
31 struct property_traits< ::boost::bimaps::views::map_view<Tag,Bimap> >
33 typedef BOOST_DEDUCED_TYPENAME
34 ::boost::bimaps::support::data_type_by<Tag,Bimap>::type value_type;
35 typedef BOOST_DEDUCED_TYPENAME
36 ::boost::bimaps::support:: key_type_by<Tag,Bimap>::type key_type;
38 typedef readable_property_map_tag category;
42 template< class Tag, class Bimap >
43 const BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::data_type_by<Tag,Bimap>::type &
44 get(const ::boost::bimaps::views::map_view<Tag,Bimap> & m,
45 const BOOST_DEDUCED_TYPENAME
46 ::boost::bimaps::support::key_type_by<Tag,Bimap>::type & key)
48 return m.at(key);
51 } // namespace boost
53 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
55 #endif // BOOST_BIMAP_PROPERTY_MAP_SET_SUPPORT_HPP