]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/bimap/include/boost/bimap/relation/support/value_type_of.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / bimap / include / boost / bimap / relation / support / value_type_of.hpp
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 relation/support/value_type_of.hpp
10 /// \brief value_type_of<tag,relation> metafunction
11
12 #ifndef BOOST_BIMAP_RELATION_SUPPORT_VALUE_TYPE_OF_HPP
13 #define BOOST_BIMAP_RELATION_SUPPORT_VALUE_TYPE_OF_HPP
14
15 #if defined(_MSC_VER)
16 #pragma once
17 #endif
18
19 #include <boost/config.hpp>
20
21 #include <boost/bimap/relation/detail/metadata_access_builder.hpp>
22
23 /** \struct boost::bimaps::relation::support::value_type_of
24
25 \brief Metafunction to obtain the value type of one of the sides.
26
27 \code
28
29 template< class Tag, class Relation >
30 struct value_type_of
31 {
32 typedef typename Relation::{side}_type type;
33 };
34
35 \endcode
36
37 See also member_at, get().
38 \ingroup relation_group
39 **/
40
41 namespace boost {
42 namespace bimaps {
43 namespace relation {
44 namespace support {
45
46 // Metafunction value_type_of
47 /*
48
49 template< class Tag, class Relation >
50 struct value_type_of
51 {
52 typedef -unspecified- type;
53 };
54
55 */
56
57 BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
58 (
59 value_type_of,
60 left_value_type,
61 right_value_type
62 )
63
64 // Add support for info tags to value_type_of
65
66 template< class Tag, class SymmetricType >
67 struct value_type_of
68 <
69 Tag, SymmetricType,
70 BOOST_DEDUCED_TYPENAME enable_if
71 <
72 ::boost::bimaps::relation::support::is_tag_of_member_at_info
73 <
74 Tag,
75 SymmetricType
76 >
77
78 >::type
79 >
80 {
81 typedef BOOST_DEDUCED_TYPENAME SymmetricType::info_type type;
82 };
83
84 } // namespace support
85 } // namespace relation
86 } // namespace bimaps
87 } // namespace boost
88
89
90 #endif // BOOST_BIMAP_RELATION_SUPPORT_VALUE_TYPE_OF_HPP
91