Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:35

0001 
0002 //  (C) Copyright Edward Diener 2011-2015
0003 //  Use, modification and distribution are subject to the Boost Software License,
0004 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0005 //  http://www.boost.org/LICENSE_1_0.txt).
0006 
0007 #if !defined(BOOST_VMD_DETAIL_EQUAL_1_HPP)
0008 #define BOOST_VMD_DETAIL_EQUAL_1_HPP
0009 
0010 #include <boost/vmd/detail/recurse/equal/equal_headers.hpp>
0011 
0012 #define BOOST_VMD_DETAIL_EQUAL_1_CNI_CHK(vseq1,vseq2,vtype) \
0013     BOOST_PP_IIF \
0014         ( \
0015         BOOST_PP_BITOR \
0016             ( \
0017             BOOST_PP_BITOR \
0018                 ( \
0019                 BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_ARRAY), \
0020                 BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_LIST) \
0021                 ), \
0022             BOOST_PP_BITOR \
0023                 ( \
0024                 BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_SEQ), \
0025                 BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_TUPLE) \
0026                 ) \
0027             ), \
0028         BOOST_VMD_DETAIL_DATA_EQUAL_1, \
0029         BOOST_VMD_DETAIL_EQUAL_CNI_SMP \
0030         ) \
0031     (vseq1,vseq2,vtype) \
0032 /**/
0033 
0034 #define BOOST_VMD_DETAIL_EQUAL_1_CNI_CHK_D(d,vseq1,vseq2,vtype) \
0035     BOOST_PP_IIF \
0036         ( \
0037         BOOST_PP_BITOR \
0038             ( \
0039             BOOST_PP_BITOR \
0040                 ( \
0041                 BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_ARRAY), \
0042                 BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_LIST) \
0043                 ), \
0044             BOOST_PP_BITOR \
0045                 ( \
0046                 BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_SEQ), \
0047                 BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_TUPLE) \
0048                 ) \
0049             ), \
0050         BOOST_VMD_DETAIL_DATA_EQUAL_1_D, \
0051         BOOST_VMD_DETAIL_EQUAL_CNI_SMP_D \
0052         ) \
0053     (d,vseq1,vseq2,vtype) \
0054 /**/
0055 
0056 #define BOOST_VMD_DETAIL_EQUAL_1_VSEQ(vseq1,vseq2,vtype) \
0057     BOOST_VMD_DETAIL_DATA_EQUAL_1 \
0058         ( \
0059         BOOST_VMD_TO_SEQ(vseq1), \
0060         BOOST_VMD_TO_SEQ(vseq2), \
0061         BOOST_VMD_TYPE_SEQ \
0062         ) \
0063 /**/
0064 
0065 #define BOOST_VMD_DETAIL_EQUAL_1_VSEQ_D(d,vseq1,vseq2,vtype) \
0066     BOOST_VMD_DETAIL_DATA_EQUAL_1_D \
0067         ( \
0068         d, \
0069         BOOST_VMD_TO_SEQ_D(d,vseq1), \
0070         BOOST_VMD_TO_SEQ_D(d,vseq2), \
0071         BOOST_VMD_TYPE_SEQ \
0072         ) \
0073 /**/
0074 
0075 #define BOOST_VMD_DETAIL_EQUAL_1_CNI(vseq1,vseq2,vtype) \
0076     BOOST_PP_IIF \
0077         ( \
0078         BOOST_VMD_DETAIL_EQUAL_TYPE \
0079             ( \
0080             vtype, \
0081             BOOST_VMD_TYPE_SEQUENCE \
0082             ), \
0083         BOOST_VMD_DETAIL_EQUAL_1_VSEQ, \
0084         BOOST_VMD_DETAIL_EQUAL_1_CNI_CHK \
0085         ) \
0086     (vseq1,vseq2,vtype) \
0087 /**/
0088 
0089 #define BOOST_VMD_DETAIL_EQUAL_1_CNI_D(d,vseq1,vseq2,vtype) \
0090     BOOST_PP_IIF \
0091         ( \
0092         BOOST_VMD_DETAIL_EQUAL_TYPE_D \
0093             ( \
0094             d, \
0095             vtype, \
0096             BOOST_VMD_TYPE_SEQUENCE \
0097             ), \
0098         BOOST_VMD_DETAIL_EQUAL_1_VSEQ_D, \
0099         BOOST_VMD_DETAIL_EQUAL_1_CNI_CHK_D \
0100         ) \
0101     (d,vseq1,vseq2,vtype) \
0102 /**/
0103 
0104 #define BOOST_VMD_DETAIL_EQUAL_1_WT_CHECK(vseq1,vseq2,vtype1,vtype2) \
0105     BOOST_VMD_IDENTITY_RESULT \
0106         ( \
0107         BOOST_PP_IIF \
0108             ( \
0109             BOOST_VMD_DETAIL_EQUAL_TYPE \
0110                 ( \
0111                 vtype1, \
0112                 vtype2 \
0113                 ), \
0114             BOOST_VMD_DETAIL_EQUAL_1_CNI, \
0115             BOOST_VMD_IDENTITY(0) \
0116             ) \
0117         (vseq1,vseq2,vtype1) \
0118         ) \
0119 /**/
0120 
0121 #define BOOST_VMD_DETAIL_EQUAL_1_WT_CHECK_D(d,vseq1,vseq2,vtype1,vtype2) \
0122     BOOST_VMD_IDENTITY_RESULT \
0123         ( \
0124         BOOST_PP_IIF \
0125             ( \
0126             BOOST_VMD_DETAIL_EQUAL_TYPE_D \
0127                 ( \
0128                 d, \
0129                 vtype1, \
0130                 vtype2 \
0131                 ), \
0132             BOOST_VMD_DETAIL_EQUAL_1_CNI_D, \
0133             BOOST_VMD_IDENTITY(0) \
0134             ) \
0135         (d,vseq1,vseq2,vtype1) \
0136         ) \
0137 /**/
0138 
0139 #define BOOST_VMD_DETAIL_EQUAL_1_WT_CONVERT(vseq1,vseq2,vtype1,vtype2) \
0140     BOOST_VMD_DETAIL_EQUAL_1_WT_CHECK \
0141         ( \
0142         vseq1, \
0143         vseq2, \
0144         BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE(vseq1,vtype1), \
0145         BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE(vseq2,vtype2) \
0146         ) \
0147 /**/
0148 
0149 #define BOOST_VMD_DETAIL_EQUAL_1_WT_CONVERT_D(d,vseq1,vseq2,vtype1,vtype2) \
0150     BOOST_VMD_DETAIL_EQUAL_1_WT_CHECK_D \
0151         ( \
0152         d, \
0153         vseq1, \
0154         vseq2, \
0155         BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE_D(d,vseq1,vtype1), \
0156         BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE_D(d,vseq2,vtype2) \
0157         ) \
0158 /**/
0159 
0160 #define BOOST_VMD_DETAIL_EQUAL_1_WT(vseq1,vseq2,vtype1,vtype2) \
0161     BOOST_VMD_IDENTITY_RESULT \
0162         ( \
0163         BOOST_PP_IIF \
0164             ( \
0165             BOOST_VMD_DETAIL_EQUAL_IS_TUPLE_MISMATCH(vseq1,vseq2,vtype1,vtype2), \
0166             BOOST_VMD_IDENTITY(0), \
0167             BOOST_VMD_DETAIL_EQUAL_1_WT_CONVERT \
0168             ) \
0169         (vseq1,vseq2,vtype1,vtype2) \
0170         ) \
0171 /**/
0172 
0173 #define BOOST_VMD_DETAIL_EQUAL_1_WT_D(d,vseq1,vseq2,vtype1,vtype2) \
0174     BOOST_VMD_IDENTITY_RESULT \
0175         ( \
0176         BOOST_PP_IIF \
0177             ( \
0178             BOOST_VMD_DETAIL_EQUAL_IS_TUPLE_MISMATCH_D(d,vseq1,vseq2,vtype1,vtype2), \
0179             BOOST_VMD_IDENTITY(0), \
0180             BOOST_VMD_DETAIL_EQUAL_1_WT_CONVERT_D \
0181             ) \
0182         (d,vseq1,vseq2,vtype1,vtype2) \
0183         ) \
0184 /**/
0185 
0186 #define BOOST_VMD_DETAIL_EQUAL_1_GTYPE(vseq1,vseq2) \
0187     BOOST_VMD_DETAIL_EQUAL_1_WT \
0188         ( \
0189         vseq1, \
0190         vseq2, \
0191         BOOST_VMD_GET_TYPE(vseq1,BOOST_VMD_RETURN_TYPE_TUPLE), \
0192         BOOST_VMD_GET_TYPE(vseq2,BOOST_VMD_RETURN_TYPE_TUPLE) \
0193         ) \
0194 /**/
0195 
0196 #define BOOST_VMD_DETAIL_EQUAL_1_GTYPE_D(d,vseq1,vseq2) \
0197     BOOST_VMD_DETAIL_EQUAL_1_WT_D \
0198         ( \
0199         d, \
0200         vseq1, \
0201         vseq2, \
0202         BOOST_VMD_GET_TYPE_D(d,vseq1,BOOST_VMD_RETURN_TYPE_TUPLE), \
0203         BOOST_VMD_GET_TYPE_D(d,vseq2,BOOST_VMD_RETURN_TYPE_TUPLE) \
0204         ) \
0205 /**/
0206 
0207 #define BOOST_VMD_DETAIL_EQUAL_1_EBP(vseq1,vseq2,be1,be2) \
0208     BOOST_VMD_IDENTITY_RESULT \
0209         ( \
0210         BOOST_PP_IIF \
0211             ( \
0212             BOOST_PP_BITAND \
0213                 ( \
0214                 BOOST_VMD_DETAIL_EQUAL_CHK_MATCH(be1,be2), \
0215                 BOOST_VMD_DETAIL_EQUAL_CHK_PARENS_MATCH(vseq1,vseq2) \
0216                 ), \
0217             BOOST_VMD_DETAIL_EQUAL_1_GTYPE, \
0218             BOOST_VMD_IDENTITY(0) \
0219             ) \
0220         (vseq1,vseq2) \
0221         ) \
0222 /**/
0223 
0224 #define BOOST_VMD_DETAIL_EQUAL_1_EBP_D(d,vseq1,vseq2,be1,be2) \
0225     BOOST_VMD_IDENTITY_RESULT \
0226         ( \
0227         BOOST_PP_IIF \
0228             ( \
0229             BOOST_PP_BITAND \
0230                 ( \
0231                 BOOST_VMD_DETAIL_EQUAL_CHK_MATCH(be1,be2), \
0232                 BOOST_VMD_DETAIL_EQUAL_CHK_PARENS_MATCH(vseq1,vseq2) \
0233                 ), \
0234             BOOST_VMD_DETAIL_EQUAL_1_GTYPE_D, \
0235             BOOST_VMD_IDENTITY(0) \
0236             ) \
0237         (d,vseq1,vseq2) \
0238         ) \
0239 /**/
0240 
0241 #define BOOST_VMD_DETAIL_EQUAL_1_EMPTY(vseq1,vseq2,be1,be2) \
0242     BOOST_PP_IIF \
0243         ( \
0244         BOOST_PP_BITAND(be1,be2), \
0245         BOOST_VMD_DETAIL_EQUAL_BOTH_EMPTY, \
0246         BOOST_VMD_DETAIL_EQUAL_1_EBP \
0247         ) \
0248     (vseq1,vseq2,be1,be2) \
0249 /**/
0250 
0251 #define BOOST_VMD_DETAIL_EQUAL_1_EMPTY_D(d,vseq1,vseq2,be1,be2) \
0252     BOOST_PP_IIF \
0253         ( \
0254         BOOST_PP_BITAND(be1,be2), \
0255         BOOST_VMD_DETAIL_EQUAL_BOTH_EMPTY, \
0256         BOOST_VMD_DETAIL_EQUAL_1_EBP_D \
0257         ) \
0258     (d,vseq1,vseq2,be1,be2) \
0259 /**/
0260 
0261 #define BOOST_VMD_DETAIL_EQUAL_1(vseq1,vseq2) \
0262     BOOST_VMD_DETAIL_EQUAL_1_EMPTY \
0263         ( \
0264         vseq1, \
0265         vseq2, \
0266         BOOST_VMD_IS_EMPTY(vseq1), \
0267         BOOST_VMD_IS_EMPTY(vseq2) \
0268         ) \
0269 /**/
0270 
0271 #define BOOST_VMD_DETAIL_EQUAL_1_D(d,vseq1,vseq2) \
0272     BOOST_VMD_DETAIL_EQUAL_1_EMPTY_D \
0273         ( \
0274         d, \
0275         vseq1, \
0276         vseq2, \
0277         BOOST_VMD_IS_EMPTY(vseq1), \
0278         BOOST_VMD_IS_EMPTY(vseq2) \
0279         ) \
0280 /**/
0281 
0282 #endif /* BOOST_VMD_DETAIL_EQUAL_1_HPP */