3 // Copyright (c) 2006-2007 Matias Capeletto
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 relation/support/is_tag_of_member_at.hpp
10 /// \brief is_tag_of_member_at<tag,relation> metafunction
12 #ifndef BOOST_BIMAP_RELATION_SUPPORT_IS_TAG_OF_MEMBER_AT_HPP
13 #define BOOST_BIMAP_RELATION_SUPPORT_IS_TAG_OF_MEMBER_AT_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
19 #include <boost/config.hpp>
21 #include <boost/bimap/relation/member_at.hpp>
22 #include <boost/type_traits/is_same.hpp>
24 #include <boost/mpl/bool.hpp>
25 #include <boost/utility/enable_if.hpp>
26 #include <boost/bimap/relation/support/member_with_tag.hpp>
28 /** \struct boost::bimaps::relation::support::is_tag_of_member_at_left
30 \brief Metafunction to test if a user tag is refering to the left member.
34 template< class Tag, class Relation >
35 struct is_tag_of_member_at_left : {true_|false_} {};
39 This metafunction is somewhat redundant with member_with_tag, but it is included
40 because it is a lot easier to metaprogram with it. The result type is the
45 is_same< member_with_tag<Tag,Relation>::type , member_at::left >::type
49 See also member_with_tag, member_at, is_tag_of_member_at_right.
50 \ingroup relation_group
54 /** \struct boost::bimaps::relation::support::is_tag_of_member_at_right
56 \brief Metafunction to test if a user tag is refering to the left member.
60 template< class Tag, class Relation >
61 struct is_tag_of_member_at_right : {true_|false_} {};
65 This metafunction is somewhat redundat with member_with_tag, but it is included
66 because it is a lot easier to metaprogram with it. The result type is the
71 is_same< member_with_tag<Tag,Relation>::type , member_at::right >::type
75 See also member_with_tag, member_at, is_tag_of_member_at_left.
76 \ingroup relation_group
80 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
87 // Metafunction is_tag_of_member_at_left
88 // Easiear metaprogramming
96 struct is_tag_of_member_at_left :
97 ::boost::mpl::false_ {};
99 template< class Tag, class Relation >
100 struct is_tag_of_member_at_left
103 BOOST_DEDUCED_TYPENAME enable_if
107 BOOST_DEDUCED_TYPENAME member_with_tag<Tag,Relation>::type,
113 ::boost::mpl::true_ {};
115 // Metafunction is_tag_of_member_at_right
116 // Easiear metaprogramming
124 struct is_tag_of_member_at_right :
125 ::boost::mpl::false_ {};
127 template< class Tag, class Relation >
128 struct is_tag_of_member_at_right
131 BOOST_DEDUCED_TYPENAME enable_if
135 BOOST_DEDUCED_TYPENAME member_with_tag<Tag,Relation>::type,
141 ::boost::mpl::true_ {};
144 // Metafunction is_tag_of_member_at_info
145 // Easiear metaprogramming
153 struct is_tag_of_member_at_info :
154 ::boost::mpl::false_ {};
156 template< class Tag, class Relation >
157 struct is_tag_of_member_at_info
160 BOOST_DEDUCED_TYPENAME enable_if
164 BOOST_DEDUCED_TYPENAME member_with_tag<Tag,Relation>::type,
170 ::boost::mpl::true_ {};
172 } // namespace support
173 } // namespace relation
174 } // namespace bimaps
177 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
179 #endif // BOOST_BIMAP_RELATION_SUPPORT_IS_TAG_OF_MEMBER_AT_HPP