123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- // (C) Copyright Edward Diener 2011-2015
- // Use, modification and distribution are subject to the Boost Software License,
- // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- // http://www.boost.org/LICENSE_1_0.txt).
- #if !defined(BOOST_VMD_DETAIL_EQUAL_7_HPP)
- #define BOOST_VMD_DETAIL_EQUAL_7_HPP
- #include <boost/vmd/detail/recurse/equal/equal_headers.hpp>
- #define BOOST_VMD_DETAIL_EQUAL_7_CNI_CHK(vseq1,vseq2,vtype) \
- BOOST_PP_IIF \
- ( \
- BOOST_PP_BITOR \
- ( \
- BOOST_PP_BITOR \
- ( \
- BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_ARRAY), \
- BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_LIST) \
- ), \
- BOOST_PP_BITOR \
- ( \
- BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_SEQ), \
- BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_TUPLE) \
- ) \
- ), \
- BOOST_VMD_DETAIL_DATA_EQUAL_7, \
- BOOST_VMD_DETAIL_EQUAL_CNI_SMP \
- ) \
- (vseq1,vseq2,vtype) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_CNI_CHK_D(d,vseq1,vseq2,vtype) \
- BOOST_PP_IIF \
- ( \
- BOOST_PP_BITOR \
- ( \
- BOOST_PP_BITOR \
- ( \
- BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_ARRAY), \
- BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_LIST) \
- ), \
- BOOST_PP_BITOR \
- ( \
- BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_SEQ), \
- BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_TUPLE) \
- ) \
- ), \
- BOOST_VMD_DETAIL_DATA_EQUAL_7_D, \
- BOOST_VMD_DETAIL_EQUAL_CNI_SMP_D \
- ) \
- (d,vseq1,vseq2,vtype) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_VSEQ(vseq1,vseq2,vtype) \
- BOOST_VMD_DETAIL_DATA_EQUAL_7 \
- ( \
- BOOST_VMD_TO_SEQ(vseq1), \
- BOOST_VMD_TO_SEQ(vseq2), \
- BOOST_VMD_TYPE_SEQ \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_VSEQ_D(d,vseq1,vseq2,vtype) \
- BOOST_VMD_DETAIL_DATA_EQUAL_7_D \
- ( \
- d, \
- BOOST_VMD_TO_SEQ_D(d,vseq1), \
- BOOST_VMD_TO_SEQ_D(d,vseq2), \
- BOOST_VMD_TYPE_SEQ \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_CNI(vseq1,vseq2,vtype) \
- BOOST_PP_IIF \
- ( \
- BOOST_VMD_DETAIL_EQUAL_TYPE \
- ( \
- vtype, \
- BOOST_VMD_TYPE_SEQUENCE \
- ), \
- BOOST_VMD_DETAIL_EQUAL_7_VSEQ, \
- BOOST_VMD_DETAIL_EQUAL_7_CNI_CHK \
- ) \
- (vseq1,vseq2,vtype) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_CNI_D(d,vseq1,vseq2,vtype) \
- BOOST_PP_IIF \
- ( \
- BOOST_VMD_DETAIL_EQUAL_TYPE_D \
- ( \
- d, \
- vtype, \
- BOOST_VMD_TYPE_SEQUENCE \
- ), \
- BOOST_VMD_DETAIL_EQUAL_7_VSEQ_D, \
- BOOST_VMD_DETAIL_EQUAL_7_CNI_CHK_D \
- ) \
- (d,vseq1,vseq2,vtype) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_WT_CHECK(vseq1,vseq2,vtype1,vtype2) \
- BOOST_VMD_IDENTITY_RESULT \
- ( \
- BOOST_PP_IIF \
- ( \
- BOOST_VMD_DETAIL_EQUAL_TYPE \
- ( \
- vtype1, \
- vtype2 \
- ), \
- BOOST_VMD_DETAIL_EQUAL_7_CNI, \
- BOOST_VMD_IDENTITY(0) \
- ) \
- (vseq1,vseq2,vtype1) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_WT_CHECK_D(d,vseq1,vseq2,vtype1,vtype2) \
- BOOST_VMD_IDENTITY_RESULT \
- ( \
- BOOST_PP_IIF \
- ( \
- BOOST_VMD_DETAIL_EQUAL_TYPE_D \
- ( \
- d, \
- vtype1, \
- vtype2 \
- ), \
- BOOST_VMD_DETAIL_EQUAL_7_CNI_D, \
- BOOST_VMD_IDENTITY(0) \
- ) \
- (d,vseq1,vseq2,vtype1) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_WT_CONVERT(vseq1,vseq2,vtype1,vtype2) \
- BOOST_VMD_DETAIL_EQUAL_7_WT_CHECK \
- ( \
- vseq1, \
- vseq2, \
- BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE(vseq1,vtype1), \
- BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE(vseq2,vtype2) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_WT_CONVERT_D(d,vseq1,vseq2,vtype1,vtype2) \
- BOOST_VMD_DETAIL_EQUAL_7_WT_CHECK_D \
- ( \
- d, \
- vseq1, \
- vseq2, \
- BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE_D(d,vseq1,vtype1), \
- BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE_D(d,vseq2,vtype2) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_WT(vseq1,vseq2,vtype1,vtype2) \
- BOOST_VMD_IDENTITY_RESULT \
- ( \
- BOOST_PP_IIF \
- ( \
- BOOST_VMD_DETAIL_EQUAL_IS_TUPLE_MISMATCH(vseq1,vseq2,vtype1,vtype2), \
- BOOST_VMD_IDENTITY(0), \
- BOOST_VMD_DETAIL_EQUAL_7_WT_CONVERT \
- ) \
- (vseq1,vseq2,vtype1,vtype2) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_WT_D(d,vseq1,vseq2,vtype1,vtype2) \
- BOOST_VMD_IDENTITY_RESULT \
- ( \
- BOOST_PP_IIF \
- ( \
- BOOST_VMD_DETAIL_EQUAL_IS_TUPLE_MISMATCH_D(d,vseq1,vseq2,vtype1,vtype2), \
- BOOST_VMD_IDENTITY(0), \
- BOOST_VMD_DETAIL_EQUAL_7_WT_CONVERT_D \
- ) \
- (d,vseq1,vseq2,vtype1,vtype2) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_GTYPE(vseq1,vseq2) \
- BOOST_VMD_DETAIL_EQUAL_7_WT \
- ( \
- vseq1, \
- vseq2, \
- BOOST_VMD_GET_TYPE(vseq1,BOOST_VMD_RETURN_TYPE_TUPLE), \
- BOOST_VMD_GET_TYPE(vseq2,BOOST_VMD_RETURN_TYPE_TUPLE) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_GTYPE_D(d,vseq1,vseq2) \
- BOOST_VMD_DETAIL_EQUAL_7_WT_D \
- ( \
- d, \
- vseq1, \
- vseq2, \
- BOOST_VMD_GET_TYPE_D(d,vseq1,BOOST_VMD_RETURN_TYPE_TUPLE), \
- BOOST_VMD_GET_TYPE_D(d,vseq2,BOOST_VMD_RETURN_TYPE_TUPLE) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_EBP(vseq1,vseq2,be1,be2) \
- BOOST_VMD_IDENTITY_RESULT \
- ( \
- BOOST_PP_IIF \
- ( \
- BOOST_PP_BITAND \
- ( \
- BOOST_VMD_DETAIL_EQUAL_CHK_MATCH(be1,be2), \
- BOOST_VMD_DETAIL_EQUAL_CHK_PARENS_MATCH(vseq1,vseq2) \
- ), \
- BOOST_VMD_DETAIL_EQUAL_7_GTYPE, \
- BOOST_VMD_IDENTITY(0) \
- ) \
- (vseq1,vseq2) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_EBP_D(d,vseq1,vseq2,be1,be2) \
- BOOST_VMD_IDENTITY_RESULT \
- ( \
- BOOST_PP_IIF \
- ( \
- BOOST_PP_BITAND \
- ( \
- BOOST_VMD_DETAIL_EQUAL_CHK_MATCH(be1,be2), \
- BOOST_VMD_DETAIL_EQUAL_CHK_PARENS_MATCH(vseq1,vseq2) \
- ), \
- BOOST_VMD_DETAIL_EQUAL_7_GTYPE_D, \
- BOOST_VMD_IDENTITY(0) \
- ) \
- (d,vseq1,vseq2) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_EMPTY(vseq1,vseq2,be1,be2) \
- BOOST_PP_IIF \
- ( \
- BOOST_PP_BITAND(be1,be2), \
- BOOST_VMD_DETAIL_EQUAL_BOTH_EMPTY, \
- BOOST_VMD_DETAIL_EQUAL_7_EBP \
- ) \
- (vseq1,vseq2,be1,be2) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_EMPTY_D(d,vseq1,vseq2,be1,be2) \
- BOOST_PP_IIF \
- ( \
- BOOST_PP_BITAND(be1,be2), \
- BOOST_VMD_DETAIL_EQUAL_BOTH_EMPTY, \
- BOOST_VMD_DETAIL_EQUAL_7_EBP_D \
- ) \
- (d,vseq1,vseq2,be1,be2) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7(vseq1,vseq2) \
- BOOST_VMD_DETAIL_EQUAL_7_EMPTY \
- ( \
- vseq1, \
- vseq2, \
- BOOST_VMD_IS_EMPTY(vseq1), \
- BOOST_VMD_IS_EMPTY(vseq2) \
- ) \
- /**/
- #define BOOST_VMD_DETAIL_EQUAL_7_D(d,vseq1,vseq2) \
- BOOST_VMD_DETAIL_EQUAL_7_EMPTY_D \
- ( \
- d, \
- vseq1, \
- vseq2, \
- BOOST_VMD_IS_EMPTY(vseq1), \
- BOOST_VMD_IS_EMPTY(vseq2) \
- ) \
- /**/
- #endif /* BOOST_VMD_DETAIL_EQUAL_7_HPP */
|