mirror of
https://github.com/msgpack/msgpack-c
synced 2026-06-08 16:11:40 +00:00
Minimall supported build without boost.
To remove boost dependency, `-DMSGPACK_USE_BOOST=OFF` for cmake. By default, `-DMSGPACK_USE_BOOST` is `ON`. NOTE: In order to build tests `-DMSGPACK_USE_BOOST=ON` is required. For C++ compiler, the option `-DMSGPACK_NO_BOOST` is required to remove boost.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_DATA_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_DATA_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_DATA */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_DATA(array) MSGPACK_PP_TUPLE_ELEM(2, 1, array)
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_DATA(array) MSGPACK_PP_ARRAY_DATA_I(array)
|
||||
# define MSGPACK_PP_ARRAY_DATA_I(array) MSGPACK_PP_ARRAY_DATA_II array
|
||||
# define MSGPACK_PP_ARRAY_DATA_II(size, data) data
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,55 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014. *
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/tuple/rem.hpp>
|
||||
# include <msgpack/preprocessor/control/if.hpp>
|
||||
# include <msgpack/preprocessor/control/iif.hpp>
|
||||
# include <msgpack/preprocessor/facilities/is_1.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_DETAIL_GET_DATA */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_NONE(size, data)
|
||||
|
||||
# if MSGPACK_PP_VARIADICS && !(MSGPACK_PP_VARIADICS_MSVC && _MSC_VER <= 1400)
|
||||
# if MSGPACK_PP_VARIADICS_MSVC
|
||||
# define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_DEFAULT(size, data) MSGPACK_PP_TUPLE_REM(size) data
|
||||
# define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_CAT(size, data) MSGPACK_PP_TUPLE_REM_CAT(size) data
|
||||
# define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) \
|
||||
MSGPACK_PP_IIF \
|
||||
( \
|
||||
MSGPACK_PP_IS_1(size), \
|
||||
MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_CAT, \
|
||||
MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_DEFAULT \
|
||||
) \
|
||||
(size,data) \
|
||||
/**/
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) MSGPACK_PP_TUPLE_REM(size) data
|
||||
# endif
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) MSGPACK_PP_TUPLE_REM(size) data
|
||||
# endif
|
||||
|
||||
# define MSGPACK_PP_ARRAY_DETAIL_GET_DATA(size, data) \
|
||||
MSGPACK_PP_IF \
|
||||
( \
|
||||
size, \
|
||||
MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY, \
|
||||
MSGPACK_PP_ARRAY_DETAIL_GET_DATA_NONE \
|
||||
) \
|
||||
(size,data) \
|
||||
/**/
|
||||
#
|
||||
# endif /* MSGPACK_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP */
|
||||
@@ -0,0 +1,29 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_ELEM_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_ELEM_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/array/data.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_ELEM */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_ELEM(i, array) MSGPACK_PP_TUPLE_ELEM(MSGPACK_PP_ARRAY_SIZE(array), i, MSGPACK_PP_ARRAY_DATA(array))
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_ELEM(i, array) MSGPACK_PP_ARRAY_ELEM_I(i, array)
|
||||
# define MSGPACK_PP_ARRAY_ELEM_I(i, array) MSGPACK_PP_TUPLE_ELEM(MSGPACK_PP_ARRAY_SIZE(array), i, MSGPACK_PP_ARRAY_DATA(array))
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,33 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2011. *
|
||||
# * (C) Copyright Paul Mensonides 2011. *
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_ENUM_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_ENUM_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/cat.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/tuple/rem.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_ENUM */
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC()
|
||||
# define MSGPACK_PP_ARRAY_ENUM(array) MSGPACK_PP_ARRAY_ENUM_I(MSGPACK_PP_TUPLE_REM_CTOR, array)
|
||||
# define MSGPACK_PP_ARRAY_ENUM_I(m, args) MSGPACK_PP_ARRAY_ENUM_II(m, args)
|
||||
# define MSGPACK_PP_ARRAY_ENUM_II(m, args) MSGPACK_PP_CAT(m ## args,)
|
||||
# elif MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC()
|
||||
# define MSGPACK_PP_ARRAY_ENUM(array) MSGPACK_PP_ARRAY_ENUM_I(array)
|
||||
# define MSGPACK_PP_ARRAY_ENUM_I(array) MSGPACK_PP_TUPLE_REM_CTOR ## array
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_ENUM(array) MSGPACK_PP_TUPLE_REM_CTOR array
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,55 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_INSERT_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_INSERT_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/arithmetic/inc.hpp>
|
||||
# include <msgpack/preprocessor/array/elem.hpp>
|
||||
# include <msgpack/preprocessor/array/push_back.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/comparison/not_equal.hpp>
|
||||
# include <msgpack/preprocessor/control/deduce_d.hpp>
|
||||
# include <msgpack/preprocessor/control/iif.hpp>
|
||||
# include <msgpack/preprocessor/control/while.hpp>
|
||||
# include <msgpack/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_INSERT */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_INSERT(array, i, elem) MSGPACK_PP_ARRAY_INSERT_I(MSGPACK_PP_DEDUCE_D(), array, i, elem)
|
||||
# define MSGPACK_PP_ARRAY_INSERT_I(d, array, i, elem) MSGPACK_PP_ARRAY_INSERT_D(d, array, i, elem)
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_INSERT_D */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_INSERT_D(d, array, i, elem) MSGPACK_PP_TUPLE_ELEM(5, 3, MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_ARRAY_INSERT_P, MSGPACK_PP_ARRAY_INSERT_O, (0, i, elem, (0, ()), array)))
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_INSERT_D(d, array, i, elem) MSGPACK_PP_ARRAY_INSERT_D_I(d, array, i, elem)
|
||||
# define MSGPACK_PP_ARRAY_INSERT_D_I(d, array, i, elem) MSGPACK_PP_TUPLE_ELEM(5, 3, MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_ARRAY_INSERT_P, MSGPACK_PP_ARRAY_INSERT_O, (0, i, elem, (0, ()), array)))
|
||||
# endif
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT()
|
||||
# define MSGPACK_PP_ARRAY_INSERT_P(d, state) MSGPACK_PP_ARRAY_INSERT_P_I state
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_INSERT_P(d, state) MSGPACK_PP_ARRAY_INSERT_P_I(nil, nil, nil, MSGPACK_PP_TUPLE_ELEM(5, 3, state), MSGPACK_PP_TUPLE_ELEM(5, 4, state))
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_INSERT_P_I(_i, _ii, _iii, res, arr) MSGPACK_PP_NOT_EQUAL(MSGPACK_PP_ARRAY_SIZE(res), MSGPACK_PP_INC(MSGPACK_PP_ARRAY_SIZE(arr)))
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT()
|
||||
# define MSGPACK_PP_ARRAY_INSERT_O(d, state) MSGPACK_PP_ARRAY_INSERT_O_I state
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_INSERT_O(d, state) MSGPACK_PP_ARRAY_INSERT_O_I(MSGPACK_PP_TUPLE_ELEM(5, 0, state), MSGPACK_PP_TUPLE_ELEM(5, 1, state), MSGPACK_PP_TUPLE_ELEM(5, 2, state), MSGPACK_PP_TUPLE_ELEM(5, 3, state), MSGPACK_PP_TUPLE_ELEM(5, 4, state))
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_INSERT_O_I(n, i, elem, res, arr) (MSGPACK_PP_IIF(MSGPACK_PP_NOT_EQUAL(MSGPACK_PP_ARRAY_SIZE(res), i), MSGPACK_PP_INC(n), n), i, elem, MSGPACK_PP_ARRAY_PUSH_BACK(res, MSGPACK_PP_IIF(MSGPACK_PP_NOT_EQUAL(MSGPACK_PP_ARRAY_SIZE(res), i), MSGPACK_PP_ARRAY_ELEM(n, arr), elem)), arr)
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,37 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_POP_BACK_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_POP_BACK_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/arithmetic/dec.hpp>
|
||||
# include <msgpack/preprocessor/array/elem.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/repetition/enum.hpp>
|
||||
# include <msgpack/preprocessor/repetition/deduce_z.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_POP_BACK */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_POP_BACK(array) MSGPACK_PP_ARRAY_POP_BACK_Z(MSGPACK_PP_DEDUCE_Z(), array)
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_POP_BACK_Z */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_POP_BACK_Z(z, array) MSGPACK_PP_ARRAY_POP_BACK_I(z, MSGPACK_PP_ARRAY_SIZE(array), array)
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_POP_BACK_Z(z, array) MSGPACK_PP_ARRAY_POP_BACK_Z_D(z, array)
|
||||
# define MSGPACK_PP_ARRAY_POP_BACK_Z_D(z, array) MSGPACK_PP_ARRAY_POP_BACK_I(z, MSGPACK_PP_ARRAY_SIZE(array), array)
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_POP_BACK_I(z, size, array) (MSGPACK_PP_DEC(size), (MSGPACK_PP_ENUM_ ## z(MSGPACK_PP_DEC(size), MSGPACK_PP_ARRAY_POP_BACK_M, array)))
|
||||
# define MSGPACK_PP_ARRAY_POP_BACK_M(z, n, data) MSGPACK_PP_ARRAY_ELEM(n, data)
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,38 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_POP_FRONT_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_POP_FRONT_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/arithmetic/dec.hpp>
|
||||
# include <msgpack/preprocessor/arithmetic/inc.hpp>
|
||||
# include <msgpack/preprocessor/array/elem.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/repetition/enum.hpp>
|
||||
# include <msgpack/preprocessor/repetition/deduce_z.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_POP_FRONT */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_POP_FRONT(array) MSGPACK_PP_ARRAY_POP_FRONT_Z(MSGPACK_PP_DEDUCE_Z(), array)
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_POP_FRONT_Z */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_POP_FRONT_Z(z, array) MSGPACK_PP_ARRAY_POP_FRONT_I(z, MSGPACK_PP_ARRAY_SIZE(array), array)
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_POP_FRONT_Z(z, array) MSGPACK_PP_ARRAY_POP_FRONT_Z_D(z, array)
|
||||
# define MSGPACK_PP_ARRAY_POP_FRONT_Z_D(z, array) MSGPACK_PP_ARRAY_POP_FRONT_I(z, MSGPACK_PP_ARRAY_SIZE(array), array)
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_POP_FRONT_I(z, size, array) (MSGPACK_PP_DEC(size), (MSGPACK_PP_ENUM_ ## z(MSGPACK_PP_DEC(size), MSGPACK_PP_ARRAY_POP_FRONT_M, array)))
|
||||
# define MSGPACK_PP_ARRAY_POP_FRONT_M(z, n, data) MSGPACK_PP_ARRAY_ELEM(MSGPACK_PP_INC(n), data)
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,35 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_PUSH_BACK_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_PUSH_BACK_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/arithmetic/inc.hpp>
|
||||
# include <msgpack/preprocessor/array/data.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <msgpack/preprocessor/tuple/rem.hpp>
|
||||
# include <msgpack/preprocessor/array/detail/get_data.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_PUSH_BACK */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_PUSH_BACK(array, elem) MSGPACK_PP_ARRAY_PUSH_BACK_I(MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_ARRAY_DATA(array), elem)
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_PUSH_BACK(array, elem) MSGPACK_PP_ARRAY_PUSH_BACK_D(array, elem)
|
||||
# define MSGPACK_PP_ARRAY_PUSH_BACK_D(array, elem) MSGPACK_PP_ARRAY_PUSH_BACK_I(MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_ARRAY_DATA(array), elem)
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_PUSH_BACK_I(size, data, elem) (MSGPACK_PP_INC(size), (MSGPACK_PP_ARRAY_DETAIL_GET_DATA(size,data) MSGPACK_PP_COMMA_IF(size) elem))
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,35 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_PUSH_FRONT_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_PUSH_FRONT_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/arithmetic/inc.hpp>
|
||||
# include <msgpack/preprocessor/array/data.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <msgpack/preprocessor/tuple/rem.hpp>
|
||||
# include <msgpack/preprocessor/array/detail/get_data.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_PUSH_FRONT */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_PUSH_FRONT(array, elem) MSGPACK_PP_ARRAY_PUSH_FRONT_I(MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_ARRAY_DATA(array), elem)
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_PUSH_FRONT(array, elem) MSGPACK_PP_ARRAY_PUSH_FRONT_D(array, elem)
|
||||
# define MSGPACK_PP_ARRAY_PUSH_FRONT_D(array, elem) MSGPACK_PP_ARRAY_PUSH_FRONT_I(MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_ARRAY_DATA(array), elem)
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_PUSH_FRONT_I(size, data, elem) (MSGPACK_PP_INC(size), (elem MSGPACK_PP_COMMA_IF(size) MSGPACK_PP_ARRAY_DETAIL_GET_DATA(size,data)))
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,54 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_REMOVE_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_REMOVE_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/arithmetic/inc.hpp>
|
||||
# include <msgpack/preprocessor/array/elem.hpp>
|
||||
# include <msgpack/preprocessor/array/push_back.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/comparison/not_equal.hpp>
|
||||
# include <msgpack/preprocessor/control/deduce_d.hpp>
|
||||
# include <msgpack/preprocessor/control/iif.hpp>
|
||||
# include <msgpack/preprocessor/control/while.hpp>
|
||||
# include <msgpack/preprocessor/tuple/eat.hpp>
|
||||
# include <msgpack/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_REMOVE */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_REMOVE(array, i) MSGPACK_PP_ARRAY_REMOVE_I(MSGPACK_PP_DEDUCE_D(), array, i)
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_I(d, array, i) MSGPACK_PP_ARRAY_REMOVE_D(d, array, i)
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_REMOVE_D */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_D(d, array, i) MSGPACK_PP_TUPLE_ELEM(4, 2, MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_ARRAY_REMOVE_P, MSGPACK_PP_ARRAY_REMOVE_O, (0, i, (0, ()), array)))
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_D(d, array, i) MSGPACK_PP_ARRAY_REMOVE_D_I(d, array, i)
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_D_I(d, array, i) MSGPACK_PP_TUPLE_ELEM(4, 2, MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_ARRAY_REMOVE_P, MSGPACK_PP_ARRAY_REMOVE_O, (0, i, (0, ()), array)))
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_P(d, st) MSGPACK_PP_NOT_EQUAL(MSGPACK_PP_TUPLE_ELEM(4, 0, st), MSGPACK_PP_ARRAY_SIZE(MSGPACK_PP_TUPLE_ELEM(4, 3, st)))
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT()
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_O(d, st) MSGPACK_PP_ARRAY_REMOVE_O_I st
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_O(d, st) MSGPACK_PP_ARRAY_REMOVE_O_I(MSGPACK_PP_TUPLE_ELEM(4, 0, st), MSGPACK_PP_TUPLE_ELEM(4, 1, st), MSGPACK_PP_TUPLE_ELEM(4, 2, st), MSGPACK_PP_TUPLE_ELEM(4, 3, st))
|
||||
# endif
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_DMC()
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_O_I(n, i, res, arr) (MSGPACK_PP_INC(n), i, MSGPACK_PP_IIF(MSGPACK_PP_NOT_EQUAL(n, i), MSGPACK_PP_ARRAY_PUSH_BACK, res MSGPACK_PP_TUPLE_EAT_2)(res, MSGPACK_PP_ARRAY_ELEM(n, arr)), arr)
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_REMOVE_O_I(n, i, res, arr) (MSGPACK_PP_INC(n), i, MSGPACK_PP_IIF(MSGPACK_PP_NOT_EQUAL(n, i), MSGPACK_PP_ARRAY_PUSH_BACK, MSGPACK_PP_TUPLE_ELEM_2_0)(res, MSGPACK_PP_ARRAY_ELEM(n, arr)), arr)
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,49 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_REPLACE_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_REPLACE_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/arithmetic/inc.hpp>
|
||||
# include <msgpack/preprocessor/array/elem.hpp>
|
||||
# include <msgpack/preprocessor/array/push_back.hpp>
|
||||
# include <msgpack/preprocessor/comparison/not_equal.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/control/deduce_d.hpp>
|
||||
# include <msgpack/preprocessor/control/iif.hpp>
|
||||
# include <msgpack/preprocessor/control/while.hpp>
|
||||
# include <msgpack/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_REPLACE */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_REPLACE(array, i, elem) MSGPACK_PP_ARRAY_REPLACE_I(MSGPACK_PP_DEDUCE_D(), array, i, elem)
|
||||
# define MSGPACK_PP_ARRAY_REPLACE_I(d, array, i, elem) MSGPACK_PP_ARRAY_REPLACE_D(d, array, i, elem)
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_REPLACE_D */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_REPLACE_D(d, array, i, elem) MSGPACK_PP_TUPLE_ELEM(5, 3, MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_ARRAY_REPLACE_P, MSGPACK_PP_ARRAY_REPLACE_O, (0, i, elem, (0, ()), array)))
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_REPLACE_D(d, array, i, elem) MSGPACK_PP_ARRAY_REPLACE_D_I(d, array, i, elem)
|
||||
# define MSGPACK_PP_ARRAY_REPLACE_D_I(d, array, i, elem) MSGPACK_PP_TUPLE_ELEM(5, 3, MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_ARRAY_REPLACE_P, MSGPACK_PP_ARRAY_REPLACE_O, (0, i, elem, (0, ()), array)))
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_REPLACE_P(d, state) MSGPACK_PP_NOT_EQUAL(MSGPACK_PP_TUPLE_ELEM(5, 0, state), MSGPACK_PP_ARRAY_SIZE(MSGPACK_PP_TUPLE_ELEM(5, 4, state)))
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT()
|
||||
# define MSGPACK_PP_ARRAY_REPLACE_O(d, state) MSGPACK_PP_ARRAY_REPLACE_O_I state
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_REPLACE_O(d, state) MSGPACK_PP_ARRAY_REPLACE_O_I(MSGPACK_PP_TUPLE_ELEM(5, 0, state), MSGPACK_PP_TUPLE_ELEM(5, 1, state), MSGPACK_PP_TUPLE_ELEM(5, 2, state), MSGPACK_PP_TUPLE_ELEM(5, 3, state), MSGPACK_PP_TUPLE_ELEM(5, 4, state))
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_REPLACE_O_I(n, i, elem, res, arr) (MSGPACK_PP_INC(n), i, elem, MSGPACK_PP_ARRAY_PUSH_BACK(res, MSGPACK_PP_IIF(MSGPACK_PP_NOT_EQUAL(n, i), MSGPACK_PP_ARRAY_ELEM(n, arr), elem)), arr)
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,29 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_REVERSE_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_REVERSE_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/array/data.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/tuple/reverse.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_REVERSE */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_REVERSE(array) (MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_TUPLE_REVERSE(MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_ARRAY_DATA(array)))
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_REVERSE(array) MSGPACK_PP_ARRAY_REVERSE_I(array)
|
||||
# define MSGPACK_PP_ARRAY_REVERSE_I(array) (MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_TUPLE_REVERSE(MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_ARRAY_DATA(array)))
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,28 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_SIZE_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_SIZE_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_SIZE */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ARRAY_SIZE(array) MSGPACK_PP_TUPLE_ELEM(2, 0, array)
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_SIZE(array) MSGPACK_PP_ARRAY_SIZE_I(array)
|
||||
# define MSGPACK_PP_ARRAY_SIZE_I(array) MSGPACK_PP_ARRAY_SIZE_II array
|
||||
# define MSGPACK_PP_ARRAY_SIZE_II(size, data) size
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,47 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2011. *
|
||||
# * (C) Copyright Paul Mensonides 2011. *
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_TO_LIST_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_TO_LIST_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/cat.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/control/if.hpp>
|
||||
# include <msgpack/preprocessor/tuple/to_list.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_TO_LIST */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_TO_LIST(array) \
|
||||
MSGPACK_PP_IF \
|
||||
( \
|
||||
MSGPACK_PP_ARRAY_SIZE(array), \
|
||||
MSGPACK_PP_ARRAY_TO_LIST_DO, \
|
||||
MSGPACK_PP_ARRAY_TO_LIST_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_TO_LIST_EMPTY(array) MSGPACK_PP_NIL
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC()
|
||||
# define MSGPACK_PP_ARRAY_TO_LIST_DO(array) MSGPACK_PP_ARRAY_TO_LIST_I(MSGPACK_PP_TUPLE_TO_LIST, array)
|
||||
# define MSGPACK_PP_ARRAY_TO_LIST_I(m, args) MSGPACK_PP_ARRAY_TO_LIST_II(m, args)
|
||||
# define MSGPACK_PP_ARRAY_TO_LIST_II(m, args) MSGPACK_PP_CAT(m ## args,)
|
||||
# elif MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC()
|
||||
# define MSGPACK_PP_ARRAY_TO_LIST_DO(array) MSGPACK_PP_ARRAY_TO_LIST_I(array)
|
||||
# define MSGPACK_PP_ARRAY_TO_LIST_I(array) MSGPACK_PP_TUPLE_TO_LIST ## array
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_TO_LIST_DO(array) MSGPACK_PP_TUPLE_TO_LIST array
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,46 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2011. *
|
||||
# * (C) Copyright Paul Mensonides 2011. *
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_TO_SEQ_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_TO_SEQ_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/cat.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/control/if.hpp>
|
||||
# include <msgpack/preprocessor/tuple/to_seq.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_TO_SEQ */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_TO_SEQ(array) \
|
||||
MSGPACK_PP_IF \
|
||||
( \
|
||||
MSGPACK_PP_ARRAY_SIZE(array), \
|
||||
MSGPACK_PP_ARRAY_TO_SEQ_DO, \
|
||||
MSGPACK_PP_ARRAY_TO_SEQ_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
# define MSGPACK_PP_ARRAY_TO_SEQ_EMPTY(array)
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC()
|
||||
# define MSGPACK_PP_ARRAY_TO_SEQ_DO(array) MSGPACK_PP_ARRAY_TO_SEQ_I(MSGPACK_PP_TUPLE_TO_SEQ, array)
|
||||
# define MSGPACK_PP_ARRAY_TO_SEQ_I(m, args) MSGPACK_PP_ARRAY_TO_SEQ_II(m, args)
|
||||
# define MSGPACK_PP_ARRAY_TO_SEQ_II(m, args) MSGPACK_PP_CAT(m ## args,)
|
||||
# elif MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC()
|
||||
# define MSGPACK_PP_ARRAY_TO_SEQ_DO(array) MSGPACK_PP_ARRAY_TO_SEQ_I(array)
|
||||
# define MSGPACK_PP_ARRAY_TO_SEQ_I(array) MSGPACK_PP_TUPLE_TO_SEQ ## array
|
||||
# else
|
||||
# define MSGPACK_PP_ARRAY_TO_SEQ_DO(array) MSGPACK_PP_TUPLE_TO_SEQ array
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,33 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2011. *
|
||||
# * (C) Copyright Paul Mensonides 2011. *
|
||||
# * 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 MSGPACK_PREPROCESSOR_ARRAY_TO_TUPLE_HPP
|
||||
# define MSGPACK_PREPROCESSOR_ARRAY_TO_TUPLE_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/array/data.hpp>
|
||||
# include <msgpack/preprocessor/array/size.hpp>
|
||||
# include <msgpack/preprocessor/control/if.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ARRAY_TO_TUPLE */
|
||||
#
|
||||
# define MSGPACK_PP_ARRAY_TO_TUPLE(array) \
|
||||
MSGPACK_PP_IF \
|
||||
( \
|
||||
MSGPACK_PP_ARRAY_SIZE(array), \
|
||||
MSGPACK_PP_ARRAY_DATA, \
|
||||
MSGPACK_PP_ARRAY_TO_TUPLE_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
# define MSGPACK_PP_ARRAY_TO_TUPLE_EMPTY(array)
|
||||
#
|
||||
# endif
|
||||
Reference in New Issue
Block a user