]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/preprocessor/array/remove.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
a7ae78df19e4f904372abf323cefb79a96af4bde
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / preprocessor / array / remove.hpp
1 # /* **************************************************************************\r
2 #  *                                                                          *\r
3 #  *     (C) Copyright Paul Mensonides 2002.\r
4 #  *     Distributed under the Boost Software License, Version 1.0. (See\r
5 #  *     accompanying file LICENSE_1_0.txt or copy at\r
6 #  *     http://www.boost.org/LICENSE_1_0.txt)\r
7 #  *                                                                          *\r
8 #  ************************************************************************** */\r
9 #\r
10 # /* See http://www.boost.org for most recent version. */\r
11 #\r
12 # ifndef BOOST_PREPROCESSOR_ARRAY_REMOVE_HPP\r
13 # define BOOST_PREPROCESSOR_ARRAY_REMOVE_HPP\r
14 #\r
15 # include <boost/preprocessor/arithmetic/inc.hpp>\r
16 # include <boost/preprocessor/array/elem.hpp>\r
17 # include <boost/preprocessor/array/push_back.hpp>\r
18 # include <boost/preprocessor/array/size.hpp>\r
19 # include <boost/preprocessor/comparison/not_equal.hpp>\r
20 # include <boost/preprocessor/control/deduce_d.hpp>\r
21 # include <boost/preprocessor/control/iif.hpp>\r
22 # include <boost/preprocessor/control/while.hpp>\r
23 # include <boost/preprocessor/tuple/eat.hpp>\r
24 # include <boost/preprocessor/tuple/elem.hpp>\r
25 #\r
26 # /* BOOST_PP_ARRAY_REMOVE */\r
27 #\r
28 # define BOOST_PP_ARRAY_REMOVE(array, i) BOOST_PP_ARRAY_REMOVE_I(BOOST_PP_DEDUCE_D(), array, i)\r
29 # define BOOST_PP_ARRAY_REMOVE_I(d, array, i) BOOST_PP_ARRAY_REMOVE_D(d, array, i)\r
30 #\r
31 # /* BOOST_PP_ARRAY_REMOVE_D */\r
32 #\r
33 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()\r
34 #    define BOOST_PP_ARRAY_REMOVE_D(d, array, i) BOOST_PP_TUPLE_ELEM(4, 2, BOOST_PP_WHILE_ ## d(BOOST_PP_ARRAY_REMOVE_P, BOOST_PP_ARRAY_REMOVE_O, (0, i, (0, ()), array)))\r
35 # else\r
36 #    define BOOST_PP_ARRAY_REMOVE_D(d, array, i) BOOST_PP_ARRAY_REMOVE_D_I(d, array, i)\r
37 #    define BOOST_PP_ARRAY_REMOVE_D_I(d, array, i) BOOST_PP_TUPLE_ELEM(4, 2, BOOST_PP_WHILE_ ## d(BOOST_PP_ARRAY_REMOVE_P, BOOST_PP_ARRAY_REMOVE_O, (0, i, (0, ()), array)))\r
38 # endif\r
39 #\r
40 # define BOOST_PP_ARRAY_REMOVE_P(d, st) BOOST_PP_NOT_EQUAL(BOOST_PP_TUPLE_ELEM(4, 0, st), BOOST_PP_ARRAY_SIZE(BOOST_PP_TUPLE_ELEM(4, 3, st)))\r
41 #\r
42 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()\r
43 #    define BOOST_PP_ARRAY_REMOVE_O(d, st) BOOST_PP_ARRAY_REMOVE_O_I st\r
44 # else\r
45 #    define BOOST_PP_ARRAY_REMOVE_O(d, st) BOOST_PP_ARRAY_REMOVE_O_I(BOOST_PP_TUPLE_ELEM(4, 0, st), BOOST_PP_TUPLE_ELEM(4, 1, st), BOOST_PP_TUPLE_ELEM(4, 2, st), BOOST_PP_TUPLE_ELEM(4, 3, st))\r
46 # endif\r
47 #\r
48 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()\r
49 #    define BOOST_PP_ARRAY_REMOVE_O_I(n, i, res, arr) (BOOST_PP_INC(n), i, BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(n, i), BOOST_PP_ARRAY_PUSH_BACK, res BOOST_PP_TUPLE_EAT_2)(res, BOOST_PP_ARRAY_ELEM(n, arr)), arr)\r
50 # else\r
51 #    define BOOST_PP_ARRAY_REMOVE_O_I(n, i, res, arr) (BOOST_PP_INC(n), i, BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(n, i), BOOST_PP_ARRAY_PUSH_BACK, BOOST_PP_TUPLE_ELEM_2_0)(res, BOOST_PP_ARRAY_ELEM(n, arr)), arr)\r
52 # endif\r
53 #\r
54 # endif\r