Files
externals/linux/include/ActivBoost/preprocessor/tuple/remove.hpp
T
2023-12-15 13:15:08 -05:00

60 lines
2.2 KiB
C++

# /* **************************************************************************
# * *
# * (C) Copyright Edward Diener 2013.
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# * *
# ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef ACTIV_BOOST_PREPROCESSOR_TUPLE_REMOVE_HPP
# define ACTIV_BOOST_PREPROCESSOR_TUPLE_REMOVE_HPP
#
# include <ActivBoost/preprocessor/config/config.hpp>
# include <ActivBoost/preprocessor/array/remove.hpp>
# include <ActivBoost/preprocessor/array/to_tuple.hpp>
# include <ActivBoost/preprocessor/comparison/greater.hpp>
# include <ActivBoost/preprocessor/control/iif.hpp>
# include <ActivBoost/preprocessor/tuple/size.hpp>
# include <ActivBoost/preprocessor/tuple/to_array.hpp>
#
# /* ACTIV_BOOST_PP_TUPLE_REMOVE */
#
# define ACTIV_BOOST_PP_TUPLE_REMOVE(tuple, i) \
ACTIV_BOOST_PP_IIF \
( \
ACTIV_BOOST_PP_GREATER(ACTIV_BOOST_PP_TUPLE_SIZE(tuple),1), \
ACTIV_BOOST_PP_TUPLE_REMOVE_EXEC, \
ACTIV_BOOST_PP_TUPLE_REMOVE_RETURN \
) \
(tuple, i) \
/**/
#
# define ACTIV_BOOST_PP_TUPLE_REMOVE_EXEC(tuple, i) \
ACTIV_BOOST_PP_ARRAY_TO_TUPLE(ACTIV_BOOST_PP_ARRAY_REMOVE(ACTIV_BOOST_PP_TUPLE_TO_ARRAY(tuple), i)) \
/**/
#
# define ACTIV_BOOST_PP_TUPLE_REMOVE_RETURN(tuple, i) tuple
#
# /* ACTIV_BOOST_PP_TUPLE_REMOVE_D */
#
# define ACTIV_BOOST_PP_TUPLE_REMOVE_D(d, tuple, i) \
ACTIV_BOOST_PP_IIF \
( \
ACTIV_BOOST_PP_GREATER_D(d, ACTIV_BOOST_PP_TUPLE_SIZE(tuple), 1), \
ACTIV_BOOST_PP_TUPLE_REMOVE_D_EXEC, \
ACTIV_BOOST_PP_TUPLE_REMOVE_D_RETURN \
) \
(d, tuple, i) \
/**/
#
# define ACTIV_BOOST_PP_TUPLE_REMOVE_D_EXEC(d, tuple, i) \
ACTIV_BOOST_PP_ARRAY_TO_TUPLE(ACTIV_BOOST_PP_ARRAY_REMOVE_D(d, ACTIV_BOOST_PP_TUPLE_TO_ARRAY(tuple), i)) \
/**/
#
# define ACTIV_BOOST_PP_TUPLE_REMOVE_D_RETURN(d, tuple, i) tuple
#
# endif // ACTIV_BOOST_PREPROCESSOR_TUPLE_REMOVE_HPP