1
# /* **************************************************************************
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. *
9
# ************************************************************************** */
11
# /* See http://www.boost.org for most recent version. */
13
# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP
14
# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP
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>
22
# /* BOOST_PP_IS_EMPTY */
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
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
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))
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