File indexing completed on 2025-01-18 09:53:36
0001
0002
0003
0004
0005
0006
0007 #if !defined(BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_HPP)
0008 #define BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_HPP
0009
0010 #include <boost/preprocessor/comparison/equal.hpp>
0011 #include <boost/preprocessor/control/iif.hpp>
0012 #include <boost/preprocessor/logical/bitor.hpp>
0013 #include <boost/preprocessor/punctuation/is_begin_parens.hpp>
0014 #include <boost/preprocessor/variadic/size.hpp>
0015 #include <boost/preprocessor/variadic/elem.hpp>
0016 #include <boost/vmd/identity.hpp>
0017 #include <boost/vmd/is_empty.hpp>
0018 #include <boost/vmd/detail/identifier_concat.hpp>
0019
0020 #define BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_VSEQ_RESULT(ignored) \
0021 BOOST_VMD_IDENTITY_RESULT \
0022 ( \
0023 BOOST_VMD_IDENTITY(1)(ignored) \
0024 ) \
0025
0026
0027 #define BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_VSEQ_ID(vseq) \
0028 BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_VSEQ_RESULT(BOOST_VMD_DETAIL_IDENTIFIER_CONCATENATE(vseq)) \
0029
0030
0031 #define BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_VSEQ(vseq) \
0032 BOOST_VMD_IDENTITY_RESULT \
0033 ( \
0034 BOOST_PP_IIF \
0035 ( \
0036 BOOST_PP_BITOR \
0037 ( \
0038 BOOST_VMD_IS_EMPTY(vseq), \
0039 BOOST_PP_IS_BEGIN_PARENS(vseq) \
0040 ), \
0041 BOOST_VMD_IDENTITY(0), \
0042 BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_VSEQ_ID \
0043 ) \
0044 (vseq) \
0045 ) \
0046
0047
0048 #define BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_SINGLE(...) \
0049 BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_VSEQ(BOOST_PP_VARIADIC_ELEM(0,__VA_ARGS__)) \
0050
0051
0052 #define BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER(...) \
0053 BOOST_VMD_IDENTITY_RESULT \
0054 ( \
0055 BOOST_PP_IIF \
0056 ( \
0057 BOOST_PP_EQUAL(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),1), \
0058 BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER_SINGLE, \
0059 BOOST_VMD_IDENTITY(0) \
0060 ) \
0061 (__VA_ARGS__) \
0062 ) \
0063
0064
0065 #endif