2 #ifndef BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
\r
3 #define BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
\r
5 // Copyright Paul Mensonides 2003
\r
6 // Copyright Aleksey Gurtovoy 2003-2004
\r
8 // Distributed under the Boost Software License, Version 1.0.
\r
9 // (See accompanying file LICENSE_1_0.txt or copy at
\r
10 // http://www.boost.org/LICENSE_1_0.txt)
\r
12 // See http://www.boost.org/libs/mpl for documentation.
\r
14 // $Id: is_seq.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
\r
15 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
16 // $Revision: 49267 $
\r
18 #include <boost/preprocessor/seq/size.hpp>
\r
19 #include <boost/preprocessor/arithmetic/dec.hpp>
\r
20 #include <boost/preprocessor/punctuation/paren.hpp>
\r
21 #include <boost/preprocessor/cat.hpp>
\r
22 #include <boost/preprocessor/config/config.hpp>
\r
24 // returns 1 if 'seq' is a PP-sequence, 0 otherwise:
\r
26 // BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_IS_SEQ( int ) ) )
\r
27 // BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (int) ) )
\r
28 // BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (1)(2) ) )
\r
30 #if (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()) || defined(_MSC_VER) && defined(__INTEL_COMPILER) && __INTEL_COMPILER == 1010
\r
32 # define BOOST_MPL_PP_IS_SEQ(seq) BOOST_PP_DEC( BOOST_PP_SEQ_SIZE( BOOST_MPL_PP_IS_SEQ_(seq) ) )
\r
33 # define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_MPL_PP_IS_SEQ_SEQ_( BOOST_MPL_PP_IS_SEQ_SPLIT_ seq )
\r
34 # define BOOST_MPL_PP_IS_SEQ_SEQ_(x) (x)
\r
35 # define BOOST_MPL_PP_IS_SEQ_SPLIT_(unused) unused)((unused)
\r
39 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
\r
40 # define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_MWCC_((seq))
\r
41 # define BOOST_MPL_PP_IS_SEQ_MWCC_(args) BOOST_MPL_PP_IS_SEQ_ ## args
\r
43 # define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_(seq)
\r
46 # 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())
\r
47 # define BOOST_MPL_PP_IS_SEQ_0(x) BOOST_MPL_PP_IS_SEQ_1(x
\r
48 # define BOOST_MPL_PP_IS_SEQ_ALWAYS_0(unused) 0
\r
49 # define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_0 BOOST_MPL_PP_IS_SEQ_ALWAYS_0(
\r
50 # define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_1(unused) 1
\r
54 #endif // BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
\r