forked from boostorg/preprocessor
Added new tuple headers and updated tests to use a common test source file for each test.
[SVN r86715]
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002) */
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
# /* Revised by Edward Diener (2011,2013) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
@ -18,7 +18,14 @@
|
||||
# include <boost/preprocessor/tuple/eat.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/enum.hpp>
|
||||
# include <boost/preprocessor/tuple/insert.hpp>
|
||||
# include <boost/preprocessor/tuple/pop_back.hpp>
|
||||
# include <boost/preprocessor/tuple/pop_front.hpp>
|
||||
# include <boost/preprocessor/tuple/push_back.hpp>
|
||||
# include <boost/preprocessor/tuple/push_front.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/tuple/remove.hpp>
|
||||
# include <boost/preprocessor/tuple/replace.hpp>
|
||||
# include <boost/preprocessor/tuple/reverse.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
|
37
include/boost/preprocessor/tuple/insert.hpp
Normal file
37
include/boost/preprocessor/tuple/insert.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 BOOST_PREPROCESSOR_TUPLE_INSERT_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_INSERT_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/insert.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_INSERT */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_INSERT(tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_INSERT_D */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_INSERT_D(d, tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_INSERT_HPP
|
64
include/boost/preprocessor/tuple/pop_back.hpp
Normal file
64
include/boost/preprocessor/tuple/pop_back.hpp
Normal file
@ -0,0 +1,64 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 BOOST_PREPROCESSOR_TUPLE_POP_BACK_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_POP_BACK_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/pop_back.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/comparison/greater.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_POP_BACK */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK(tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_BACK_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_BACK_RETURN \
|
||||
) \
|
||||
(tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_EXEC(tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_BACK(BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_RETURN(tuple) tuple
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_POP_BACK_Z */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z(z, tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_BACK_Z_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_BACK_Z_RETURN \
|
||||
) \
|
||||
(z, tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z_EXEC(z, tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_BACK_Z(z, BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z_RETURN(z, tuple) tuple
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_POP_BACK_HPP
|
65
include/boost/preprocessor/tuple/pop_front.hpp
Normal file
65
include/boost/preprocessor/tuple/pop_front.hpp
Normal file
@ -0,0 +1,65 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 BOOST_PREPROCESSOR_TUPLE_POP_FRONT_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_POP_FRONT_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/pop_front.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/comparison/greater.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_POP_FRONT */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT(tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_FRONT_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_FRONT_RETURN \
|
||||
) \
|
||||
(tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_EXEC(tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT(BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_RETURN(tuple) tuple
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_POP_FRONT_Z */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z(z, tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_FRONT_Z_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_FRONT_Z_RETURN \
|
||||
) \
|
||||
(z, tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z_EXEC(z, tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT_Z(z, BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z_RETURN(z, tuple) tuple
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_POP_FRONT_HPP
|
31
include/boost/preprocessor/tuple/push_back.hpp
Normal file
31
include/boost/preprocessor/tuple/push_back.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 BOOST_PREPROCESSOR_TUPLE_PUSH_BACK_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_PUSH_BACK_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/push_back.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_PUSH_BACK */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_PUSH_BACK(tuple, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_PUSH_BACK(BOOST_PP_TUPLE_TO_ARRAY(tuple), elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_PUSH_BACK_HPP
|
32
include/boost/preprocessor/tuple/push_front.hpp
Normal file
32
include/boost/preprocessor/tuple/push_front.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 BOOST_PREPROCESSOR_TUPLE_PUSH_FRONT_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_PUSH_FRONT_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/push_front.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_PUSH_FRONT */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_PUSH_FRONT(tuple, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_PUSH_FRONT(BOOST_PP_TUPLE_TO_ARRAY(tuple), elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_PUSH_FRONT_HPP
|
64
include/boost/preprocessor/tuple/remove.hpp
Normal file
64
include/boost/preprocessor/tuple/remove.hpp
Normal file
@ -0,0 +1,64 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 BOOST_PREPROCESSOR_TUPLE_REMOVE_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_REMOVE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/remove.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/comparison/greater.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REMOVE */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE(tuple, i) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_REMOVE_EXEC, \
|
||||
BOOST_PP_TUPLE_REMOVE_RETURN \
|
||||
) \
|
||||
(tuple, i) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_EXEC(tuple, i) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REMOVE(BOOST_PP_TUPLE_TO_ARRAY(tuple), i)) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_RETURN(tuple, i) tuple
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REMOVE_D */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_D(d, tuple, i) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER_D(d, BOOST_PP_TUPLE_SIZE(tuple), 1), \
|
||||
BOOST_PP_TUPLE_REMOVE_D_EXEC, \
|
||||
BOOST_PP_TUPLE_REMOVE_D_RETURN \
|
||||
) \
|
||||
(d, tuple, i) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_D_EXEC(d, tuple, i) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REMOVE_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i)) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_D_RETURN(d, tuple, i) tuple
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_REMOVE_HPP
|
37
include/boost/preprocessor/tuple/replace.hpp
Normal file
37
include/boost/preprocessor/tuple/replace.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/replace.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REPLACE */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REPLACE(tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REPLACE(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REPLACE_D */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REPLACE_D(d, tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REPLACE_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP
|
Reference in New Issue
Block a user