File indexing completed on 2025-01-18 09:53:36
0001
0002
0003
0004
0005
0006
0007 #if !defined(BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_HPP)
0008 #define BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_HPP
0009
0010 #include <boost/preprocessor/comparison/equal.hpp>
0011 #include <boost/preprocessor/control/iif.hpp>
0012 #include <boost/preprocessor/tuple/elem.hpp>
0013 #include <boost/preprocessor/tuple/size.hpp>
0014 #include <boost/vmd/identity.hpp>
0015 #include <boost/vmd/is_empty.hpp>
0016 #include <boost/vmd/is_tuple.hpp>
0017
0018 #define BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_CEM(tuple) \
0019 BOOST_VMD_IS_EMPTY(BOOST_PP_TUPLE_ELEM(0,tuple)) \
0020
0021
0022 #define BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_SIZE(tuple) \
0023 BOOST_VMD_IDENTITY_RESULT \
0024 ( \
0025 BOOST_PP_IIF \
0026 ( \
0027 BOOST_PP_EQUAL(BOOST_PP_TUPLE_SIZE(tuple),1), \
0028 BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_CEM, \
0029 BOOST_VMD_IDENTITY(0) \
0030 ) \
0031 (tuple) \
0032 ) \
0033
0034
0035 #define BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_SIZE_D(d,tuple) \
0036 BOOST_VMD_IDENTITY_RESULT \
0037 ( \
0038 BOOST_PP_IIF \
0039 ( \
0040 BOOST_PP_EQUAL_D(d,BOOST_PP_TUPLE_SIZE(tuple),1), \
0041 BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_CEM, \
0042 BOOST_VMD_IDENTITY(0) \
0043 ) \
0044 (tuple) \
0045 ) \
0046
0047
0048 #define BOOST_VMD_DETAIL_IS_EMPTY_TUPLE(tuple) \
0049 BOOST_VMD_IDENTITY_RESULT \
0050 ( \
0051 BOOST_PP_IIF \
0052 ( \
0053 BOOST_VMD_IS_TUPLE(tuple), \
0054 BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_SIZE, \
0055 BOOST_VMD_IDENTITY(0) \
0056 ) \
0057 (tuple) \
0058 ) \
0059
0060
0061 #define BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_D(d,tuple) \
0062 BOOST_VMD_IDENTITY_RESULT \
0063 ( \
0064 BOOST_PP_IIF \
0065 ( \
0066 BOOST_VMD_IS_TUPLE(tuple), \
0067 BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_SIZE_D, \
0068 BOOST_VMD_IDENTITY(0) \
0069 ) \
0070 (d,tuple) \
0071 ) \
0072
0073
0074 #endif