Back to home page

EIC code displayed by LXR

 
 

    


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

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_SEQUENCE_ARITY_HPP)
0008 #define BOOST_VMD_DETAIL_SEQUENCE_ARITY_HPP
0009 
0010 #include <boost/preprocessor/logical/bitand.hpp>
0011 #include <boost/preprocessor/logical/bitnor.hpp>
0012 #include <boost/preprocessor/tuple/elem.hpp>
0013 #include <boost/vmd/is_empty.hpp>
0014 #include <boost/vmd/detail/modifiers.hpp>
0015 #include <boost/vmd/detail/not_empty.hpp>
0016 #include <boost/vmd/detail/sequence_elem.hpp>
0017 
0018 #define BOOST_VMD_DETAIL_IS_MULTI_TUPLE(tuple) \
0019     BOOST_PP_BITNOR \
0020         ( \
0021         BOOST_VMD_IS_EMPTY(BOOST_PP_TUPLE_ELEM(0,tuple)), \
0022         BOOST_VMD_IS_EMPTY(BOOST_PP_TUPLE_ELEM(1,tuple)) \
0023         ) \
0024 /**/
0025 
0026 #define BOOST_VMD_DETAIL_IS_UNARY_TUPLE(tuple) \
0027     BOOST_PP_BITAND \
0028         ( \
0029         BOOST_VMD_DETAIL_NOT_EMPTY(BOOST_PP_TUPLE_ELEM(0,tuple)), \
0030         BOOST_VMD_IS_EMPTY(BOOST_PP_TUPLE_ELEM(1,tuple)) \
0031         ) \
0032 /**/
0033 
0034 // UNARY
0035 
0036 #define BOOST_VMD_DETAIL_IS_UNARY(vseq) \
0037     BOOST_VMD_DETAIL_IS_UNARY_TUPLE \
0038         ( \
0039         BOOST_VMD_DETAIL_SEQUENCE_ELEM(BOOST_VMD_ALLOW_AFTER,0,vseq,BOOST_VMD_RETURN_AFTER) \
0040         ) \
0041 /**/
0042 
0043 #define BOOST_VMD_DETAIL_IS_UNARY_D(d,vseq) \
0044     BOOST_VMD_DETAIL_IS_UNARY_TUPLE \
0045         ( \
0046         BOOST_VMD_DETAIL_SEQUENCE_ELEM_D(d,BOOST_VMD_ALLOW_AFTER,0,vseq,BOOST_VMD_RETURN_AFTER) \
0047         ) \
0048 /**/
0049 
0050 // MULTI
0051 
0052 #define BOOST_VMD_DETAIL_IS_MULTI(vseq) \
0053     BOOST_VMD_DETAIL_IS_MULTI_TUPLE \
0054         ( \
0055         BOOST_VMD_DETAIL_SEQUENCE_ELEM(BOOST_VMD_ALLOW_AFTER,0,vseq,BOOST_VMD_RETURN_AFTER) \
0056         ) \
0057 /**/
0058 
0059 #define BOOST_VMD_DETAIL_IS_MULTI_D(d,vseq) \
0060     BOOST_VMD_DETAIL_IS_MULTI_TUPLE \
0061         ( \
0062         BOOST_VMD_DETAIL_SEQUENCE_ELEM_D(d,BOOST_VMD_ALLOW_AFTER,0,vseq,BOOST_VMD_RETURN_AFTER) \
0063         ) \
0064 /**/
0065 
0066 #endif /* BOOST_VMD_DETAIL_SEQUENCE_ARITY_HPP */