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_RELATION_DETAIL_METADATA_ACCESS_BUILDER_HPP
0013 #define BOOST_BIMAP_RELATION_DETAIL_METADATA_ACCESS_BUILDER_HPP
0014
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018
0019 #include <boost/config.hpp>
0020
0021 #include <boost/bimap/relation/support/is_tag_of_member_at.hpp>
0022 #include <boost/bimap/detail/debug/static_error.hpp>
0023 #include <boost/core/enable_if.hpp>
0024 #include <boost/preprocessor/cat.hpp>
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 #define BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER( \
0043 \
0044 NAME, \
0045 METADATA_BY_LEFT, \
0046 METADATA_BY_RIGHT \
0047 ) \
0048 \
0049 template \
0050 < \
0051 class Tag, \
0052 class SymmetricType, \
0053 class Enable = void \
0054 > \
0055 struct NAME \
0056 { \
0057 BOOST_BIMAP_STATIC_ERROR( \
0058 BOOST_PP_CAT(NAME,_FAILURE), \
0059 (SymmetricType,Tag) \
0060 ); \
0061 }; \
0062 \
0063 template< class Tag, class SymmetricType > \
0064 struct NAME \
0065 < \
0066 Tag, SymmetricType, \
0067 BOOST_DEDUCED_TYPENAME enable_if \
0068 < \
0069 ::boost::bimaps::relation::support::is_tag_of_member_at_left \
0070 < \
0071 Tag, \
0072 SymmetricType \
0073 > \
0074 \
0075 >::type \
0076 > \
0077 { \
0078 typedef BOOST_DEDUCED_TYPENAME SymmetricType::METADATA_BY_LEFT type; \
0079 }; \
0080 \
0081 template< class Tag, class SymmetricType > \
0082 struct NAME \
0083 < \
0084 Tag, SymmetricType, \
0085 BOOST_DEDUCED_TYPENAME enable_if \
0086 < \
0087 ::boost::bimaps::relation::support::is_tag_of_member_at_right \
0088 < \
0089 Tag, \
0090 SymmetricType \
0091 > \
0092 \
0093 >::type \
0094 > \
0095 { \
0096 typedef BOOST_DEDUCED_TYPENAME SymmetricType::METADATA_BY_RIGHT type; \
0097 };
0098
0099
0100
0101 #endif
0102
0103