File indexing completed on 2025-01-18 09:43:28
0001
0002
0003
0004
0005
0006 #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_CONVERT_BINARY_SEQ_HPP
0007 #define BOOST_PARAMETER_AUX_PREPROCESSOR_CONVERT_BINARY_SEQ_HPP
0008
0009 #include <boost/preprocessor/seq/size.hpp>
0010 #include <boost/preprocessor/seq/push_back.hpp>
0011
0012 #define BOOST_PARAMETER_AUX_PP_AUGMENT_BINARY_SEQ_INDEX_FOLD_OP(s, seq, idx) \
0013 BOOST_PP_SEQ_PUSH_BACK(seq, (idx, BOOST_PP_SEQ_SIZE(seq)))
0014
0015
0016 #include <boost/preprocessor/control/iif.hpp>
0017 #include <boost/preprocessor/seq/elem.hpp>
0018 #include <boost/preprocessor/tuple/elem.hpp>
0019
0020 #define BOOST_PARAMETER_AUX_PP_CONVERT_BINARY_SEQ_FOLD_OP(s, seq, elem) \
0021 ( \
0022 BOOST_PP_SEQ_PUSH_BACK( \
0023 BOOST_PP_SEQ_ELEM(0, seq) \
0024 , BOOST_PP_IIF( \
0025 BOOST_PP_TUPLE_ELEM(2, 0, elem) \
0026 , BOOST_PP_SEQ_ELEM(2, seq) \
0027 , BOOST_PP_SEQ_ELEM(1, seq) \
0028 )(BOOST_PP_TUPLE_ELEM(2, 1, elem), BOOST_PP_SEQ_ELEM(3, seq)) \
0029 ) \
0030 )(BOOST_PP_SEQ_ELEM(1, seq))(BOOST_PP_SEQ_ELEM(2, seq)) \
0031 (BOOST_PP_SEQ_ELEM(3, seq))
0032
0033
0034 #include <boost/parameter/aux_/preprocessor/seq_enum.hpp>
0035 #include <boost/preprocessor/facilities/empty.hpp>
0036 #include <boost/preprocessor/seq/seq.hpp>
0037 #include <boost/preprocessor/seq/fold_left.hpp>
0038
0039 #define BOOST_PARAMETER_AUX_PP_CONVERT_BINARY_SEQ(seq, macro0, macro1, data) \
0040 BOOST_PARAMETER_SEQ_ENUM( \
0041 BOOST_PP_SEQ_ELEM( \
0042 0 \
0043 , BOOST_PP_SEQ_FOLD_LEFT( \
0044 BOOST_PARAMETER_AUX_PP_CONVERT_BINARY_SEQ_FOLD_OP \
0045 , (BOOST_PP_SEQ_NIL)(macro0)(macro1)(data) \
0046 , BOOST_PP_SEQ_FOLD_LEFT( \
0047 BOOST_PARAMETER_AUX_PP_AUGMENT_BINARY_SEQ_INDEX_FOLD_OP \
0048 , BOOST_PP_EMPTY() \
0049 , seq \
0050 ) \
0051 ) \
0052 ) \
0053 )
0054
0055
0056 #endif
0057