File indexing completed on 2025-01-18 09:31:07
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_FUSION_ADAPTER_ADT_DETAIL_ADAPT_BASE_ASSOC_ATTR_FILLER_HPP
0009 #define BOOST_FUSION_ADAPTER_ADT_DETAIL_ADAPT_BASE_ASSOC_ATTR_FILLER_HPP
0010
0011 #include <boost/config.hpp>
0012
0013 #include <boost/fusion/adapted/struct/detail/adapt_auto.hpp>
0014 #include <boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp>
0015
0016 #include <boost/mpl/aux_/preprocessor/token_equal.hpp>
0017
0018 #include <boost/preprocessor/config/config.hpp>
0019 #include <boost/preprocessor/control/iif.hpp>
0020 #include <boost/preprocessor/variadic/size.hpp>
0021 #include <boost/preprocessor/arithmetic/dec.hpp>
0022
0023 #if BOOST_PP_VARIADICS
0024
0025 #define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(...) \
0026 BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(__VA_ARGS__) \
0027 BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1
0028
0029 #define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1(...) \
0030 BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(__VA_ARGS__) \
0031 BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0
0032
0033 #define BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(...) \
0034 ((BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), (__VA_ARGS__)))
0035
0036 #else
0037
0038 #define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(A, B, C, D, E) \
0039 BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(A, B, C, D, E) \
0040 BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1
0041
0042 #define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1(A, B, C, D, E) \
0043 BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(A, B, C, D, E) \
0044 BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0
0045
0046 #define BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(A, B, C, D, E) \
0047 BOOST_PP_IIF(BOOST_MPL_PP_TOKEN_EQUAL(auto, A), \
0048 ((3, (C,D,E))), \
0049 ((5, (A,B,C,D,E))) \
0050 )
0051
0052 #endif
0053
0054 #define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0_END
0055 #define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1_END
0056
0057
0058 #define BOOST_FUSION_ADAPT_ASSOC_ADT_WRAPPEDATTR_GET_KEY(ATTRIBUTE) \
0059 BOOST_PP_TUPLE_ELEM( \
0060 BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), \
0061 BOOST_PP_DEC(BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE)), \
0062 BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR(ATTRIBUTE))
0063
0064 #endif