File indexing completed on 2025-01-18 09:30:40
0001 #ifndef BOOST_DESCRIBE_DETAIL_PP_UTILITIES_HPP_INCLUDED
0002 #define BOOST_DESCRIBE_DETAIL_PP_UTILITIES_HPP_INCLUDED
0003
0004
0005
0006
0007
0008 #define BOOST_DESCRIBE_PP_EXPAND(x) x
0009
0010 #define BOOST_DESCRIBE_PP_CAT(x, y) BOOST_DESCRIBE_PP_CAT_I(x, y)
0011 #define BOOST_DESCRIBE_PP_CAT_I(x, ...) x ## __VA_ARGS__
0012
0013 #if defined(_MSC_VER) && !defined(__clang__)
0014
0015 #define BOOST_DESCRIBE_PP_FIRST(x) BOOST_DESCRIBE_PP_FIRST_I((x))
0016 #define BOOST_DESCRIBE_PP_FIRST_I(x) BOOST_DESCRIBE_PP_FIRST_II x
0017 #define BOOST_DESCRIBE_PP_FIRST_II(x, ...) x
0018
0019 #else
0020
0021 #define BOOST_DESCRIBE_PP_FIRST(x) BOOST_DESCRIBE_PP_FIRST_I(x)
0022 #define BOOST_DESCRIBE_PP_FIRST_I(x, ...) x
0023
0024 #endif
0025
0026 #define BOOST_DESCRIBE_PP_IS_PAREN_I(x) BOOST_DESCRIBE_PP_CAT(BOOST_DESCRIBE_PP_IS_PAREN_I_, BOOST_DESCRIBE_PP_IS_PAREN_II x)
0027 #define BOOST_DESCRIBE_PP_IS_PAREN_II(...) 0
0028 #define BOOST_DESCRIBE_PP_IS_PAREN_I_0 1,
0029 #define BOOST_DESCRIBE_PP_IS_PAREN_I_BOOST_DESCRIBE_PP_IS_PAREN_II 0,
0030
0031 #define BOOST_DESCRIBE_PP_IS_PAREN(x) BOOST_DESCRIBE_PP_FIRST(BOOST_DESCRIBE_PP_IS_PAREN_I(x))
0032
0033 #define BOOST_DESCRIBE_PP_EMPTY
0034
0035 #define BOOST_DESCRIBE_PP_IS_EMPTY(x) BOOST_DESCRIBE_PP_IS_EMPTY_I(BOOST_DESCRIBE_PP_IS_PAREN(x), BOOST_DESCRIBE_PP_IS_PAREN(x BOOST_DESCRIBE_PP_EMPTY ()))
0036 #define BOOST_DESCRIBE_PP_IS_EMPTY_I(x, y) BOOST_DESCRIBE_PP_IS_EMPTY_II(x, y)
0037 #define BOOST_DESCRIBE_PP_IS_EMPTY_II(x, y) BOOST_DESCRIBE_PP_IS_EMPTY_III(x, y)
0038 #define BOOST_DESCRIBE_PP_IS_EMPTY_III(x, y) BOOST_DESCRIBE_PP_IS_EMPTY_III_ ## x ## y
0039 #define BOOST_DESCRIBE_PP_IS_EMPTY_III_00 0
0040 #define BOOST_DESCRIBE_PP_IS_EMPTY_III_01 1
0041 #define BOOST_DESCRIBE_PP_IS_EMPTY_III_10 0
0042 #define BOOST_DESCRIBE_PP_IS_EMPTY_III_11 0
0043
0044 #define BOOST_DESCRIBE_PP_CALL(F, a, x) BOOST_DESCRIBE_PP_CAT(BOOST_DESCRIBE_PP_CALL_I_, BOOST_DESCRIBE_PP_IS_EMPTY(x))(F, a, x)
0045 #define BOOST_DESCRIBE_PP_CALL_I_0(F, a, x) F(a, x)
0046 #define BOOST_DESCRIBE_PP_CALL_I_1(F, a, x)
0047
0048 #define BOOST_DESCRIBE_PP_PARSE(x) BOOST_DESCRIBE_PP_CAT(BOOST_DESCRIBE_PP_PARSE_I_, BOOST_DESCRIBE_PP_PARSE_II x)
0049 #define BOOST_DESCRIBE_PP_PARSE_II(...) 0, (__VA_ARGS__),
0050 #define BOOST_DESCRIBE_PP_PARSE_I_BOOST_DESCRIBE_PP_PARSE_II 0, ~,
0051 #define BOOST_DESCRIBE_PP_PARSE_I_0 1
0052
0053 #if defined(_MSC_VER) && !defined(__clang__)
0054
0055 #define BOOST_DESCRIBE_PP_NAME(x) BOOST_DESCRIBE_PP_NAME_I(BOOST_DESCRIBE_PP_PARSE(x))
0056 #define BOOST_DESCRIBE_PP_NAME_I(x) BOOST_DESCRIBE_PP_NAME_II((x))
0057 #define BOOST_DESCRIBE_PP_NAME_II(x) BOOST_DESCRIBE_PP_NAME_III x
0058 #define BOOST_DESCRIBE_PP_NAME_III(x, y, z) #z
0059
0060 #else
0061
0062 #define BOOST_DESCRIBE_PP_NAME(x) BOOST_DESCRIBE_PP_NAME_I(BOOST_DESCRIBE_PP_PARSE(x))
0063 #define BOOST_DESCRIBE_PP_NAME_I(x) BOOST_DESCRIBE_PP_NAME_II(x)
0064 #define BOOST_DESCRIBE_PP_NAME_II(x, y, z) #z
0065
0066 #endif
0067
0068
0069
0070
0071 #define BOOST_DESCRIBE_PP_POINTER(C, x) BOOST_DESCRIBE_PP_POINTER_I(C, BOOST_DESCRIBE_PP_PARSE(x))
0072
0073 #define BOOST_DESCRIBE_PP_EXPAND_V(...) __VA_ARGS__
0074
0075 #if defined(_MSC_VER) && !defined(__clang__)
0076
0077 #define BOOST_DESCRIBE_PP_POINTER_I(C, x) BOOST_DESCRIBE_PP_POINTER_II((C, x))
0078 #define BOOST_DESCRIBE_PP_POINTER_II(x) BOOST_DESCRIBE_PP_POINTER_III x
0079 #define BOOST_DESCRIBE_PP_POINTER_III(C, x, y, z) BOOST_DESCRIBE_PP_POINTER_III_##x(C, y, z)
0080 #define BOOST_DESCRIBE_PP_POINTER_III_0(C, y, z) &C::z
0081 #define BOOST_DESCRIBE_PP_POINTER_III_1(C, y, z) ::boost::describe::detail::mfn<C, BOOST_DESCRIBE_PP_EXPAND_V y>(&C::z)
0082
0083 #else
0084
0085 #define BOOST_DESCRIBE_PP_POINTER_I(C, x) BOOST_DESCRIBE_PP_POINTER_II(C, x)
0086 #define BOOST_DESCRIBE_PP_POINTER_II(C, x, y, z) BOOST_DESCRIBE_PP_POINTER_III_##x(C, y, z)
0087 #define BOOST_DESCRIBE_PP_POINTER_III_0(C, y, z) &C::z
0088 #define BOOST_DESCRIBE_PP_POINTER_III_1(C, y, z) ::boost::describe::detail::mfn<C, BOOST_DESCRIBE_PP_EXPAND_V y>(&C::z)
0089
0090 #endif
0091
0092 #endif