]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/bimap/include/boost/bimap/relation/support/is_tag_of_member_at.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / bimap / include / boost / bimap / relation / support / is_tag_of_member_at.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 relation/support/is_tag_of_member_at.hpp
10/// \brief is_tag_of_member_at<tag,relation> metafunction
11
12#ifndef BOOST_BIMAP_RELATION_SUPPORT_IS_TAG_OF_MEMBER_AT_HPP
13#define BOOST_BIMAP_RELATION_SUPPORT_IS_TAG_OF_MEMBER_AT_HPP
14
15#if defined(_MSC_VER)
16#pragma once
17#endif
18
19#include <boost/config.hpp>
20
21#include <boost/bimap/relation/member_at.hpp>
22#include <boost/type_traits/is_same.hpp>
23
24#include <boost/mpl/bool.hpp>
25#include <boost/utility/enable_if.hpp>
26#include <boost/bimap/relation/support/member_with_tag.hpp>
27
28/** \struct boost::bimaps::relation::support::is_tag_of_member_at_left
29
30\brief Metafunction to test if a user tag is refering to the left member.
31
32\code
33
34template< class Tag, class Relation >
35struct is_tag_of_member_at_left : {true_|false_} {};
36
37\endcode
38
39This metafunction is somewhat redundant with member_with_tag, but it is included
40because it is a lot easier to metaprogram with it. The result type is the
41same that:
42
43\code
44
45 is_same< member_with_tag<Tag,Relation>::type , member_at::left >::type
46
47\endcode
48
49See also member_with_tag, member_at, is_tag_of_member_at_right.
50\ingroup relation_group
51 **/
52
53
54/** \struct boost::bimaps::relation::support::is_tag_of_member_at_right
55
56\brief Metafunction to test if a user tag is refering to the left member.
57
58\code
59
60template< class Tag, class Relation >
61struct is_tag_of_member_at_right : {true_|false_} {};
62
63\endcode
64
65This metafunction is somewhat redundat with member_with_tag, but it is included
66because it is a lot easier to metaprogram with it. The result type is the
67same that:
68
69\code
70
71 is_same< member_with_tag<Tag,Relation>::type , member_at::right >::type
72
73\endcode
74
75See also member_with_tag, member_at, is_tag_of_member_at_left.
76\ingroup relation_group
77 **/
78
79
80#ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
81
82namespace boost {
83namespace bimaps {
84namespace relation {
85namespace support {
86
87// Metafunction is_tag_of_member_at_left
88// Easiear metaprogramming
89
90template
91<
92 class Tag,
93 class Relation,
94 class Enable = void
95>
96struct is_tag_of_member_at_left :
97 ::boost::mpl::false_ {};
98
99template< class Tag, class Relation >
100struct is_tag_of_member_at_left
101<
102 Tag, Relation,
103 BOOST_DEDUCED_TYPENAME enable_if
104 <
105 is_same
106 <
107 BOOST_DEDUCED_TYPENAME member_with_tag<Tag,Relation>::type,
108 member_at::left
109 >
110
111 >::type
112> :
113 ::boost::mpl::true_ {};
114
115// Metafunction is_tag_of_member_at_right
116// Easiear metaprogramming
117
118template
119<
120 class Tag,
121 class Relation,
122 class Enable = void
123>
124struct is_tag_of_member_at_right :
125 ::boost::mpl::false_ {};
126
127template< class Tag, class Relation >
128struct is_tag_of_member_at_right
129<
130 Tag, Relation,
131 BOOST_DEDUCED_TYPENAME enable_if
132 <
133 is_same
134 <
135 BOOST_DEDUCED_TYPENAME member_with_tag<Tag,Relation>::type,
136 member_at::right
137 >
138
139 >::type
140> :
141 ::boost::mpl::true_ {};
142
143
144// Metafunction is_tag_of_member_at_info
145// Easiear metaprogramming
146
147template
148<
149 class Tag,
150 class Relation,
151 class Enable = void
152>
153struct is_tag_of_member_at_info :
154 ::boost::mpl::false_ {};
155
156template< class Tag, class Relation >
157struct is_tag_of_member_at_info
158<
159 Tag, Relation,
160 BOOST_DEDUCED_TYPENAME enable_if
161 <
162 is_same
163 <
164 BOOST_DEDUCED_TYPENAME member_with_tag<Tag,Relation>::type,
165 member_at::info
166 >
167
168 >::type
169> :
170 ::boost::mpl::true_ {};
171
172} // namespace support
173} // namespace relation
174} // namespace bimaps
175} // namespace boost
176
177#endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
178
179#endif // BOOST_BIMAP_RELATION_SUPPORT_IS_TAG_OF_MEMBER_AT_HPP
180
181