File indexing completed on 2025-01-18 09:29:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_BIMAP_DETAIL_MANAGE_ADDITIONAL_PARAMETERS_HPP
0013 #define BOOST_BIMAP_DETAIL_MANAGE_ADDITIONAL_PARAMETERS_HPP
0014
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018
0019 #include <boost/config.hpp>
0020
0021 #include <memory>
0022
0023
0024 #include <boost/mpl/bool.hpp>
0025 #include <boost/mpl/if.hpp>
0026 #include <boost/mpl/aux_/na.hpp>
0027 #include <boost/type_traits/is_same.hpp>
0028
0029 #include <boost/bimap/detail/is_set_type_of.hpp>
0030
0031 namespace boost {
0032 namespace bimaps {
0033
0034 template< class Type >
0035 struct with_info
0036 {
0037 typedef Type value_type;
0038 };
0039
0040 namespace detail {
0041
0042
0043
0044 template< class Type >
0045 struct is_with_info : ::boost::mpl::false_ {};
0046
0047 template< class ValueType >
0048 struct is_with_info< with_info<ValueType> > : ::boost::mpl::true_ {};
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
0072
0073 template< class AP1, class AP2, class AP3 >
0074 struct manage_additional_parameters
0075 {
0076
0077
0078
0079
0080
0081
0082
0083 struct case_NNN
0084 {
0085 typedef left_based set_type_of_relation;
0086 typedef std::allocator<char> allocator;
0087 typedef ::boost::mpl::na additional_info;
0088 };
0089
0090
0091
0092
0093
0094
0095
0096 struct case_ANN
0097 {
0098 typedef left_based set_type_of_relation;
0099 typedef AP1 allocator;
0100 typedef ::boost::mpl::na additional_info;
0101 };
0102
0103
0104
0105
0106
0107
0108
0109
0110 struct case_SNN
0111 {
0112 typedef AP1 set_type_of_relation;
0113 typedef std::allocator<char> allocator;
0114 typedef ::boost::mpl::na additional_info;
0115 };
0116
0117
0118
0119
0120
0121
0122
0123
0124 struct case_SAN
0125 {
0126 typedef AP1 set_type_of_relation;
0127 typedef AP2 allocator;
0128 typedef ::boost::mpl::na additional_info;
0129 };
0130
0131
0132
0133
0134
0135
0136
0137 struct case_HNN
0138 {
0139 typedef left_based set_type_of_relation;
0140 typedef std::allocator<char> allocator;
0141 typedef BOOST_DEDUCED_TYPENAME AP1::value_type additional_info;
0142 };
0143
0144
0145
0146
0147
0148
0149
0150
0151 struct case_SHN
0152 {
0153 typedef AP1 set_type_of_relation;
0154 typedef std::allocator<char> allocator;
0155 typedef BOOST_DEDUCED_TYPENAME AP2::value_type additional_info;
0156 };
0157
0158
0159
0160
0161
0162
0163
0164
0165 struct case_HAN
0166 {
0167 typedef left_based set_type_of_relation;
0168 typedef AP2 allocator;
0169 typedef BOOST_DEDUCED_TYPENAME AP1::value_type additional_info;
0170 };
0171
0172
0173
0174
0175
0176
0177
0178
0179 struct case_SHA
0180 {
0181 typedef AP1 set_type_of_relation;
0182 typedef AP2 allocator;
0183 typedef BOOST_DEDUCED_TYPENAME AP2::value_type additional_info;
0184 };
0185
0186
0187
0188 typedef BOOST_DEDUCED_TYPENAME mpl::if_
0189 <
0190 ::boost::mpl::is_na<AP1>,
0191 case_NNN,
0192 BOOST_DEDUCED_TYPENAME mpl::if_
0193 <
0194 ::boost::mpl::is_na<AP2>,
0195 BOOST_DEDUCED_TYPENAME mpl::if_
0196 <
0197 is_set_type_of_relation<AP1>,
0198 case_SNN,
0199 BOOST_DEDUCED_TYPENAME mpl::if_
0200 <
0201 is_with_info<AP1>,
0202 case_HNN,
0203 case_ANN
0204
0205 >::type
0206
0207 >::type,
0208 BOOST_DEDUCED_TYPENAME mpl::if_
0209 <
0210 ::boost::mpl::is_na<AP3>,
0211 BOOST_DEDUCED_TYPENAME mpl::if_
0212 <
0213 is_with_info<AP1>,
0214 case_HAN,
0215 BOOST_DEDUCED_TYPENAME mpl::if_
0216 <
0217 is_with_info<AP2>,
0218 case_SHN,
0219 case_SAN
0220
0221 >::type
0222
0223 >::type,
0224
0225 case_SHA
0226
0227 >::type
0228
0229 >::type
0230
0231 >::type type;
0232
0233 };
0234
0235 #endif
0236
0237 }
0238 }
0239 }
0240
0241
0242 #endif
0243