Back to home page

EIC code displayed by LXR

 
 

    


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

0001 
0002 #ifndef BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
0004 
0005 // Copyright Paul Mensonides 2003
0006 // Copyright Aleksey Gurtovoy 2003-2004
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. 
0009 // (See accompanying file LICENSE_1_0.txt or copy at 
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 //
0012 // See http://www.boost.org/libs/mpl for documentation.
0013 
0014 // $Id$
0015 // $Date$
0016 // $Revision$
0017 
0018 #include <boost/preprocessor/seq/size.hpp>
0019 #include <boost/preprocessor/arithmetic/dec.hpp>
0020 #include <boost/preprocessor/punctuation/paren.hpp>
0021 #include <boost/preprocessor/cat.hpp>
0022 #include <boost/preprocessor/config/config.hpp>
0023 
0024 // returns 1 if 'seq' is a PP-sequence, 0 otherwise:
0025 //
0026 //   BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_IS_SEQ( int ) ) )
0027 //   BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (int) ) )
0028 //   BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (1)(2) ) )
0029 
0030 #if (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()) || defined(_MSC_VER) && defined(__INTEL_COMPILER) && __INTEL_COMPILER == 1010
0031 
0032 #   define BOOST_MPL_PP_IS_SEQ(seq) BOOST_PP_DEC( BOOST_PP_SEQ_SIZE( BOOST_MPL_PP_IS_SEQ_(seq) ) )
0033 #   define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_MPL_PP_IS_SEQ_SEQ_( BOOST_MPL_PP_IS_SEQ_SPLIT_ seq )
0034 #   define BOOST_MPL_PP_IS_SEQ_SEQ_(x) (x)
0035 #   define BOOST_MPL_PP_IS_SEQ_SPLIT_(unused) unused)((unused)
0036 
0037 #else
0038 
0039 #   if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
0040 #       define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_MWCC_((seq))
0041 #       define BOOST_MPL_PP_IS_SEQ_MWCC_(args) BOOST_MPL_PP_IS_SEQ_ ## args
0042 #   else
0043 #       define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_(seq)
0044 #   endif
0045 
0046 #   define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_PP_CAT(BOOST_MPL_PP_IS_SEQ_, BOOST_MPL_PP_IS_SEQ_0 seq BOOST_PP_RPAREN())
0047 #   define BOOST_MPL_PP_IS_SEQ_0(x) BOOST_MPL_PP_IS_SEQ_1(x
0048 #   define BOOST_MPL_PP_IS_SEQ_ALWAYS_0(unused) 0
0049 #   define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_0 BOOST_MPL_PP_IS_SEQ_ALWAYS_0(
0050 #   define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_1(unused) 1
0051 
0052 #endif
0053 
0054 #endif // BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED