~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to boost/boost/preprocessor/facilities/is_empty.hpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# /* **************************************************************************
 
2
#  *                                                                          *
 
3
#  *     (C) Copyright Paul Mensonides 2003.  Permission to copy, use,        *
 
4
#  *     modify, sell, and distribute this software is granted provided       *
 
5
#  *     this copyright notice appears in all copies.  This software is       *
 
6
#  *     provided "as is" without express or implied warranty, and with       *
 
7
#  *     no claim at to its suitability for any purpose.                      *
 
8
#  *                                                                          *
 
9
#  ************************************************************************** */
 
10
#
 
11
# /* See http://www.boost.org for most recent version. */
 
12
#
 
13
# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP
 
14
# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP
 
15
#
 
16
# include <boost/preprocessor/config/config.hpp>
 
17
# include <boost/preprocessor/cat.hpp>
 
18
# include <boost/preprocessor/tuple/elem.hpp>
 
19
# include <boost/preprocessor/facilities/empty.hpp>
 
20
# include <boost/preprocessor/detail/split.hpp>
 
21
#
 
22
# /* BOOST_PP_IS_EMPTY */
 
23
#
 
24
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
 
25
#    define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x BOOST_PP_IS_EMPTY_HELPER)
 
26
#    define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1, (BOOST_PP_IS_EMPTY_DEF_ ## contents()))
 
27
#    define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, 1 BOOST_PP_EMPTY
 
28
#    define BOOST_PP_IS_EMPTY_HELPER() , 0
 
29
# else
 
30
#    if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
 
31
#        define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(BOOST_PP_IS_EMPTY_HELPER x ())
 
32
#        define BOOST_PP_IS_EMPTY_I(test) BOOST_PP_IS_EMPTY_II(BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test)))
 
33
#        define BOOST_PP_IS_EMPTY_II(id) id
 
34
#    else
 
35
#        define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I((BOOST_PP_IS_EMPTY_HELPER x ()))
 
36
#        define BOOST_PP_IS_EMPTY_I(par) BOOST_PP_IS_EMPTY_II ## par
 
37
#        define BOOST_PP_IS_EMPTY_II(test) BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test))
 
38
#    endif
 
39
#    define BOOST_PP_IS_EMPTY_HELPER() 1
 
40
#    define BOOST_PP_IS_EMPTY_DEF_1 1, BOOST_PP_NIL
 
41
#    define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 0, BOOST_PP_NIL
 
42
# endif
 
43
#
 
44
# endif