├── README.md ├── arithmetic.hpp ├── arithmetic ├── add.hpp ├── dec.hpp ├── detail │ └── div_base.hpp ├── div.hpp ├── inc.hpp ├── mod.hpp ├── mul.hpp └── sub.hpp ├── array.hpp ├── array ├── data.hpp ├── elem.hpp ├── enum.hpp ├── insert.hpp ├── pop_back.hpp ├── pop_front.hpp ├── push_back.hpp ├── push_front.hpp ├── remove.hpp ├── replace.hpp ├── reverse.hpp ├── size.hpp ├── to_list.hpp ├── to_seq.hpp └── to_tuple.hpp ├── assert_msg.hpp ├── cat.hpp ├── comma.hpp ├── comma_if.hpp ├── comparison.hpp ├── comparison ├── equal.hpp ├── greater.hpp ├── greater_equal.hpp ├── less.hpp ├── less_equal.hpp └── not_equal.hpp ├── config ├── config.hpp └── limits.hpp ├── control.hpp ├── control ├── deduce_d.hpp ├── detail │ ├── dmc │ │ └── while.hpp │ ├── edg │ │ └── while.hpp │ ├── msvc │ │ └── while.hpp │ └── while.hpp ├── expr_if.hpp ├── expr_iif.hpp ├── if.hpp ├── iif.hpp └── while.hpp ├── debug.hpp ├── debug ├── assert.hpp ├── error.hpp └── line.hpp ├── dec.hpp ├── detail ├── auto_rec.hpp ├── check.hpp ├── dmc │ └── auto_rec.hpp ├── is_binary.hpp ├── is_nullary.hpp ├── is_unary.hpp ├── null.hpp └── split.hpp ├── empty.hpp ├── enum.hpp ├── enum_params.hpp ├── enum_params_with_a_default.hpp ├── enum_params_with_defaults.hpp ├── enum_shifted.hpp ├── enum_shifted_params.hpp ├── expand.hpp ├── expr_if.hpp ├── facilities.hpp ├── facilities ├── apply.hpp ├── empty.hpp ├── expand.hpp ├── identity.hpp ├── intercept.hpp ├── is_1.hpp ├── is_empty.hpp ├── is_empty_or_1.hpp └── overload.hpp ├── for.hpp ├── identity.hpp ├── if.hpp ├── inc.hpp ├── iterate.hpp ├── iteration.hpp ├── iteration ├── detail │ ├── bounds │ │ ├── lower1.hpp │ │ ├── lower2.hpp │ │ ├── lower3.hpp │ │ ├── lower4.hpp │ │ ├── lower5.hpp │ │ ├── upper1.hpp │ │ ├── upper2.hpp │ │ ├── upper3.hpp │ │ ├── upper4.hpp │ │ └── upper5.hpp │ ├── finish.hpp │ ├── iter │ │ ├── forward1.hpp │ │ ├── forward2.hpp │ │ ├── forward3.hpp │ │ ├── forward4.hpp │ │ ├── forward5.hpp │ │ ├── reverse1.hpp │ │ ├── reverse2.hpp │ │ ├── reverse3.hpp │ │ ├── reverse4.hpp │ │ └── reverse5.hpp │ ├── local.hpp │ ├── rlocal.hpp │ ├── self.hpp │ └── start.hpp ├── iterate.hpp ├── local.hpp └── self.hpp ├── library.hpp ├── limits.hpp ├── list.hpp ├── list ├── adt.hpp ├── append.hpp ├── at.hpp ├── cat.hpp ├── detail │ ├── dmc │ │ └── fold_left.hpp │ ├── edg │ │ ├── fold_left.hpp │ │ └── fold_right.hpp │ ├── fold_left.hpp │ └── fold_right.hpp ├── enum.hpp ├── filter.hpp ├── first_n.hpp ├── fold_left.hpp ├── fold_right.hpp ├── for_each.hpp ├── for_each_i.hpp ├── for_each_product.hpp ├── rest_n.hpp ├── reverse.hpp ├── size.hpp ├── to_array.hpp ├── to_seq.hpp ├── to_tuple.hpp └── transform.hpp ├── logical.hpp ├── logical ├── and.hpp ├── bitand.hpp ├── bitnor.hpp ├── bitor.hpp ├── bitxor.hpp ├── bool.hpp ├── compl.hpp ├── nor.hpp ├── not.hpp ├── or.hpp └── xor.hpp ├── max.hpp ├── min.hpp ├── punctuation.hpp ├── punctuation ├── comma.hpp ├── comma_if.hpp ├── paren.hpp └── paren_if.hpp ├── repeat.hpp ├── repeat_2nd.hpp ├── repeat_3rd.hpp ├── repeat_from_to.hpp ├── repeat_from_to_2nd.hpp ├── repeat_from_to_3rd.hpp ├── repetition.hpp ├── repetition ├── deduce_r.hpp ├── deduce_z.hpp ├── detail │ ├── dmc │ │ └── for.hpp │ ├── edg │ │ └── for.hpp │ ├── for.hpp │ └── msvc │ │ └── for.hpp ├── enum.hpp ├── enum_binary_params.hpp ├── enum_params.hpp ├── enum_params_with_a_default.hpp ├── enum_params_with_defaults.hpp ├── enum_shifted.hpp ├── enum_shifted_binary_params.hpp ├── enum_shifted_params.hpp ├── enum_trailing.hpp ├── enum_trailing_binary_params.hpp ├── enum_trailing_params.hpp ├── for.hpp ├── repeat.hpp └── repeat_from_to.hpp ├── selection.hpp ├── selection ├── max.hpp └── min.hpp ├── seq.hpp ├── seq ├── cat.hpp ├── detail │ ├── binary_transform.hpp │ └── split.hpp ├── elem.hpp ├── enum.hpp ├── filter.hpp ├── first_n.hpp ├── fold_left.hpp ├── fold_right.hpp ├── for_each.hpp ├── for_each_i.hpp ├── for_each_product.hpp ├── insert.hpp ├── pop_back.hpp ├── pop_front.hpp ├── push_back.hpp ├── push_front.hpp ├── remove.hpp ├── replace.hpp ├── rest_n.hpp ├── reverse.hpp ├── seq.hpp ├── size.hpp ├── subseq.hpp ├── to_array.hpp ├── to_list.hpp ├── to_tuple.hpp └── transform.hpp ├── slot.hpp ├── slot ├── counter.hpp ├── detail │ ├── counter.hpp │ ├── def.hpp │ ├── shared.hpp │ ├── slot1.hpp │ ├── slot2.hpp │ ├── slot3.hpp │ ├── slot4.hpp │ └── slot5.hpp └── slot.hpp ├── stringize.hpp ├── tuple.hpp ├── tuple ├── eat.hpp ├── elem.hpp ├── enum.hpp ├── rem.hpp ├── reverse.hpp ├── size.hpp ├── to_array.hpp ├── to_list.hpp └── to_seq.hpp ├── variadic.hpp ├── variadic ├── elem.hpp ├── size.hpp ├── to_array.hpp ├── to_list.hpp ├── to_seq.hpp └── to_tuple.hpp ├── while.hpp └── wstringize.hpp /README.md: -------------------------------------------------------------------------------- 1 | boost-preprocessor 2 | ================== 3 | 4 | standalone boost preprocessor library -------------------------------------------------------------------------------- /arithmetic.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /arithmetic/add.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_ADD */ 24 | # 25 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 26 | # define BOOST_PP_ADD(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) 27 | # else 28 | # define BOOST_PP_ADD(x, y) BOOST_PP_ADD_I(x, y) 29 | # define BOOST_PP_ADD_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) 30 | # endif 31 | # 32 | # define BOOST_PP_ADD_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) 33 | # 34 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 35 | # define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I xy 36 | # else 37 | # define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) 38 | # endif 39 | # 40 | # define BOOST_PP_ADD_O_I(x, y) (BOOST_PP_INC(x), BOOST_PP_DEC(y)) 41 | # 42 | # /* BOOST_PP_ADD_D */ 43 | # 44 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 45 | # define BOOST_PP_ADD_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) 46 | # else 47 | # define BOOST_PP_ADD_D(d, x, y) BOOST_PP_ADD_D_I(d, x, y) 48 | # define BOOST_PP_ADD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) 49 | # endif 50 | # 51 | # endif 52 | -------------------------------------------------------------------------------- /arithmetic/div.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_DIV_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_DIV_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_DIV */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_DIV(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y)) 25 | # else 26 | # define BOOST_PP_DIV(x, y) BOOST_PP_DIV_I(x, y) 27 | # define BOOST_PP_DIV_I(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y)) 28 | # endif 29 | # 30 | # /* BOOST_PP_DIV_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_DIV_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y)) 34 | # else 35 | # define BOOST_PP_DIV_D(d, x, y) BOOST_PP_DIV_D_I(d, x, y) 36 | # define BOOST_PP_DIV_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y)) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /arithmetic/mod.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_MOD */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_MOD(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y)) 25 | # else 26 | # define BOOST_PP_MOD(x, y) BOOST_PP_MOD_I(x, y) 27 | # define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y)) 28 | # endif 29 | # 30 | # /* BOOST_PP_MOD_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_MOD_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y)) 34 | # else 35 | # define BOOST_PP_MOD_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y) 36 | # define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y)) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /arithmetic/mul.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_MUL_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_MUL_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # 24 | # /* BOOST_PP_MUL */ 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 27 | # define BOOST_PP_MUL(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE(BOOST_PP_MUL_P, BOOST_PP_MUL_O, (0, x, y))) 28 | # else 29 | # define BOOST_PP_MUL(x, y) BOOST_PP_MUL_I(x, y) 30 | # define BOOST_PP_MUL_I(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE(BOOST_PP_MUL_P, BOOST_PP_MUL_O, (0, x, y))) 31 | # endif 32 | # 33 | # define BOOST_PP_MUL_P(d, rxy) BOOST_PP_TUPLE_ELEM(3, 2, rxy) 34 | # 35 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() 36 | # define BOOST_PP_MUL_O(d, rxy) BOOST_PP_MUL_O_IM(d, BOOST_PP_TUPLE_REM_3 rxy) 37 | # define BOOST_PP_MUL_O_IM(d, im) BOOST_PP_MUL_O_I(d, im) 38 | # else 39 | # define BOOST_PP_MUL_O(d, rxy) BOOST_PP_MUL_O_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy)) 40 | # endif 41 | # 42 | # define BOOST_PP_MUL_O_I(d, r, x, y) (BOOST_PP_ADD_D(d, r, x), x, BOOST_PP_DEC(y)) 43 | # 44 | # /* BOOST_PP_MUL_D */ 45 | # 46 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 47 | # define BOOST_PP_MUL_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_MUL_P, BOOST_PP_MUL_O, (0, x, y))) 48 | # else 49 | # define BOOST_PP_MUL_D(d, x, y) BOOST_PP_MUL_D_I(d, x, y) 50 | # define BOOST_PP_MUL_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_MUL_P, BOOST_PP_MUL_O, (0, x, y))) 51 | # endif 52 | # 53 | # endif 54 | -------------------------------------------------------------------------------- /arithmetic/sub.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_SUB */ 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 25 | # define BOOST_PP_SUB(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) 26 | # else 27 | # define BOOST_PP_SUB(x, y) BOOST_PP_SUB_I(x, y) 28 | # define BOOST_PP_SUB_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) 29 | # endif 30 | # 31 | # define BOOST_PP_SUB_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) 32 | # 33 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 34 | # define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy 35 | # else 36 | # define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) 37 | # endif 38 | # 39 | # define BOOST_PP_SUB_O_I(x, y) (BOOST_PP_DEC(x), BOOST_PP_DEC(y)) 40 | # 41 | # /* BOOST_PP_SUB_D */ 42 | # 43 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 44 | # define BOOST_PP_SUB_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) 45 | # else 46 | # define BOOST_PP_SUB_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y) 47 | # define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) 48 | # endif 49 | # 50 | # endif 51 | -------------------------------------------------------------------------------- /array.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002-2011. * 4 | # * (C) Copyright Edward Diener 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_ARRAY_HPP 14 | # define BOOST_PREPROCESSOR_ARRAY_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # include 29 | # include 30 | # include 31 | # 32 | # endif 33 | -------------------------------------------------------------------------------- /array/data.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_DATA_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_DATA_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_ARRAY_DATA */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_ARRAY_DATA(array) BOOST_PP_TUPLE_ELEM(2, 1, array) 22 | # else 23 | # define BOOST_PP_ARRAY_DATA(array) BOOST_PP_ARRAY_DATA_I(array) 24 | # define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_II array 25 | # define BOOST_PP_ARRAY_DATA_II(size, data) data 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /array/elem.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_ELEM_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_ELEM_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ARRAY_ELEM */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) 24 | # else 25 | # define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_ARRAY_ELEM_I(i, array) 26 | # define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /array/enum.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_ARRAY_ENUM_HPP 14 | # define BOOST_PREPROCESSOR_ARRAY_ENUM_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ARRAY_ENUM */ 21 | # 22 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 23 | # define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(BOOST_PP_TUPLE_REM_CTOR, array) 24 | # define BOOST_PP_ARRAY_ENUM_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args) 25 | # define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(m ## args,) 26 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 27 | # define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(array) 28 | # define BOOST_PP_ARRAY_ENUM_I(array) BOOST_PP_TUPLE_REM_CTOR ## array 29 | # else 30 | # define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_TUPLE_REM_CTOR array 31 | # endif 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /array/pop_back.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_POP_BACK_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_POP_BACK_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_ARRAY_POP_BACK */ 22 | # 23 | # define BOOST_PP_ARRAY_POP_BACK(array) BOOST_PP_ARRAY_POP_BACK_Z(BOOST_PP_DEDUCE_Z(), array) 24 | # 25 | # /* BOOST_PP_ARRAY_POP_BACK_Z */ 26 | # 27 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 28 | # define BOOST_PP_ARRAY_POP_BACK_Z(z, array) BOOST_PP_ARRAY_POP_BACK_I(z, BOOST_PP_ARRAY_SIZE(array), array) 29 | # else 30 | # define BOOST_PP_ARRAY_POP_BACK_Z(z, array) BOOST_PP_ARRAY_POP_BACK_Z_D(z, array) 31 | # define BOOST_PP_ARRAY_POP_BACK_Z_D(z, array) BOOST_PP_ARRAY_POP_BACK_I(z, BOOST_PP_ARRAY_SIZE(array), array) 32 | # endif 33 | # 34 | # define BOOST_PP_ARRAY_POP_BACK_I(z, size, array) (BOOST_PP_DEC(size), (BOOST_PP_ENUM_ ## z(BOOST_PP_DEC(size), BOOST_PP_ARRAY_POP_BACK_M, array))) 35 | # define BOOST_PP_ARRAY_POP_BACK_M(z, n, data) BOOST_PP_ARRAY_ELEM(n, data) 36 | # 37 | # endif 38 | -------------------------------------------------------------------------------- /array/pop_front.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_POP_FRONT_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_POP_FRONT_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_ARRAY_POP_FRONT */ 23 | # 24 | # define BOOST_PP_ARRAY_POP_FRONT(array) BOOST_PP_ARRAY_POP_FRONT_Z(BOOST_PP_DEDUCE_Z(), array) 25 | # 26 | # /* BOOST_PP_ARRAY_POP_FRONT_Z */ 27 | # 28 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 29 | # define BOOST_PP_ARRAY_POP_FRONT_Z(z, array) BOOST_PP_ARRAY_POP_FRONT_I(z, BOOST_PP_ARRAY_SIZE(array), array) 30 | # else 31 | # define BOOST_PP_ARRAY_POP_FRONT_Z(z, array) BOOST_PP_ARRAY_POP_FRONT_Z_D(z, array) 32 | # define BOOST_PP_ARRAY_POP_FRONT_Z_D(z, array) BOOST_PP_ARRAY_POP_FRONT_I(z, BOOST_PP_ARRAY_SIZE(array), array) 33 | # endif 34 | # 35 | # define BOOST_PP_ARRAY_POP_FRONT_I(z, size, array) (BOOST_PP_DEC(size), (BOOST_PP_ENUM_ ## z(BOOST_PP_DEC(size), BOOST_PP_ARRAY_POP_FRONT_M, array))) 36 | # define BOOST_PP_ARRAY_POP_FRONT_M(z, n, data) BOOST_PP_ARRAY_ELEM(BOOST_PP_INC(n), data) 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /array/push_back.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_PUSH_BACK_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_PUSH_BACK_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_ARRAY_PUSH_BACK */ 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 25 | # define BOOST_PP_ARRAY_PUSH_BACK(array, elem) BOOST_PP_ARRAY_PUSH_BACK_I(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array), elem) 26 | # else 27 | # define BOOST_PP_ARRAY_PUSH_BACK(array, elem) BOOST_PP_ARRAY_PUSH_BACK_D(array, elem) 28 | # define BOOST_PP_ARRAY_PUSH_BACK_D(array, elem) BOOST_PP_ARRAY_PUSH_BACK_I(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array), elem) 29 | # endif 30 | # 31 | # define BOOST_PP_ARRAY_PUSH_BACK_I(size, data, elem) (BOOST_PP_INC(size), (BOOST_PP_TUPLE_REM(size) data BOOST_PP_COMMA_IF(size) elem)) 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /array/push_front.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_PUSH_FRONT_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_PUSH_FRONT_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_ARRAY_PUSH_FRONT */ 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 25 | # define BOOST_PP_ARRAY_PUSH_FRONT(array, elem) BOOST_PP_ARRAY_PUSH_FRONT_I(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array), elem) 26 | # else 27 | # define BOOST_PP_ARRAY_PUSH_FRONT(array, elem) BOOST_PP_ARRAY_PUSH_FRONT_D(array, elem) 28 | # define BOOST_PP_ARRAY_PUSH_FRONT_D(array, elem) BOOST_PP_ARRAY_PUSH_FRONT_I(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array), elem) 29 | # endif 30 | # 31 | # define BOOST_PP_ARRAY_PUSH_FRONT_I(size, data, elem) (BOOST_PP_INC(size), (elem BOOST_PP_COMMA_IF(size) BOOST_PP_TUPLE_REM(size) data)) 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /array/reverse.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_REVERSE_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_REVERSE_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ARRAY_REVERSE */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_ARRAY_REVERSE(array) (BOOST_PP_ARRAY_SIZE(array), BOOST_PP_TUPLE_REVERSE(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array))) 24 | # else 25 | # define BOOST_PP_ARRAY_REVERSE(array) BOOST_PP_ARRAY_REVERSE_I(array) 26 | # define BOOST_PP_ARRAY_REVERSE_I(array) (BOOST_PP_ARRAY_SIZE(array), BOOST_PP_TUPLE_REVERSE(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array))) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /array/size.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_SIZE_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_SIZE_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_ARRAY_SIZE */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_TUPLE_ELEM(2, 0, array) 22 | # else 23 | # define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array) 24 | # define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_II array 25 | # define BOOST_PP_ARRAY_SIZE_II(size, data) size 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /array/to_list.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_ARRAY_TO_LIST_HPP 14 | # define BOOST_PREPROCESSOR_ARRAY_TO_LIST_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ARRAY_TO_LIST */ 21 | # 22 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 23 | # define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_ARRAY_TO_LIST_I(BOOST_PP_TUPLE_TO_LIST, array) 24 | # define BOOST_PP_ARRAY_TO_LIST_I(m, args) BOOST_PP_ARRAY_TO_LIST_II(m, args) 25 | # define BOOST_PP_ARRAY_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,) 26 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 27 | # define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_ARRAY_TO_LIST_I(array) 28 | # define BOOST_PP_ARRAY_TO_LIST_I(array) BOOST_PP_TUPLE_TO_LIST ## array 29 | # else 30 | # define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_TUPLE_TO_LIST array 31 | # endif 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /array/to_seq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_ARRAY_TO_SEQ_HPP 14 | # define BOOST_PREPROCESSOR_ARRAY_TO_SEQ_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ARRAY_TO_SEQ */ 21 | # 22 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 23 | # define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_ARRAY_TO_SEQ_I(BOOST_PP_TUPLE_TO_SEQ, array) 24 | # define BOOST_PP_ARRAY_TO_SEQ_I(m, args) BOOST_PP_ARRAY_TO_SEQ_II(m, args) 25 | # define BOOST_PP_ARRAY_TO_SEQ_II(m, args) BOOST_PP_CAT(m ## args,) 26 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 27 | # define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_ARRAY_TO_SEQ_I(array) 28 | # define BOOST_PP_ARRAY_TO_SEQ_I(array) BOOST_PP_TUPLE_TO_SEQ ## array 29 | # else 30 | # define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_TUPLE_TO_SEQ array 31 | # endif 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /array/to_tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP 14 | # define BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP 15 | # 16 | # include 17 | # 18 | # /* BOOST_PP_ARRAY_TO_TUPLE */ 19 | # 20 | # define BOOST_PP_ARRAY_TO_TUPLE BOOST_PP_ARRAY_DATA 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /assert_msg.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ASSERT_MSG_HPP 13 | # define BOOST_PREPROCESSOR_ASSERT_MSG_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /cat.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_CAT_HPP 15 | # define BOOST_PREPROCESSOR_CAT_HPP 16 | # 17 | # include 18 | # 19 | # /* BOOST_PP_CAT */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 22 | # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) 23 | # else 24 | # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b)) 25 | # define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par 26 | # endif 27 | # 28 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 29 | # define BOOST_PP_CAT_I(a, b) a ## b 30 | # else 31 | # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b) 32 | # define BOOST_PP_CAT_II(p, res) res 33 | # endif 34 | # 35 | # endif 36 | -------------------------------------------------------------------------------- /comma.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_COMMA_HPP 13 | # define BOOST_PREPROCESSOR_COMMA_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /comma_if.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_COMMA_IF_HPP 13 | # define BOOST_PREPROCESSOR_COMMA_IF_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /comparison.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # 24 | # endif 25 | -------------------------------------------------------------------------------- /comparison/equal.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_EQUAL */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_EQUAL(x, y) BOOST_PP_COMPL(BOOST_PP_NOT_EQUAL(x, y)) 25 | # else 26 | # define BOOST_PP_EQUAL(x, y) BOOST_PP_EQUAL_I(x, y) 27 | # define BOOST_PP_EQUAL_I(x, y) BOOST_PP_COMPL(BOOST_PP_NOT_EQUAL(x, y)) 28 | # endif 29 | # 30 | # /* BOOST_PP_EQUAL_D */ 31 | # 32 | # define BOOST_PP_EQUAL_D(d, x, y) BOOST_PP_EQUAL(x, y) 33 | # 34 | # endif 35 | -------------------------------------------------------------------------------- /comparison/greater.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_GREATER */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_GREATER(x, y) BOOST_PP_LESS(y, x) 24 | # else 25 | # define BOOST_PP_GREATER(x, y) BOOST_PP_GREATER_I(x, y) 26 | # define BOOST_PP_GREATER_I(x, y) BOOST_PP_LESS(y, x) 27 | # endif 28 | # 29 | # /* BOOST_PP_GREATER_D */ 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_LESS_D(d, y, x) 33 | # else 34 | # define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_GREATER_D_I(d, x, y) 35 | # define BOOST_PP_GREATER_D_I(d, x, y) BOOST_PP_LESS_D(d, y, x) 36 | # endif 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /comparison/greater_equal.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_EQUAL_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_GREATER_EQUAL_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_GREATER_EQUAL */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_GREATER_EQUAL(x, y) BOOST_PP_LESS_EQUAL(y, x) 24 | # else 25 | # define BOOST_PP_GREATER_EQUAL(x, y) BOOST_PP_GREATER_EQUAL_I(x, y) 26 | # define BOOST_PP_GREATER_EQUAL_I(x, y) BOOST_PP_LESS_EQUAL(y, x) 27 | # endif 28 | # 29 | # /* BOOST_PP_GREATER_EQUAL_D */ 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_GREATER_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) 33 | # else 34 | # define BOOST_PP_GREATER_EQUAL_D(d, x, y) BOOST_PP_GREATER_EQUAL_D_I(d, x, y) 35 | # define BOOST_PP_GREATER_EQUAL_D_I(d, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) 36 | # endif 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /comparison/less.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_LESS_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # 24 | # /* BOOST_PP_LESS */ 25 | # 26 | # if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC()) 27 | # define BOOST_PP_LESS(x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL(x, y)) 28 | # elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 29 | # define BOOST_PP_LESS(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y) 30 | # else 31 | # define BOOST_PP_LESS(x, y) BOOST_PP_LESS_I(x, y) 32 | # define BOOST_PP_LESS_I(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y) 33 | # endif 34 | # 35 | # /* BOOST_PP_LESS_D */ 36 | # 37 | # if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC()) 38 | # define BOOST_PP_LESS_D(d, x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D(d, x, y)) 39 | # elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 40 | # define BOOST_PP_LESS_D(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y) 41 | # else 42 | # define BOOST_PP_LESS_D(d, x, y) BOOST_PP_LESS_D_I(d, x, y) 43 | # define BOOST_PP_LESS_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y) 44 | # endif 45 | # 46 | # endif 47 | -------------------------------------------------------------------------------- /comparison/less_equal.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_LESS_EQUAL */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) 25 | # else 26 | # define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_LESS_EQUAL_I(x, y) 27 | # define BOOST_PP_LESS_EQUAL_I(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) 28 | # endif 29 | # 30 | # /* BOOST_PP_LESS_EQUAL_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) 34 | # else 35 | # define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D_I(d, x, y) 36 | # define BOOST_PP_LESS_EQUAL_D_I(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /config/limits.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # /* Revised by Edward Diener (2011) */ 12 | # 13 | # /* See http://www.boost.org for most recent version. */ 14 | # 15 | # ifndef BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP 16 | # define BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP 17 | # 18 | # define BOOST_PP_LIMIT_MAG 256 19 | # define BOOST_PP_LIMIT_TUPLE 64 20 | # define BOOST_PP_LIMIT_DIM 3 21 | # define BOOST_PP_LIMIT_REPEAT 256 22 | # define BOOST_PP_LIMIT_WHILE 256 23 | # define BOOST_PP_LIMIT_FOR 256 24 | # define BOOST_PP_LIMIT_ITERATION 256 25 | # define BOOST_PP_LIMIT_ITERATION_DIM 3 26 | # define BOOST_PP_LIMIT_SEQ 256 27 | # define BOOST_PP_LIMIT_SLOT_SIG 10 28 | # define BOOST_PP_LIMIT_SLOT_COUNT 5 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /control.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_CONTROL_HPP 13 | # define BOOST_PREPROCESSOR_CONTROL_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /control/deduce_d.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP 13 | # define BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_DEDUCE_D */ 19 | # 20 | # define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256) 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /control/expr_if.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP 15 | # define BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_EXPR_IF */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) 25 | # else 26 | # define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IF_I(cond, expr) 27 | # define BOOST_PP_EXPR_IF_I(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /control/expr_iif.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP 13 | # define BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_EXPR_IIF */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_I(bit, expr) 21 | # else 22 | # define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_OO((bit, expr)) 23 | # define BOOST_PP_EXPR_IIF_OO(par) BOOST_PP_EXPR_IIF_I ## par 24 | # endif 25 | # 26 | # define BOOST_PP_EXPR_IIF_I(bit, expr) BOOST_PP_EXPR_IIF_ ## bit(expr) 27 | # 28 | # define BOOST_PP_EXPR_IIF_0(expr) 29 | # define BOOST_PP_EXPR_IIF_1(expr) expr 30 | # 31 | # endif 32 | -------------------------------------------------------------------------------- /control/if.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_CONTROL_IF_HPP 15 | # define BOOST_PREPROCESSOR_CONTROL_IF_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_IF */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_IF(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) 25 | # else 26 | # define BOOST_PP_IF(cond, t, f) BOOST_PP_IF_I(cond, t, f) 27 | # define BOOST_PP_IF_I(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /control/iif.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_CONTROL_IIF_HPP 13 | # define BOOST_PREPROCESSOR_CONTROL_IIF_HPP 14 | # 15 | # include 16 | # 17 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 18 | # define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_I(bit, t, f) 19 | # else 20 | # define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_OO((bit, t, f)) 21 | # define BOOST_PP_IIF_OO(par) BOOST_PP_IIF_I ## par 22 | # endif 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 25 | # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f) 26 | # else 27 | # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_II(BOOST_PP_IIF_ ## bit(t, f)) 28 | # define BOOST_PP_IIF_II(id) id 29 | # endif 30 | # 31 | # define BOOST_PP_IIF_0(t, f) f 32 | # define BOOST_PP_IIF_1(t, f) t 33 | # 34 | # endif 35 | -------------------------------------------------------------------------------- /debug.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DEBUG_HPP 13 | # define BOOST_PREPROCESSOR_DEBUG_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # endif 19 | -------------------------------------------------------------------------------- /debug/assert.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP 15 | # define BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_ASSERT */ 24 | # 25 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 26 | # define BOOST_PP_ASSERT BOOST_PP_ASSERT_D 27 | # else 28 | # define BOOST_PP_ASSERT(cond) BOOST_PP_ASSERT_D(cond) 29 | # endif 30 | # 31 | # define BOOST_PP_ASSERT_D(cond) BOOST_PP_IIF(BOOST_PP_NOT(cond), BOOST_PP_ASSERT_ERROR, BOOST_PP_TUPLE_EAT_1)(...) 32 | # define BOOST_PP_ASSERT_ERROR(x, y, z) 33 | # 34 | # /* BOOST_PP_ASSERT_MSG */ 35 | # 36 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 37 | # define BOOST_PP_ASSERT_MSG BOOST_PP_ASSERT_MSG_D 38 | # else 39 | # define BOOST_PP_ASSERT_MSG(cond, msg) BOOST_PP_ASSERT_MSG_D(cond, msg) 40 | # endif 41 | # 42 | # define BOOST_PP_ASSERT_MSG_D(cond, msg) BOOST_PP_EXPR_IIF(BOOST_PP_NOT(cond), msg) 43 | # 44 | # endif 45 | -------------------------------------------------------------------------------- /debug/error.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DEBUG_ERROR_HPP 13 | # define BOOST_PREPROCESSOR_DEBUG_ERROR_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_ERROR */ 19 | # 20 | # if BOOST_PP_CONFIG_ERRORS 21 | # define BOOST_PP_ERROR(code) BOOST_PP_CAT(BOOST_PP_ERROR_, code) 22 | # endif 23 | # 24 | # define BOOST_PP_ERROR_0x0000 BOOST_PP_ERROR(0x0000, BOOST_PP_INDEX_OUT_OF_BOUNDS) 25 | # define BOOST_PP_ERROR_0x0001 BOOST_PP_ERROR(0x0001, BOOST_PP_WHILE_OVERFLOW) 26 | # define BOOST_PP_ERROR_0x0002 BOOST_PP_ERROR(0x0002, BOOST_PP_FOR_OVERFLOW) 27 | # define BOOST_PP_ERROR_0x0003 BOOST_PP_ERROR(0x0003, BOOST_PP_REPEAT_OVERFLOW) 28 | # define BOOST_PP_ERROR_0x0004 BOOST_PP_ERROR(0x0004, BOOST_PP_LIST_FOLD_OVERFLOW) 29 | # define BOOST_PP_ERROR_0x0005 BOOST_PP_ERROR(0x0005, BOOST_PP_SEQ_FOLD_OVERFLOW) 30 | # define BOOST_PP_ERROR_0x0006 BOOST_PP_ERROR(0x0006, BOOST_PP_ARITHMETIC_OVERFLOW) 31 | # define BOOST_PP_ERROR_0x0007 BOOST_PP_ERROR(0x0007, BOOST_PP_DIVISION_BY_ZERO) 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /debug/line.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DEBUG_LINE_HPP 13 | # define BOOST_PREPROCESSOR_DEBUG_LINE_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_LINE */ 21 | # 22 | # if BOOST_PP_CONFIG_EXTENDED_LINE_INFO 23 | # define BOOST_PP_LINE(line, file) line BOOST_PP_CAT(BOOST_PP_LINE_, BOOST_PP_IS_ITERATING)(file) 24 | # define BOOST_PP_LINE_BOOST_PP_IS_ITERATING(file) #file 25 | # define BOOST_PP_LINE_1(file) BOOST_PP_STRINGIZE(file BOOST_PP_CAT(BOOST_PP_LINE_I_, BOOST_PP_ITERATION_DEPTH())()) 26 | # define BOOST_PP_LINE_I_1() [BOOST_PP_FRAME_ITERATION(1)] 27 | # define BOOST_PP_LINE_I_2() BOOST_PP_LINE_I_1()[BOOST_PP_FRAME_ITERATION(2)] 28 | # define BOOST_PP_LINE_I_3() BOOST_PP_LINE_I_2()[BOOST_PP_FRAME_ITERATION(3)] 29 | # define BOOST_PP_LINE_I_4() BOOST_PP_LINE_I_3()[BOOST_PP_FRAME_ITERATION(4)] 30 | # define BOOST_PP_LINE_I_5() BOOST_PP_LINE_I_4()[BOOST_PP_FRAME_ITERATION(5)] 31 | # else 32 | # define BOOST_PP_LINE(line, file) line __FILE__ 33 | # endif 34 | # 35 | # endif 36 | -------------------------------------------------------------------------------- /dec.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DEC_HPP 13 | # define BOOST_PREPROCESSOR_DEC_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /detail/check.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_CHECK_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_CHECK_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_CHECK */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 21 | # define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type) 22 | # else 23 | # define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_OO((x, type)) 24 | # define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_D ## par 25 | # endif 26 | # 27 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() 28 | # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x)) 29 | # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) 30 | # define BOOST_PP_CHECK_2(res, _) res 31 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 32 | # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(type x) 33 | # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) 34 | # define BOOST_PP_CHECK_2(chk) BOOST_PP_CHECK_3((BOOST_PP_CHECK_RESULT_ ## chk)) 35 | # define BOOST_PP_CHECK_3(im) BOOST_PP_CHECK_5(BOOST_PP_CHECK_4 im) 36 | # define BOOST_PP_CHECK_4(res, _) res 37 | # define BOOST_PP_CHECK_5(res) res 38 | # else /* DMC */ 39 | # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_OO((type x)) 40 | # define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_0 ## par 41 | # define BOOST_PP_CHECK_0(chk) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, chk)) 42 | # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) 43 | # define BOOST_PP_CHECK_2(res, _) res 44 | # endif 45 | # 46 | # define BOOST_PP_CHECK_RESULT_1 1, BOOST_PP_NIL 47 | # 48 | # endif 49 | -------------------------------------------------------------------------------- /detail/is_binary.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_IS_BINARY */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_IS_BINARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) 22 | # else 23 | # define BOOST_PP_IS_BINARY(x) BOOST_PP_IS_BINARY_I(x) 24 | # define BOOST_PP_IS_BINARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) 25 | # endif 26 | # 27 | # define BOOST_PP_IS_BINARY_CHECK(a, b) 1 28 | # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_BINARY_CHECK 0, BOOST_PP_NIL 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /detail/is_nullary.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_IS_NULLARY_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_IS_NULLARY_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_IS_NULLARY */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_IS_NULLARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK) 22 | # else 23 | # define BOOST_PP_IS_NULLARY(x) BOOST_PP_IS_NULLARY_I(x) 24 | # define BOOST_PP_IS_NULLARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK) 25 | # endif 26 | # 27 | # define BOOST_PP_IS_NULLARY_CHECK() 1 28 | # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_NULLARY_CHECK 0, BOOST_PP_NIL 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /detail/is_unary.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_IS_UNARY_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_IS_UNARY_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_IS_UNARY */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_IS_UNARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK) 22 | # else 23 | # define BOOST_PP_IS_UNARY(x) BOOST_PP_IS_UNARY_I(x) 24 | # define BOOST_PP_IS_UNARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK) 25 | # endif 26 | # 27 | # define BOOST_PP_IS_UNARY_CHECK(a) 1 28 | # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_UNARY_CHECK 0, BOOST_PP_NIL 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /detail/null.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_NULL_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_NULL_HPP 14 | # 15 | # /* empty file */ 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /detail/split.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # ifndef BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP 11 | # define BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP 12 | # 13 | # include 14 | # 15 | # /* BOOST_PP_SPLIT */ 16 | # 17 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 18 | # define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I((n, im)) 19 | # define BOOST_PP_SPLIT_I(par) BOOST_PP_SPLIT_II ## par 20 | # define BOOST_PP_SPLIT_II(n, a, b) BOOST_PP_SPLIT_ ## n(a, b) 21 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 22 | # define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n((im))) 23 | # define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_II_ ## n) 24 | # define BOOST_PP_SPLIT_II_0(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_0 s) 25 | # define BOOST_PP_SPLIT_II_1(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_1 s) 26 | # define BOOST_PP_SPLIT_ID(id) id 27 | # else 28 | # define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n)(im) 29 | # define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ ## n 30 | # endif 31 | # 32 | # define BOOST_PP_SPLIT_0(a, b) a 33 | # define BOOST_PP_SPLIT_1(a, b) b 34 | # 35 | # endif 36 | -------------------------------------------------------------------------------- /empty.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_EMPTY_HPP 13 | # define BOOST_PREPROCESSOR_EMPTY_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /enum.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /enum_params.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_PARAMS_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /enum_params_with_a_default.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /enum_params_with_defaults.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_DEFAULTS_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_DEFAULTS_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /enum_shifted.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_SHIFTED_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /enum_shifted_params.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /expand.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_EXPAND_HPP 13 | # define BOOST_PREPROCESSOR_EXPAND_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /expr_if.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_EXPR_IF_HPP 13 | # define BOOST_PREPROCESSOR_EXPR_IF_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /facilities.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002-2011. * 4 | # * (C) Copyright Edward Diener 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_FACILITIES_HPP 14 | # define BOOST_PREPROCESSOR_FACILITIES_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /facilities/apply.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_FACILITIES_APPLY_HPP 13 | # define BOOST_PREPROCESSOR_FACILITIES_APPLY_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_APPLY */ 21 | # 22 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_APPLY(x) BOOST_PP_APPLY_I(x) 24 | # define BOOST_PP_APPLY_I(x) BOOST_PP_EXPR_IIF(BOOST_PP_IS_UNARY(x), BOOST_PP_TUPLE_REM_1 x) 25 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() 26 | # define BOOST_PP_APPLY(x) BOOST_PP_APPLY_I(x) 27 | # define BOOST_PP_APPLY_I(x) BOOST_PP_APPLY_ ## x 28 | # define BOOST_PP_APPLY_(x) x 29 | # define BOOST_PP_APPLY_BOOST_PP_NIL 30 | # else 31 | # define BOOST_PP_APPLY(x) BOOST_PP_EXPR_IIF(BOOST_PP_IS_UNARY(x), BOOST_PP_TUPLE_REM_1 x) 32 | # endif 33 | # 34 | # endif 35 | -------------------------------------------------------------------------------- /facilities/empty.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP 15 | # define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP 16 | # 17 | # /* BOOST_PP_EMPTY */ 18 | # 19 | # define BOOST_PP_EMPTY() 20 | # 21 | # endif 22 | -------------------------------------------------------------------------------- /facilities/expand.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP 15 | # define BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP 16 | # 17 | # include 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() 20 | # define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_I(x) 21 | # else 22 | # define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_OO((x)) 23 | # define BOOST_PP_EXPAND_OO(par) BOOST_PP_EXPAND_I ## par 24 | # endif 25 | # 26 | # define BOOST_PP_EXPAND_I(x) x 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /facilities/identity.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP 15 | # define BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP 16 | # 17 | # include 18 | # 19 | # /* BOOST_PP_IDENTITY */ 20 | # 21 | # define BOOST_PP_IDENTITY(item) item BOOST_PP_EMPTY 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /facilities/is_1.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2003. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP 13 | # define BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_IS_1 */ 19 | # 20 | # define BOOST_PP_IS_1(x) BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PP_IS_1_HELPER_, x)) 21 | # define BOOST_PP_IS_1_HELPER_1 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /facilities/is_empty.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2003. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP 13 | # define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_IS_EMPTY */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 24 | # define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x BOOST_PP_IS_EMPTY_HELPER) 25 | # define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1, (BOOST_PP_IS_EMPTY_DEF_ ## contents())) 26 | # define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, 1 BOOST_PP_EMPTY 27 | # define BOOST_PP_IS_EMPTY_HELPER() , 0 28 | # else 29 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 30 | # define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(BOOST_PP_IS_EMPTY_HELPER x ()) 31 | # define BOOST_PP_IS_EMPTY_I(test) BOOST_PP_IS_EMPTY_II(BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test))) 32 | # define BOOST_PP_IS_EMPTY_II(id) id 33 | # else 34 | # define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I((BOOST_PP_IS_EMPTY_HELPER x ())) 35 | # define BOOST_PP_IS_EMPTY_I(par) BOOST_PP_IS_EMPTY_II ## par 36 | # define BOOST_PP_IS_EMPTY_II(test) BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test)) 37 | # endif 38 | # define BOOST_PP_IS_EMPTY_HELPER() 1 39 | # define BOOST_PP_IS_EMPTY_DEF_1 1, BOOST_PP_NIL 40 | # define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 0, BOOST_PP_NIL 41 | # endif 42 | # 43 | # endif 44 | -------------------------------------------------------------------------------- /facilities/is_empty_or_1.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2003. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_OR_1_HPP 13 | # define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_OR_1_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_IS_EMPTY_OR_1 */ 21 | # 22 | # define BOOST_PP_IS_EMPTY_OR_1(x) \ 23 | BOOST_PP_IIF( \ 24 | BOOST_PP_IS_EMPTY(x BOOST_PP_EMPTY()), \ 25 | 1 BOOST_PP_EMPTY, \ 26 | BOOST_PP_IS_1 \ 27 | )(x) \ 28 | /**/ 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /facilities/overload.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2011. * 4 | # * (C) Copyright Edward Diener 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP 14 | # define BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP 15 | # 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_OVERLOAD */ 20 | # 21 | # if BOOST_PP_VARIADICS 22 | # define BOOST_PP_OVERLOAD(prefix, ...) BOOST_PP_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)) 23 | # endif 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /for.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_FOR_HPP 13 | # define BOOST_PREPROCESSOR_FOR_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /identity.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_IDENTITY_HPP 13 | # define BOOST_PREPROCESSOR_IDENTITY_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /if.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_IF_HPP 13 | # define BOOST_PREPROCESSOR_IF_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /inc.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_INC_HPP 13 | # define BOOST_PREPROCESSOR_INC_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /iterate.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ITERATE_HPP 13 | # define BOOST_PREPROCESSOR_ITERATE_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /iteration.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ITERATION_HPP 13 | # define BOOST_PREPROCESSOR_ITERATION_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # endif 20 | -------------------------------------------------------------------------------- /iteration/detail/self.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # if !defined(BOOST_PP_INDIRECT_SELF) 13 | # error BOOST_PP_ERROR: no indirect file to include 14 | # endif 15 | # 16 | # define BOOST_PP_IS_SELFISH 1 17 | # 18 | # include BOOST_PP_INDIRECT_SELF 19 | # 20 | # undef BOOST_PP_IS_SELFISH 21 | # undef BOOST_PP_INDIRECT_SELF 22 | -------------------------------------------------------------------------------- /iteration/local.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP 13 | # define BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_LOCAL_ITERATE */ 20 | # 21 | # define BOOST_PP_LOCAL_ITERATE() 22 | # 23 | # define BOOST_PP_LOCAL_C(n) (BOOST_PP_LOCAL_S) <= n && (BOOST_PP_LOCAL_F) >= n 24 | # define BOOST_PP_LOCAL_R(n) (BOOST_PP_LOCAL_F) <= n && (BOOST_PP_LOCAL_S) >= n 25 | # 26 | # endif 27 | -------------------------------------------------------------------------------- /iteration/self.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ITERATION_SELF_HPP 13 | # define BOOST_PREPROCESSOR_ITERATION_SELF_HPP 14 | # 15 | # /* BOOST_PP_INCLUDE_SELF */ 16 | # 17 | # define BOOST_PP_INCLUDE_SELF() 18 | # 19 | # endif 20 | -------------------------------------------------------------------------------- /library.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002-2011. * 4 | # * (C) Copyright Edward Diener 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_LIBRARY_HPP 14 | # define BOOST_PREPROCESSOR_LIBRARY_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # include 29 | # include 30 | # include 31 | # include 32 | # include 33 | # include 34 | # include 35 | # 36 | # endif 37 | -------------------------------------------------------------------------------- /limits.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LIMITS_HPP 13 | # define BOOST_PREPROCESSOR_LIMITS_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /list.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_HPP 15 | # define BOOST_PREPROCESSOR_LIST_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # include 29 | # include 30 | # include 31 | # include 32 | # include 33 | # include 34 | # include 35 | # include 36 | # 37 | # endif 38 | -------------------------------------------------------------------------------- /list/adt.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # * 9 | # * See http://www.boost.org for most recent version. 10 | # */ 11 | # 12 | # /* Revised by Paul Mensonides (2002) */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_ADT_HPP 15 | # define BOOST_PREPROCESSOR_LIST_ADT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_LIST_CONS */ 23 | # 24 | # define BOOST_PP_LIST_CONS(head, tail) (head, tail) 25 | # 26 | # /* BOOST_PP_LIST_NIL */ 27 | # 28 | # define BOOST_PP_LIST_NIL BOOST_PP_NIL 29 | # 30 | # /* BOOST_PP_LIST_FIRST */ 31 | # 32 | # define BOOST_PP_LIST_FIRST(list) BOOST_PP_LIST_FIRST_D(list) 33 | # 34 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 35 | # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I list 36 | # else 37 | # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I ## list 38 | # endif 39 | # 40 | # define BOOST_PP_LIST_FIRST_I(head, tail) head 41 | # 42 | # /* BOOST_PP_LIST_REST */ 43 | # 44 | # define BOOST_PP_LIST_REST(list) BOOST_PP_LIST_REST_D(list) 45 | # 46 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 47 | # define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I list 48 | # else 49 | # define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I ## list 50 | # endif 51 | # 52 | # define BOOST_PP_LIST_REST_I(head, tail) tail 53 | # 54 | # /* BOOST_PP_LIST_IS_CONS */ 55 | # 56 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() 57 | # define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_LIST_IS_CONS_D(list) 58 | # define BOOST_PP_LIST_IS_CONS_D(list) BOOST_PP_LIST_IS_CONS_ ## list 59 | # define BOOST_PP_LIST_IS_CONS_(head, tail) 1 60 | # define BOOST_PP_LIST_IS_CONS_BOOST_PP_NIL 0 61 | # else 62 | # define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_IS_BINARY(list) 63 | # endif 64 | # 65 | # /* BOOST_PP_LIST_IS_NIL */ 66 | # 67 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() 68 | # define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_IS_BINARY(list)) 69 | # else 70 | # define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_LIST_IS_CONS(list)) 71 | # endif 72 | # 73 | # endif 74 | -------------------------------------------------------------------------------- /list/append.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_APPEND_HPP 15 | # define BOOST_PREPROCESSOR_LIST_APPEND_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_LIST_APPEND */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_LIST_APPEND(a, b) BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_O, b, a) 24 | # else 25 | # define BOOST_PP_LIST_APPEND(a, b) BOOST_PP_LIST_APPEND_I(a, b) 26 | # define BOOST_PP_LIST_APPEND_I(a, b) BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_O, b, a) 27 | # endif 28 | # 29 | # define BOOST_PP_LIST_APPEND_O(d, s, x) (x, s) 30 | # 31 | # /* BOOST_PP_LIST_APPEND_D */ 32 | # 33 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 34 | # define BOOST_PP_LIST_APPEND_D(d, a, b) BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_APPEND_O, b, a) 35 | # else 36 | # define BOOST_PP_LIST_APPEND_D(d, a, b) BOOST_PP_LIST_APPEND_D_I(d, a, b) 37 | # define BOOST_PP_LIST_APPEND_D_I(d, a, b) BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_APPEND_O, b, a) 38 | # endif 39 | # 40 | # endif 41 | -------------------------------------------------------------------------------- /list/at.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_AT_HPP 15 | # define BOOST_PREPROCESSOR_LIST_AT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_LIST_AT */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list)) 25 | # else 26 | # define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_AT_I(list, index) 27 | # define BOOST_PP_LIST_AT_I(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list)) 28 | # endif 29 | # 30 | # /* BOOST_PP_LIST_AT_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list)) 34 | # else 35 | # define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_AT_D_I(d, list, index) 36 | # define BOOST_PP_LIST_AT_D_I(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list)) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /list/cat.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_CAT_HPP 15 | # define BOOST_PREPROCESSOR_LIST_CAT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_LIST_CAT */ 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 25 | # define BOOST_PP_LIST_CAT(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_CAT_O, BOOST_PP_LIST_FIRST(list), BOOST_PP_LIST_REST(list)) 26 | # else 27 | # define BOOST_PP_LIST_CAT(list) BOOST_PP_LIST_CAT_I(list) 28 | # define BOOST_PP_LIST_CAT_I(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_CAT_O, BOOST_PP_LIST_FIRST(list), BOOST_PP_LIST_REST(list)) 29 | # endif 30 | # 31 | # define BOOST_PP_LIST_CAT_O(d, s, x) BOOST_PP_CAT(s, x) 32 | # 33 | # /* BOOST_PP_LIST_CAT_D */ 34 | # 35 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 36 | # define BOOST_PP_LIST_CAT_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_CAT_O, BOOST_PP_LIST_FIRST(list), BOOST_PP_LIST_REST(list)) 37 | # else 38 | # define BOOST_PP_LIST_CAT_D(d, list) BOOST_PP_LIST_CAT_D_I(d, list) 39 | # define BOOST_PP_LIST_CAT_D_I(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_CAT_O, BOOST_PP_LIST_FIRST(list), BOOST_PP_LIST_REST(list)) 40 | # endif 41 | # 42 | # endif 43 | -------------------------------------------------------------------------------- /list/enum.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_ENUM_HPP 15 | # define BOOST_PREPROCESSOR_LIST_ENUM_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_LIST_ENUM */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list) 25 | # else 26 | # define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_ENUM_I(list) 27 | # define BOOST_PP_LIST_ENUM_I(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list) 28 | # endif 29 | # 30 | # define BOOST_PP_LIST_ENUM_O(r, _, i, elem) BOOST_PP_COMMA_IF(i) elem 31 | # 32 | # /* BOOST_PP_LIST_ENUM_R */ 33 | # 34 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 35 | # define BOOST_PP_LIST_ENUM_R(r, list) BOOST_PP_LIST_FOR_EACH_I_R(r, BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list) 36 | # else 37 | # define BOOST_PP_LIST_ENUM_R(r, list) BOOST_PP_LIST_ENUM_R_I(r, list) 38 | # define BOOST_PP_LIST_ENUM_R_I(r, list) BOOST_PP_LIST_FOR_EACH_I_R(r, BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list) 39 | # endif 40 | # 41 | # endif 42 | -------------------------------------------------------------------------------- /list/filter.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_FILTER_HPP 15 | # define BOOST_PREPROCESSOR_LIST_FILTER_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_LIST_FILTER */ 24 | # 25 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 26 | # define BOOST_PP_LIST_FILTER(pred, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_FILTER_O, (pred, data, BOOST_PP_NIL), list)) 27 | # else 28 | # define BOOST_PP_LIST_FILTER(pred, data, list) BOOST_PP_LIST_FILTER_I(pred, data, list) 29 | # define BOOST_PP_LIST_FILTER_I(pred, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_FILTER_O, (pred, data, BOOST_PP_NIL), list)) 30 | # endif 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_LIST_FILTER_O(d, pdr, elem) BOOST_PP_LIST_FILTER_O_D(d, BOOST_PP_TUPLE_ELEM(3, 0, pdr), BOOST_PP_TUPLE_ELEM(3, 1, pdr), BOOST_PP_TUPLE_ELEM(3, 2, pdr), elem) 34 | # else 35 | # define BOOST_PP_LIST_FILTER_O(d, pdr, elem) BOOST_PP_LIST_FILTER_O_I(d, BOOST_PP_TUPLE_REM_3 pdr, elem) 36 | # define BOOST_PP_LIST_FILTER_O_I(d, im, elem) BOOST_PP_LIST_FILTER_O_D(d, im, elem) 37 | # endif 38 | # 39 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() 40 | # define BOOST_PP_LIST_FILTER_O_D(d, pred, data, res, elem) (pred, data, BOOST_PP_IF(pred(d, data, elem), (elem, res), res)) 41 | # else 42 | # define BOOST_PP_LIST_FILTER_O_D(d, pred, data, res, elem) (pred, data, BOOST_PP_IF(pred##(d, data, elem), (elem, res), res)) 43 | # endif 44 | # 45 | # /* BOOST_PP_LIST_FILTER_D */ 46 | # 47 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 48 | # define BOOST_PP_LIST_FILTER_D(d, pred, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_FILTER_O, (pred, data, BOOST_PP_NIL), list)) 49 | # else 50 | # define BOOST_PP_LIST_FILTER_D(d, pred, data, list) BOOST_PP_LIST_FILTER_D_I(d, pred, data, list) 51 | # define BOOST_PP_LIST_FILTER_D_I(d, pred, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_FILTER_O, (pred, data, BOOST_PP_NIL), list)) 52 | # endif 53 | # 54 | # endif 55 | -------------------------------------------------------------------------------- /list/fold_right.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP 15 | # define BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # if 0 23 | # define BOOST_PP_LIST_FOLD_RIGHT(op, state, list) 24 | # endif 25 | # 26 | # define BOOST_PP_LIST_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) 27 | # 28 | # define BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) BOOST_PP_ERROR(0x0004) 29 | # 30 | # define BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) BOOST_PP_LIST_FOLD_RIGHT_ ## d(o, s, l) 31 | # define BOOST_PP_LIST_FOLD_RIGHT_2ND BOOST_PP_LIST_FOLD_RIGHT 32 | # define BOOST_PP_LIST_FOLD_RIGHT_2ND_D BOOST_PP_LIST_FOLD_RIGHT_D 33 | # 34 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 35 | # include 36 | # else 37 | # include 38 | # endif 39 | # 40 | # endif 41 | -------------------------------------------------------------------------------- /list/for_each.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_FOR_EACH_HPP 15 | # define BOOST_PREPROCESSOR_LIST_FOR_EACH_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_LIST_FOR_EACH */ 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 25 | # define BOOST_PP_LIST_FOR_EACH(macro, data, list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_FOR_EACH_O, (macro, data), list) 26 | # else 27 | # define BOOST_PP_LIST_FOR_EACH(macro, data, list) BOOST_PP_LIST_FOR_EACH_X(macro, data, list) 28 | # define BOOST_PP_LIST_FOR_EACH_X(macro, data, list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_FOR_EACH_O, (macro, data), list) 29 | # endif 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_LIST_FOR_EACH_O(r, md, i, elem) BOOST_PP_LIST_FOR_EACH_O_D(r, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md), elem) 33 | # else 34 | # define BOOST_PP_LIST_FOR_EACH_O(r, md, i, elem) BOOST_PP_LIST_FOR_EACH_O_I(r, BOOST_PP_TUPLE_REM_2 md, elem) 35 | # define BOOST_PP_LIST_FOR_EACH_O_I(r, im, elem) BOOST_PP_LIST_FOR_EACH_O_D(r, im, elem) 36 | # endif 37 | # 38 | # define BOOST_PP_LIST_FOR_EACH_O_D(r, m, d, elem) m(r, d, elem) 39 | # 40 | # /* BOOST_PP_LIST_FOR_EACH_R */ 41 | # 42 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 43 | # define BOOST_PP_LIST_FOR_EACH_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R(r, BOOST_PP_LIST_FOR_EACH_O, (macro, data), list) 44 | # else 45 | # define BOOST_PP_LIST_FOR_EACH_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_R_X(r, macro, data, list) 46 | # define BOOST_PP_LIST_FOR_EACH_R_X(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R(r, BOOST_PP_LIST_FOR_EACH_O, (macro, data), list) 47 | # endif 48 | # 49 | # endif 50 | -------------------------------------------------------------------------------- /list/rest_n.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_REST_N_HPP 15 | # define BOOST_PREPROCESSOR_LIST_REST_N_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_LIST_REST_N */ 24 | # 25 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 26 | # define BOOST_PP_LIST_REST_N(count, list) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_LIST_REST_N_P, BOOST_PP_LIST_REST_N_O, (list, count))) 27 | # else 28 | # define BOOST_PP_LIST_REST_N(count, list) BOOST_PP_LIST_REST_N_I(count, list) 29 | # define BOOST_PP_LIST_REST_N_I(count, list) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_LIST_REST_N_P, BOOST_PP_LIST_REST_N_O, (list, count))) 30 | # endif 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_LIST_REST_N_P(d, lc) BOOST_PP_TUPLE_ELEM(2, 1, lc) 34 | # else 35 | # define BOOST_PP_LIST_REST_N_P(d, lc) BOOST_PP_LIST_REST_N_P_I lc 36 | # define BOOST_PP_LIST_REST_N_P_I(list, count) count 37 | # endif 38 | # 39 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 40 | # define BOOST_PP_LIST_REST_N_O(d, lc) (BOOST_PP_LIST_REST(BOOST_PP_TUPLE_ELEM(2, 0, lc)), BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(2, 1, lc))) 41 | # else 42 | # define BOOST_PP_LIST_REST_N_O(d, lc) BOOST_PP_LIST_REST_N_O_I lc 43 | # define BOOST_PP_LIST_REST_N_O_I(list, count) (BOOST_PP_LIST_REST(list), BOOST_PP_DEC(count)) 44 | # endif 45 | # 46 | # /* BOOST_PP_LIST_REST_N_D */ 47 | # 48 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 49 | # define BOOST_PP_LIST_REST_N_D(d, count, list) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_LIST_REST_N_P, BOOST_PP_LIST_REST_N_O, (list, count))) 50 | # else 51 | # define BOOST_PP_LIST_REST_N_D(d, count, list) BOOST_PP_LIST_REST_N_D_I(d, count, list) 52 | # define BOOST_PP_LIST_REST_N_D_I(d, count, list) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_LIST_REST_N_P, BOOST_PP_LIST_REST_N_O, (list, count))) 53 | # endif 54 | # 55 | # endif 56 | -------------------------------------------------------------------------------- /list/reverse.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_REVERSE_HPP 15 | # define BOOST_PREPROCESSOR_LIST_REVERSE_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_LIST_REVERSE */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) 24 | # else 25 | # define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list) 26 | # define BOOST_PP_LIST_REVERSE_I(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) 27 | # endif 28 | # 29 | # define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s) 30 | # 31 | # /* BOOST_PP_LIST_REVERSE_D */ 32 | # 33 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 34 | # define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) 35 | # else 36 | # define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list) 37 | # define BOOST_PP_LIST_REVERSE_D_I(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) 38 | # endif 39 | # 40 | # endif 41 | -------------------------------------------------------------------------------- /list/size.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_SIZE_HPP 15 | # define BOOST_PREPROCESSOR_LIST_SIZE_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # 24 | # /* BOOST_PP_LIST_SIZE */ 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 27 | # define BOOST_PP_LIST_SIZE(list) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_LIST_SIZE_P, BOOST_PP_LIST_SIZE_O, (0, list))) 28 | # else 29 | # define BOOST_PP_LIST_SIZE(list) BOOST_PP_LIST_SIZE_I(list) 30 | # define BOOST_PP_LIST_SIZE_I(list) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_LIST_SIZE_P, BOOST_PP_LIST_SIZE_O, (0, list))) 31 | # endif 32 | # 33 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 34 | # define BOOST_PP_LIST_SIZE_P(d, rl) BOOST_PP_LIST_IS_CONS(BOOST_PP_TUPLE_ELEM(2, 1, rl)) 35 | # else 36 | # define BOOST_PP_LIST_SIZE_P(d, rl) BOOST_PP_LIST_SIZE_P_I(BOOST_PP_TUPLE_REM_2 rl) 37 | # define BOOST_PP_LIST_SIZE_P_I(im) BOOST_PP_LIST_SIZE_P_II(im) 38 | # define BOOST_PP_LIST_SIZE_P_II(r, l) BOOST_PP_LIST_IS_CONS(l) 39 | # endif 40 | # 41 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 42 | # define BOOST_PP_LIST_SIZE_O(d, rl) (BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2, 0, rl)), BOOST_PP_LIST_REST(BOOST_PP_TUPLE_ELEM(2, 1, rl))) 43 | # else 44 | # define BOOST_PP_LIST_SIZE_O(d, rl) BOOST_PP_LIST_SIZE_O_I(BOOST_PP_TUPLE_REM_2 rl) 45 | # define BOOST_PP_LIST_SIZE_O_I(im) BOOST_PP_LIST_SIZE_O_II(im) 46 | # define BOOST_PP_LIST_SIZE_O_II(r, l) (BOOST_PP_INC(r), BOOST_PP_LIST_REST(l)) 47 | # endif 48 | # 49 | # /* BOOST_PP_LIST_SIZE_D */ 50 | # 51 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 52 | # define BOOST_PP_LIST_SIZE_D(d, list) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_LIST_SIZE_P, BOOST_PP_LIST_SIZE_O, (0, list))) 53 | # else 54 | # define BOOST_PP_LIST_SIZE_D(d, list) BOOST_PP_LIST_SIZE_D_I(d, list) 55 | # define BOOST_PP_LIST_SIZE_D_I(d, list) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_LIST_SIZE_P, BOOST_PP_LIST_SIZE_O, (0, list))) 56 | # endif 57 | # 58 | # endif 59 | -------------------------------------------------------------------------------- /list/to_seq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* Revised by Paul Mensonides (2011) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_TO_SEQ_HPP 15 | # define BOOST_PREPROCESSOR_LIST_TO_SEQ_HPP 16 | # 17 | # include 18 | # 19 | # /* BOOST_PP_LIST_TO_SEQ */ 20 | # 21 | # define BOOST_PP_LIST_TO_SEQ(list) \ 22 | BOOST_PP_LIST_FOR_EACH(BOOST_PP_LIST_TO_SEQ_MACRO, ~, list) \ 23 | /**/ 24 | # define BOOST_PP_LIST_TO_SEQ_MACRO(r, data, elem) (elem) 25 | # 26 | # /* BOOST_PP_LIST_TO_SEQ_R */ 27 | # 28 | # define BOOST_PP_LIST_TO_SEQ_R(r, list) \ 29 | BOOST_PP_LIST_FOR_EACH_R(r, BOOST_PP_LIST_TO_SEQ_MACRO, ~, list) \ 30 | /**/ 31 | # 32 | # endif /* BOOST_PREPROCESSOR_LIST_TO_SEQ_HPP */ 33 | -------------------------------------------------------------------------------- /list/to_tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_TO_TUPLE_HPP 15 | # define BOOST_PREPROCESSOR_LIST_TO_TUPLE_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_LIST_TO_TUPLE */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_LIST_TO_TUPLE(list) (BOOST_PP_LIST_ENUM(list)) 24 | # else 25 | # define BOOST_PP_LIST_TO_TUPLE(list) BOOST_PP_LIST_TO_TUPLE_I(list) 26 | # define BOOST_PP_LIST_TO_TUPLE_I(list) (BOOST_PP_LIST_ENUM(list)) 27 | # endif 28 | # 29 | # /* BOOST_PP_LIST_TO_TUPLE_R */ 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_LIST_TO_TUPLE_R(r, list) (BOOST_PP_LIST_ENUM_R(r, list)) 33 | # else 34 | # define BOOST_PP_LIST_TO_TUPLE_R(r, list) BOOST_PP_LIST_TO_TUPLE_R_I(r, list) 35 | # define BOOST_PP_LIST_TO_TUPLE_R_I(r, list) (BOOST_PP_LIST_ENUM_R(r, list)) 36 | # endif 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /list/transform.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_TRANSFORM_HPP 15 | # define BOOST_PREPROCESSOR_LIST_TRANSFORM_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_LIST_TRANSFORM */ 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 25 | # define BOOST_PP_LIST_TRANSFORM(op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) 26 | # else 27 | # define BOOST_PP_LIST_TRANSFORM(op, data, list) BOOST_PP_LIST_TRANSFORM_I(op, data, list) 28 | # define BOOST_PP_LIST_TRANSFORM_I(op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) 29 | # endif 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_LIST_TRANSFORM_O(d, odr, elem) BOOST_PP_LIST_TRANSFORM_O_D(d, BOOST_PP_TUPLE_ELEM(3, 0, odr), BOOST_PP_TUPLE_ELEM(3, 1, odr), BOOST_PP_TUPLE_ELEM(3, 2, odr), elem) 33 | # else 34 | # define BOOST_PP_LIST_TRANSFORM_O(d, odr, elem) BOOST_PP_LIST_TRANSFORM_O_I(d, BOOST_PP_TUPLE_REM_3 odr, elem) 35 | # define BOOST_PP_LIST_TRANSFORM_O_I(d, im, elem) BOOST_PP_LIST_TRANSFORM_O_D(d, im, elem) 36 | # endif 37 | # 38 | # define BOOST_PP_LIST_TRANSFORM_O_D(d, op, data, res, elem) (op, data, (op(d, data, elem), res)) 39 | # 40 | # /* BOOST_PP_LIST_TRANSFORM_D */ 41 | # 42 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 43 | # define BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) 44 | # else 45 | # define BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) BOOST_PP_LIST_TRANSFORM_D_I(d, op, data, list) 46 | # define BOOST_PP_LIST_TRANSFORM_D_I(d, op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) 47 | # endif 48 | # 49 | # endif 50 | -------------------------------------------------------------------------------- /logical.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /logical/and.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_AND_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_AND_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_AND */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_AND(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 25 | # else 26 | # define BOOST_PP_AND(p, q) BOOST_PP_AND_I(p, q) 27 | # define BOOST_PP_AND_I(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /logical/bitand.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_BITAND */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_I(x, y) 21 | # else 22 | # define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_OO((x, y)) 23 | # define BOOST_PP_BITAND_OO(par) BOOST_PP_BITAND_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ ## x ## y 28 | # else 29 | # define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ID(BOOST_PP_BITAND_ ## x ## y) 30 | # define BOOST_PP_BITAND_ID(res) res 31 | # endif 32 | # 33 | # define BOOST_PP_BITAND_00 0 34 | # define BOOST_PP_BITAND_01 0 35 | # define BOOST_PP_BITAND_10 0 36 | # define BOOST_PP_BITAND_11 1 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /logical/bitnor.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_BITNOR_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_BITNOR_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_BITNOR */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_BITNOR(x, y) BOOST_PP_BITNOR_I(x, y) 21 | # else 22 | # define BOOST_PP_BITNOR(x, y) BOOST_PP_BITNOR_OO((x, y)) 23 | # define BOOST_PP_BITNOR_OO(par) BOOST_PP_BITNOR_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_BITNOR_I(x, y) BOOST_PP_BITNOR_ ## x ## y 28 | # else 29 | # define BOOST_PP_BITNOR_I(x, y) BOOST_PP_BITNOR_ID(BOOST_PP_BITNOR_ ## x ## y) 30 | # define BOOST_PP_BITNOR_ID(id) id 31 | # endif 32 | # 33 | # define BOOST_PP_BITNOR_00 1 34 | # define BOOST_PP_BITNOR_01 0 35 | # define BOOST_PP_BITNOR_10 0 36 | # define BOOST_PP_BITNOR_11 0 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /logical/bitor.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_BITOR_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_BITOR_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_BITOR */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_BITOR(x, y) BOOST_PP_BITOR_I(x, y) 21 | # else 22 | # define BOOST_PP_BITOR(x, y) BOOST_PP_BITOR_OO((x, y)) 23 | # define BOOST_PP_BITOR_OO(par) BOOST_PP_BITOR_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_BITOR_I(x, y) BOOST_PP_BITOR_ ## x ## y 28 | # else 29 | # define BOOST_PP_BITOR_I(x, y) BOOST_PP_BITOR_ID(BOOST_PP_BITOR_ ## x ## y) 30 | # define BOOST_PP_BITOR_ID(id) id 31 | # endif 32 | # 33 | # define BOOST_PP_BITOR_00 0 34 | # define BOOST_PP_BITOR_01 1 35 | # define BOOST_PP_BITOR_10 1 36 | # define BOOST_PP_BITOR_11 1 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /logical/bitxor.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_BITXOR_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_BITXOR_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_BITXOR */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_BITXOR(x, y) BOOST_PP_BITXOR_I(x, y) 21 | # else 22 | # define BOOST_PP_BITXOR(x, y) BOOST_PP_BITXOR_OO((x, y)) 23 | # define BOOST_PP_BITXOR_OO(par) BOOST_PP_BITXOR_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_BITXOR_I(x, y) BOOST_PP_BITXOR_ ## x ## y 28 | # else 29 | # define BOOST_PP_BITXOR_I(x, y) BOOST_PP_BITXOR_ID(BOOST_PP_BITXOR_ ## x ## y) 30 | # define BOOST_PP_BITXOR_ID(id) id 31 | # endif 32 | # 33 | # define BOOST_PP_BITXOR_00 0 34 | # define BOOST_PP_BITXOR_01 1 35 | # define BOOST_PP_BITXOR_10 1 36 | # define BOOST_PP_BITXOR_11 0 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /logical/compl.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_COMPL */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_COMPL(x) BOOST_PP_COMPL_I(x) 21 | # else 22 | # define BOOST_PP_COMPL(x) BOOST_PP_COMPL_OO((x)) 23 | # define BOOST_PP_COMPL_OO(par) BOOST_PP_COMPL_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ ## x 28 | # else 29 | # define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ID(BOOST_PP_COMPL_ ## x) 30 | # define BOOST_PP_COMPL_ID(id) id 31 | # endif 32 | # 33 | # define BOOST_PP_COMPL_0 1 34 | # define BOOST_PP_COMPL_1 0 35 | # 36 | # endif 37 | -------------------------------------------------------------------------------- /logical/nor.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_NOR_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_NOR_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_NOR */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_NOR(p, q) BOOST_PP_BITNOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 25 | # else 26 | # define BOOST_PP_NOR(p, q) BOOST_PP_NOR_I(p, q) 27 | # define BOOST_PP_NOR_I(p, q) BOOST_PP_BITNOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /logical/not.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_NOT_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_NOT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_NOT */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_NOT(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) 25 | # else 26 | # define BOOST_PP_NOT(x) BOOST_PP_NOT_I(x) 27 | # define BOOST_PP_NOT_I(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /logical/or.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_OR_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_OR_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_OR */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_OR(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 25 | # else 26 | # define BOOST_PP_OR(p, q) BOOST_PP_OR_I(p, q) 27 | # define BOOST_PP_OR_I(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /logical/xor.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_XOR_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_XOR_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_XOR */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_XOR(p, q) BOOST_PP_BITXOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 25 | # else 26 | # define BOOST_PP_XOR(p, q) BOOST_PP_XOR_I(p, q) 27 | # define BOOST_PP_XOR_I(p, q) BOOST_PP_BITXOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /max.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_MAX_HPP 13 | # define BOOST_PREPROCESSOR_MAX_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /min.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_MIN_HPP 13 | # define BOOST_PREPROCESSOR_MIN_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /punctuation.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_HPP 13 | # define BOOST_PREPROCESSOR_PUNCTUATION_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # endif 21 | -------------------------------------------------------------------------------- /punctuation/comma.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP 15 | # define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP 16 | # 17 | # /* BOOST_PP_COMMA */ 18 | # 19 | # define BOOST_PP_COMMA() , 20 | # 21 | # endif 22 | -------------------------------------------------------------------------------- /punctuation/comma_if.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP 15 | # define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_COMMA_IF */ 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 25 | # define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() 26 | # else 27 | # define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond) 28 | # define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() 29 | # endif 30 | # 31 | # endif 32 | -------------------------------------------------------------------------------- /punctuation/paren.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP 13 | # define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP 14 | # 15 | # /* BOOST_PP_LPAREN */ 16 | # 17 | # define BOOST_PP_LPAREN() ( 18 | # 19 | # /* BOOST_PP_RPAREN */ 20 | # 21 | # define BOOST_PP_RPAREN() ) 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /punctuation/paren_if.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_PAREN_IF_HPP 13 | # define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_IF_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_LPAREN_IF */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_LPAREN_IF(cond) BOOST_PP_IF(cond, BOOST_PP_LPAREN, BOOST_PP_EMPTY)() 24 | # else 25 | # define BOOST_PP_LPAREN_IF(cond) BOOST_PP_LPAREN_IF_I(cond) 26 | # define BOOST_PP_LPAREN_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_LPAREN, BOOST_PP_EMPTY)() 27 | # endif 28 | # 29 | # /* BOOST_PP_RPAREN_IF */ 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_RPAREN_IF(cond) BOOST_PP_IF(cond, BOOST_PP_RPAREN, BOOST_PP_EMPTY)() 33 | # else 34 | # define BOOST_PP_RPAREN_IF(cond) BOOST_PP_RPAREN_IF_I(cond) 35 | # define BOOST_PP_RPAREN_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_RPAREN, BOOST_PP_EMPTY)() 36 | # endif 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /repeat.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /repeat_2nd.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_2ND_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_2ND_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /repeat_3rd.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_3RD_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_3RD_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /repeat_from_to.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_FROM_TO_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /repeat_from_to_2nd.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_2ND_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_FROM_TO_2ND_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /repeat_from_to_3rd.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_3RD_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_FROM_TO_3RD_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /repetition.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPETITION_HPP 13 | # define BOOST_PREPROCESSOR_REPETITION_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # include 29 | # include 30 | # include 31 | # 32 | # endif 33 | -------------------------------------------------------------------------------- /repetition/deduce_r.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPETITION_DEDUCE_R_HPP 13 | # define BOOST_PREPROCESSOR_REPETITION_DEDUCE_R_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_DEDUCE_R */ 19 | # 20 | # define BOOST_PP_DEDUCE_R() BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256) 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /repetition/deduce_z.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPETITION_DEDUCE_Z_HPP 13 | # define BOOST_PREPROCESSOR_REPETITION_DEDUCE_Z_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_DEDUCE_Z */ 19 | # 20 | # define BOOST_PP_DEDUCE_Z() BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4) 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /repetition/enum_params.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP 15 | # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_ENUM_PARAMS */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) 25 | # else 26 | # define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_ENUM_PARAMS_I(count, param) 27 | # define BOOST_PP_ENUM_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) 28 | # endif 29 | # 30 | # define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n 31 | # 32 | # /* BOOST_PP_ENUM_PARAMS_Z */ 33 | # 34 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 35 | # define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) 36 | # else 37 | # define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) 38 | # define BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) 39 | # endif 40 | # 41 | # endif 42 | -------------------------------------------------------------------------------- /repetition/enum_params_with_a_default.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP 15 | # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT */ 22 | # 23 | # define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(count, param, def) BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def BOOST_PP_INTERCEPT) 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /repetition/enum_params_with_defaults.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_DEFAULTS_HPP 15 | # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_DEFAULTS_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS */ 21 | # 22 | # define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(count, param, def) BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def) 23 | # 24 | # endif 25 | -------------------------------------------------------------------------------- /repetition/enum_shifted_params.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP 15 | # define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # 24 | # /* BOOST_PP_ENUM_SHIFTED_PARAMS */ 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 27 | # define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) 28 | # else 29 | # define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) 30 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) 31 | # endif 32 | # 33 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n)) 34 | # 35 | # /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */ 36 | # 37 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 38 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) 39 | # else 40 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) 41 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) 42 | # endif 43 | # 44 | # endif 45 | -------------------------------------------------------------------------------- /repetition/enum_trailing_params.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP 13 | # define BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_ENUM_TRAILING_PARAMS */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) 22 | # else 23 | # define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) 24 | # define BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) 25 | # endif 26 | # 27 | # define BOOST_PP_ENUM_TRAILING_PARAMS_M(z, n, param) , param ## n 28 | # 29 | # /* BOOST_PP_ENUM_TRAILING_PARAMS_Z */ 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) 33 | # else 34 | # define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) 35 | # define BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) 36 | # endif 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /selection.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SELECTION_HPP 13 | # define BOOST_PREPROCESSOR_SELECTION_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # endif 19 | -------------------------------------------------------------------------------- /selection/max.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_SELECTION_MAX_HPP 15 | # define BOOST_PREPROCESSOR_SELECTION_MAX_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_MAX */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_MAX(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(x, y), y, x) 25 | # else 26 | # define BOOST_PP_MAX(x, y) BOOST_PP_MAX_I(x, y) 27 | # define BOOST_PP_MAX_I(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(x, y), y, x) 28 | # endif 29 | # 30 | # /* BOOST_PP_MAX_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_MAX_D(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, x, y), y, x) 34 | # else 35 | # define BOOST_PP_MAX_D(d, x, y) BOOST_PP_MAX_D_I(d, x, y) 36 | # define BOOST_PP_MAX_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, x, y), y, x) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /selection/min.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_SELECTION_MIN_HPP 15 | # define BOOST_PREPROCESSOR_SELECTION_MIN_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_MIN */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_MIN(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(y, x), y, x) 25 | # else 26 | # define BOOST_PP_MIN(x, y) BOOST_PP_MIN_I(x, y) 27 | # define BOOST_PP_MIN_I(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(y, x), y, x) 28 | # endif 29 | # 30 | # /* BOOST_PP_MIN_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_MIN_D(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, y, x), y, x) 34 | # else 35 | # define BOOST_PP_MIN_D(d, x, y) BOOST_PP_MIN_D_I(d, x, y) 36 | # define BOOST_PP_MIN_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, y, x), y, x) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /seq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002-2011. * 4 | # * (C) Copyright Edward Diener 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_SEQ_HPP 14 | # define BOOST_PREPROCESSOR_SEQ_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # include 29 | # include 30 | # include 31 | # include 32 | # include 33 | # include 34 | # include 35 | # include 36 | # include 37 | # include 38 | # include 39 | # include 40 | # include 41 | # include 42 | # 43 | # endif 44 | -------------------------------------------------------------------------------- /seq/cat.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_CAT_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_CAT_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_SEQ_CAT */ 24 | # 25 | # define BOOST_PP_SEQ_CAT(seq) \ 26 | BOOST_PP_IF( \ 27 | BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ 28 | BOOST_PP_SEQ_CAT_I, \ 29 | BOOST_PP_SEQ_HEAD \ 30 | )(seq) \ 31 | /**/ 32 | # define BOOST_PP_SEQ_CAT_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) 33 | # 34 | # define BOOST_PP_SEQ_CAT_O(s, st, elem) BOOST_PP_SEQ_CAT_O_I(st, elem) 35 | # define BOOST_PP_SEQ_CAT_O_I(a, b) a ## b 36 | # 37 | # /* BOOST_PP_SEQ_CAT_S */ 38 | # 39 | # define BOOST_PP_SEQ_CAT_S(s, seq) \ 40 | BOOST_PP_IF( \ 41 | BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ 42 | BOOST_PP_SEQ_CAT_S_I_A, \ 43 | BOOST_PP_SEQ_CAT_S_I_B \ 44 | )(s, seq) \ 45 | /**/ 46 | # define BOOST_PP_SEQ_CAT_S_I_A(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) 47 | # define BOOST_PP_SEQ_CAT_S_I_B(s, seq) BOOST_PP_SEQ_HEAD(seq) 48 | # 49 | # endif 50 | -------------------------------------------------------------------------------- /seq/detail/binary_transform.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2011. * 4 | # * Distributed under the Boost Software License, Version 1.0. (See * 5 | # * accompanying file LICENSE_1_0.txt or copy at * 6 | # * http://www.boost.org/LICENSE_1_0.txt) * 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_BINARY_TRANSFORM_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_DETAIL_BINARY_TRANSFORM_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_SEQ_BINARY_TRANSFORM */ 21 | # 22 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 23 | # define BOOST_PP_SEQ_BINARY_TRANSFORM(seq) BOOST_PP_SEQ_BINARY_TRANSFORM_I(, seq) 24 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_I(p, seq) BOOST_PP_SEQ_BINARY_TRANSFORM_II(p ## seq) 25 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_II(seq) BOOST_PP_SEQ_BINARY_TRANSFORM_III(seq) 26 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_III(seq) BOOST_PP_CAT(BOOST_PP_SEQ_BINARY_TRANSFORM_A seq, 0) 27 | # else 28 | # define BOOST_PP_SEQ_BINARY_TRANSFORM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_BINARY_TRANSFORM_A seq, 0) 29 | # endif 30 | # if BOOST_PP_VARIADICS 31 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_A(...) (BOOST_PP_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_B 32 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_B(...) (BOOST_PP_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_A 33 | # else 34 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_A(e) (BOOST_PP_REM, e)() BOOST_PP_SEQ_BINARY_TRANSFORM_B 35 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_B(e) (BOOST_PP_REM, e)() BOOST_PP_SEQ_BINARY_TRANSFORM_A 36 | # endif 37 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_A0 (BOOST_PP_EAT, ?) 38 | # define BOOST_PP_SEQ_BINARY_TRANSFORM_B0 (BOOST_PP_EAT, ?) 39 | # 40 | # endif 41 | -------------------------------------------------------------------------------- /seq/first_n.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_SEQ_FIRST_N */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) 25 | # else 26 | # define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_SEQ_FIRST_N_I(n, seq) 27 | # define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /seq/insert.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_INSERT_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_INSERT_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_SEQ_INSERT */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 22 | # define BOOST_PP_SEQ_INSERT(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(i, seq) 23 | # else 24 | # define BOOST_PP_SEQ_INSERT(seq, i, elem) BOOST_PP_SEQ_INSERT_I(seq, i, elem) 25 | # define BOOST_PP_SEQ_INSERT_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(i, seq) 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /seq/pop_back.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_POP_BACK_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_POP_BACK_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_SEQ_POP_BACK */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_SEQ_POP_BACK(seq) BOOST_PP_SEQ_FIRST_N(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), seq) 24 | # else 25 | # define BOOST_PP_SEQ_POP_BACK(seq) BOOST_PP_SEQ_POP_BACK_I(seq) 26 | # define BOOST_PP_SEQ_POP_BACK_I(seq) BOOST_PP_SEQ_FIRST_N(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), seq) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /seq/pop_front.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_POP_FRONT_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_POP_FRONT_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_SEQ_POP_FRONT */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_SEQ_POP_FRONT(seq) BOOST_PP_SEQ_TAIL(seq) 22 | # else 23 | # define BOOST_PP_SEQ_POP_FRONT(seq) BOOST_PP_SEQ_POP_FRONT_I(seq) 24 | # define BOOST_PP_SEQ_POP_FRONT_I(seq) BOOST_PP_SEQ_TAIL(seq) 25 | # endif 26 | # 27 | # endif 28 | -------------------------------------------------------------------------------- /seq/push_back.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP 14 | # 15 | # /* BOOST_PP_SEQ_PUSH_BACK */ 16 | # 17 | # define BOOST_PP_SEQ_PUSH_BACK(seq, elem) seq(elem) 18 | # 19 | # endif 20 | -------------------------------------------------------------------------------- /seq/push_front.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_PUSH_FRONT_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_PUSH_FRONT_HPP 14 | # 15 | # /* BOOST_PP_SEQ_PUSH_FRONT */ 16 | # 17 | # define BOOST_PP_SEQ_PUSH_FRONT(seq, elem) (elem)seq 18 | # 19 | # endif 20 | -------------------------------------------------------------------------------- /seq/remove.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_REMOVE_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_REMOVE_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_SEQ_REMOVE */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_SEQ_REMOVE(seq, i) BOOST_PP_SEQ_FIRST_N(i, seq) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) 24 | # else 25 | # define BOOST_PP_SEQ_REMOVE(seq, i) BOOST_PP_SEQ_REMOVE_I(seq, i) 26 | # define BOOST_PP_SEQ_REMOVE_I(seq, i) BOOST_PP_SEQ_FIRST_N(i, seq) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /seq/replace.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_REPLACE_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_REPLACE_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_SEQ_REPLACE */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) 24 | # else 25 | # define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_REPLACE_I(seq, i, elem) 26 | # define BOOST_PP_SEQ_REPLACE_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /seq/rest_n.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_REST_N_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_SEQ_REST_N */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))() 25 | # else 26 | # define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq) 27 | # define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))() 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /seq/reverse.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_REVERSE_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_REVERSE_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_SEQ_REVERSE */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 22 | # define BOOST_PP_SEQ_REVERSE(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_REVERSE_O, BOOST_PP_EMPTY, seq)() 23 | # else 24 | # define BOOST_PP_SEQ_REVERSE(seq) BOOST_PP_SEQ_REVERSE_I(seq) 25 | # define BOOST_PP_SEQ_REVERSE_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_REVERSE_O, BOOST_PP_EMPTY, seq)() 26 | # endif 27 | # 28 | # define BOOST_PP_SEQ_REVERSE_O(s, state, elem) (elem) state 29 | # 30 | # /* BOOST_PP_SEQ_REVERSE_S */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_SEQ_REVERSE_S(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_REVERSE_O, BOOST_PP_EMPTY, seq)() 34 | # else 35 | # define BOOST_PP_SEQ_REVERSE_S(s, seq) BOOST_PP_SEQ_REVERSE_S_I(s, seq) 36 | # define BOOST_PP_SEQ_REVERSE_S_I(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_REVERSE_O, BOOST_PP_EMPTY, seq)() 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /seq/seq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_SEQ_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_SEQ_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_SEQ_HEAD */ 19 | # 20 | # define BOOST_PP_SEQ_HEAD(seq) BOOST_PP_SEQ_ELEM(0, seq) 21 | # 22 | # /* BOOST_PP_SEQ_TAIL */ 23 | # 24 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 25 | # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_1((seq)) 26 | # define BOOST_PP_SEQ_TAIL_1(par) BOOST_PP_SEQ_TAIL_2 ## par 27 | # define BOOST_PP_SEQ_TAIL_2(seq) BOOST_PP_SEQ_TAIL_I ## seq 28 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 29 | # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_ID(BOOST_PP_SEQ_TAIL_I seq) 30 | # define BOOST_PP_SEQ_TAIL_ID(id) id 31 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_D(seq) 33 | # define BOOST_PP_SEQ_TAIL_D(seq) BOOST_PP_SEQ_TAIL_I seq 34 | # else 35 | # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_I seq 36 | # endif 37 | # 38 | # define BOOST_PP_SEQ_TAIL_I(x) 39 | # 40 | # /* BOOST_PP_SEQ_NIL */ 41 | # 42 | # define BOOST_PP_SEQ_NIL(x) (x) 43 | # 44 | # endif 45 | -------------------------------------------------------------------------------- /seq/subseq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_SEQ_SUBSEQ */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 22 | # define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) 23 | # else 24 | # define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) 25 | # define BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /seq/to_array.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_TO_ARRAY_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_TO_ARRAY_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_SEQ_TO_ARRAY */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 22 | # define BOOST_PP_SEQ_TO_ARRAY(seq) (BOOST_PP_SEQ_SIZE(seq), (BOOST_PP_SEQ_ENUM(seq))) 23 | # else 24 | # define BOOST_PP_SEQ_TO_ARRAY(seq) BOOST_PP_SEQ_TO_ARRAY_I(seq) 25 | # define BOOST_PP_SEQ_TO_ARRAY_I(seq) (BOOST_PP_SEQ_SIZE(seq), (BOOST_PP_SEQ_ENUM(seq))) 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /seq/to_list.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2011. * 4 | # * (C) Copyright Edward Diener 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_SEQ_TO_LIST_HPP 14 | # define BOOST_PREPROCESSOR_SEQ_TO_LIST_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_SEQ_TO_LIST */ 21 | # 22 | # define BOOST_PP_SEQ_TO_LIST(seq) BOOST_PP_SEQ_TO_LIST_I(BOOST_PP_SEQ_BINARY_TRANSFORM(seq)) 23 | # define BOOST_PP_SEQ_TO_LIST_I(bseq) BOOST_PP_SEQ_TO_LIST_A bseq BOOST_PP_NIL BOOST_PP_SEQ_TO_LIST_B bseq 24 | # define BOOST_PP_SEQ_TO_LIST_A(m, e) m(BOOST_PP_LPAREN() e BOOST_PP_COMMA() BOOST_PP_SEQ_TO_LIST_A_ID) 25 | # define BOOST_PP_SEQ_TO_LIST_A_ID() BOOST_PP_SEQ_TO_LIST_A 26 | # define BOOST_PP_SEQ_TO_LIST_B(m, e) m(BOOST_PP_RPAREN() BOOST_PP_SEQ_TO_LIST_B_ID) 27 | # define BOOST_PP_SEQ_TO_LIST_B_ID() BOOST_PP_SEQ_TO_LIST_B 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /seq/to_tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_SEQ_TO_TUPLE */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_SEQ_TO_TUPLE(seq) (BOOST_PP_SEQ_ENUM(seq)) 22 | # else 23 | # define BOOST_PP_SEQ_TO_TUPLE(seq) BOOST_PP_SEQ_TO_TUPLE_I(seq) 24 | # define BOOST_PP_SEQ_TO_TUPLE_I(seq) (BOOST_PP_SEQ_ENUM(seq)) 25 | # endif 26 | # 27 | # endif 28 | -------------------------------------------------------------------------------- /slot.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SLOT_HPP 13 | # define BOOST_PREPROCESSOR_SLOT_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /slot/counter.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2005. * 4 | # * Distributed under the Boost Software License, Version 1.0. (See * 5 | # * accompanying file LICENSE_1_0.txt or copy at * 6 | # * http://www.boost.org/LICENSE_1_0.txt) * 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SLOT_COUNTER_HPP 13 | # define BOOST_PREPROCESSOR_SLOT_COUNTER_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_COUNTER */ 18 | # 19 | # define BOOST_PP_COUNTER 0 20 | # 21 | # /* BOOST_PP_UPDATE_COUNTER */ 22 | # 23 | # define BOOST_PP_UPDATE_COUNTER() 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /slot/slot.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP 13 | # define BOOST_PREPROCESSOR_SLOT_SLOT_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_ASSIGN_SLOT */ 19 | # 20 | # define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i) 21 | # 22 | # define BOOST_PP_ASSIGN_SLOT_1 23 | # define BOOST_PP_ASSIGN_SLOT_2 24 | # define BOOST_PP_ASSIGN_SLOT_3 25 | # define BOOST_PP_ASSIGN_SLOT_4 26 | # define BOOST_PP_ASSIGN_SLOT_5 27 | # 28 | # /* BOOST_PP_SLOT */ 29 | # 30 | # define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)() 31 | # 32 | # endif 33 | -------------------------------------------------------------------------------- /stringize.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP 15 | # define BOOST_PREPROCESSOR_STRINGIZE_HPP 16 | # 17 | # include 18 | # 19 | # /* BOOST_PP_STRINGIZE */ 20 | # 21 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 22 | # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text)) 23 | # define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg 24 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 25 | # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text)) 26 | # define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par 27 | # else 28 | # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text) 29 | # endif 30 | # 31 | # define BOOST_PP_STRINGIZE_I(text) #text 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # /* Revised by Edward Diener (2011) */ 12 | # 13 | # /* See http://www.boost.org for most recent version. */ 14 | # 15 | # ifndef BOOST_PREPROCESSOR_TUPLE_HPP 16 | # define BOOST_PREPROCESSOR_TUPLE_HPP 17 | # 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /tuple/enum.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_TUPLE_ENUM_HPP 14 | # define BOOST_PREPROCESSOR_TUPLE_ENUM_HPP 15 | # 16 | # include 17 | # 18 | # /* BOOST_PP_TUPLE_ENUM */ 19 | # 20 | # define BOOST_PP_TUPLE_ENUM BOOST_PP_TUPLE_REM_CTOR 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /tuple/size.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_TUPLE_SIZE_HPP 14 | # define BOOST_PREPROCESSOR_TUPLE_SIZE_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # 20 | # if BOOST_PP_VARIADICS 21 | # if BOOST_PP_VARIADICS_MSVC 22 | # define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,) 23 | # else 24 | # define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple 25 | # endif 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /tuple/to_array.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_TUPLE_TO_ARRAY_HPP 14 | # define BOOST_PREPROCESSOR_TUPLE_TO_ARRAY_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_TUPLE_TO_ARRAY */ 22 | # 23 | # if BOOST_PP_VARIADICS 24 | # if BOOST_PP_VARIADICS_MSVC 25 | # define BOOST_PP_TUPLE_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__), (__VA_ARGS__)) 26 | # define BOOST_PP_TUPLE_TO_ARRAY_I(m, args) BOOST_PP_TUPLE_TO_ARRAY_II(m, args) 27 | # define BOOST_PP_TUPLE_TO_ARRAY_II(m, args) BOOST_PP_CAT(m ## args,) 28 | # else 29 | # define BOOST_PP_TUPLE_TO_ARRAY(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__) 30 | # endif 31 | # define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_VARIADIC_SIZE tuple, tuple) 32 | # define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple) 33 | # else 34 | # define BOOST_PP_TUPLE_TO_ARRAY(size, tuple) (size, tuple) 35 | # endif 36 | # 37 | # endif 38 | -------------------------------------------------------------------------------- /variadic.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /variadic/size.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP 15 | # 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_VARIADIC_SIZE */ 20 | # 21 | # if BOOST_PP_VARIADICS 22 | # if BOOST_PP_VARIADICS_MSVC 23 | # define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),) 24 | # else 25 | # define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,) 26 | # endif 27 | # define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /variadic/to_array.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP 15 | # 16 | # include 17 | # include 18 | # if BOOST_PP_VARIADICS_MSVC 19 | # include 20 | # endif 21 | # 22 | # /* BOOST_PP_VARIADIC_TO_ARRAY */ 23 | # 24 | # if BOOST_PP_VARIADICS 25 | # if BOOST_PP_VARIADICS_MSVC 26 | # define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),(__VA_ARGS__)) 27 | # else 28 | # define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__)) 29 | # endif 30 | # endif 31 | # 32 | # endif 33 | -------------------------------------------------------------------------------- /variadic/to_list.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP 15 | # 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_VARIADIC_TO_LIST */ 20 | # 21 | # if BOOST_PP_VARIADICS 22 | # define BOOST_PP_VARIADIC_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST((__VA_ARGS__)) 23 | # endif 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /variadic/to_seq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_TO_SEQ_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_TO_SEQ_HPP 15 | # 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_VARIADIC_TO_SEQ */ 20 | # 21 | # if BOOST_PP_VARIADICS 22 | # define BOOST_PP_VARIADIC_TO_SEQ(...) BOOST_PP_TUPLE_TO_SEQ((__VA_ARGS__)) 23 | # endif 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /variadic/to_tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_TO_TUPLE_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_TO_TUPLE_HPP 15 | # 16 | # include 17 | # 18 | # /* BOOST_PP_VARIADIC_TO_TUPLE */ 19 | # 20 | # if BOOST_PP_VARIADICS 21 | # define BOOST_PP_VARIADIC_TO_TUPLE(...) (__VA_ARGS__) 22 | # endif 23 | # 24 | # endif 25 | -------------------------------------------------------------------------------- /while.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_WHILE_HPP 13 | # define BOOST_PREPROCESSOR_WHILE_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /wstringize.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_WSTRINGIZE_HPP 13 | # define BOOST_PREPROCESSOR_WSTRINGIZE_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_WSTRINGIZE */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_WSTRINGIZE(text) BOOST_PP_WSTRINGIZE_I(text) 21 | # else 22 | # define BOOST_PP_WSTRINGIZE(text) BOOST_PP_WSTRINGIZE_OO((text)) 23 | # define BOOST_PP_WSTRINGIZE_OO(par) BOOST_PP_WSTRINGIZE_I ## par 24 | # endif 25 | # 26 | # define BOOST_PP_WSTRINGIZE_I(text) BOOST_PP_WSTRINGIZE_II(#text) 27 | # define BOOST_PP_WSTRINGIZE_II(str) L ## str 28 | # 29 | # endif 30 | --------------------------------------------------------------------------------