Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: hello_message_pack
remove.hpp
00001 # /* ************************************************************************** 00002 # * * 00003 # * (C) Copyright Paul Mensonides 2002. 00004 # * Distributed under the Boost Software License, Version 1.0. (See 00005 # * accompanying file LICENSE_1_0.txt or copy at 00006 # * http://www.boost.org/LICENSE_1_0.txt) 00007 # * * 00008 # ************************************************************************** */ 00009 # 00010 # /* See http://www.boost.org for most recent version. */ 00011 # 00012 # ifndef MSGPACK_PREPROCESSOR_ARRAY_REMOVE_HPP 00013 # define MSGPACK_PREPROCESSOR_ARRAY_REMOVE_HPP 00014 # 00015 # include <msgpack/preprocessor/arithmetic/inc.hpp> 00016 # include <msgpack/preprocessor/array/elem.hpp> 00017 # include <msgpack/preprocessor/array/push_back.hpp> 00018 # include <msgpack/preprocessor/array/size.hpp> 00019 # include <msgpack/preprocessor/comparison/not_equal.hpp> 00020 # include <msgpack/preprocessor/control/deduce_d.hpp> 00021 # include <msgpack/preprocessor/control/iif.hpp> 00022 # include <msgpack/preprocessor/control/while.hpp> 00023 # include <msgpack/preprocessor/tuple/eat.hpp> 00024 # include <msgpack/preprocessor/tuple/elem.hpp> 00025 # 00026 # /* MSGPACK_PP_ARRAY_REMOVE */ 00027 # 00028 # define MSGPACK_PP_ARRAY_REMOVE(array, i) MSGPACK_PP_ARRAY_REMOVE_I(MSGPACK_PP_DEDUCE_D(), array, i) 00029 # define MSGPACK_PP_ARRAY_REMOVE_I(d, array, i) MSGPACK_PP_ARRAY_REMOVE_D(d, array, i) 00030 # 00031 # /* MSGPACK_PP_ARRAY_REMOVE_D */ 00032 # 00033 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG() 00034 # 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))) 00035 # else 00036 # define MSGPACK_PP_ARRAY_REMOVE_D(d, array, i) MSGPACK_PP_ARRAY_REMOVE_D_I(d, array, i) 00037 # 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))) 00038 # endif 00039 # 00040 # 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))) 00041 # 00042 # if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT() 00043 # define MSGPACK_PP_ARRAY_REMOVE_O(d, st) MSGPACK_PP_ARRAY_REMOVE_O_I st 00044 # else 00045 # 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)) 00046 # endif 00047 # 00048 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_DMC() 00049 # 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) 00050 # else 00051 # 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) 00052 # endif 00053 # 00054 # endif
Generated on Tue Jul 12 2022 22:51:46 by
1.7.2