File indexing completed on 2025-01-18 09:29:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_BIMAP_RELATION_SYMMETRICAL_BASE_HPP
0013 #define BOOST_BIMAP_RELATION_SYMMETRICAL_BASE_HPP
0014
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018
0019 #include <boost/config.hpp>
0020
0021 #include <boost/mpl/if.hpp>
0022 #include <boost/type_traits/remove_const.hpp>
0023
0024
0025 #include <boost/bimap/tags/tagged.hpp>
0026 #include <boost/bimap/tags/support/default_tagged.hpp>
0027
0028 #include <boost/bimap/relation/member_at.hpp>
0029
0030
0031 namespace boost {
0032 namespace bimaps {
0033 namespace relation {
0034
0035
0036
0037
0038
0039
0040 template< class TA, class TB, bool force_mutable = false >
0041 class symmetrical_base
0042 {
0043
0044 public:
0045
0046 typedef BOOST_DEDUCED_TYPENAME tags::support::default_tagged
0047 <
0048 TA,
0049 member_at::left
0050
0051 >::type tagged_left_type;
0052
0053 typedef BOOST_DEDUCED_TYPENAME tags::support::default_tagged
0054 <
0055 TB,
0056 member_at::right
0057
0058 >::type tagged_right_type;
0059
0060 public:
0061
0062
0063
0064
0065 typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c< force_mutable,
0066
0067 BOOST_DEDUCED_TYPENAME ::boost::remove_const<
0068 BOOST_DEDUCED_TYPENAME tagged_left_type::value_type >::type,
0069 BOOST_DEDUCED_TYPENAME tagged_left_type::value_type
0070
0071 >::type left_value_type;
0072
0073 typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c< force_mutable,
0074
0075 BOOST_DEDUCED_TYPENAME ::boost::remove_const<
0076 BOOST_DEDUCED_TYPENAME tagged_right_type::value_type >::type,
0077 BOOST_DEDUCED_TYPENAME tagged_right_type::value_type
0078
0079 >::type right_value_type;
0080
0081
0082
0083
0084 typedef BOOST_DEDUCED_TYPENAME tagged_left_type ::tag left_tag;
0085 typedef BOOST_DEDUCED_TYPENAME tagged_right_type::tag right_tag;
0086
0087 };
0088
0089
0090
0091 }
0092 }
0093 }
0094
0095
0096 #endif
0097