]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/bimap/property_map/unordered_set_support.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / bimap / property_map / unordered_set_support.hpp
CommitLineData
7c673cae
FG
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)
8
9/// \file property_map/unordered_set_support.hpp
10/// \brief Support for the property map concept.
11
12#ifndef BOOST_BIMAP_PROPERTY_MAP_UNORDERED_SET_SUPPORT_HPP
13#define BOOST_BIMAP_PROPERTY_MAP_UNORDERED_SET_SUPPORT_HPP
14
15#if defined(_MSC_VER)
16#pragma once
17#endif
18
19#include <boost/config.hpp>
20
7c673cae
FG
21#include <boost/bimap/unordered_set_of.hpp>
22#include <boost/bimap/support/data_type_by.hpp>
23#include <boost/bimap/support/key_type_by.hpp>
24
25#ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
26
27namespace boost {
28
1e59de90
TL
29template <typename PA> struct property_traits;
30struct readable_property_map_tag;
31
7c673cae
FG
32template< class Tag, class Bimap >
33struct property_traits< ::boost::bimaps::views::unordered_map_view<Tag,Bimap> >
34{
35 typedef BOOST_DEDUCED_TYPENAME
36 ::boost::bimaps::support::data_type_by<Tag,Bimap>::type value_type;
37 typedef BOOST_DEDUCED_TYPENAME
38 ::boost::bimaps::support:: key_type_by<Tag,Bimap>::type key_type;
39
40 typedef readable_property_map_tag category;
41};
42
43
44template< class Tag, class Bimap >
45const BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::data_type_by<Tag,Bimap>::type &
46 get(const ::boost::bimaps::views::unordered_map_view<Tag,Bimap> & m,
47 const BOOST_DEDUCED_TYPENAME
48 ::boost::bimaps::support::key_type_by<Tag,Bimap>::type & key)
49{
50 return m.at(key);
51}
52
53} // namespace boost
54
55#endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
56
57#endif // BOOST_BIMAP_PROPERTY_MAP_UNORDERED_SET_SUPPORT_HPP