From 608163ebbe5b8b4ee4b567527c6d8206ffdad852 Mon Sep 17 00:00:00 2001 From: Paul Mensonides Date: Thu, 3 Oct 2002 21:49:23 +0000 Subject: [PATCH 1/5] removed temporary docs [SVN r15687] --- docs.1/blank.html | 9 - docs.1/contents.html | 390 ------------------ docs.1/data/arrays.html | 43 -- docs.1/data/lists.html | 36 -- docs.1/data/tuples.html | 32 -- docs.1/headers/arithmetic.hpp.html | 25 -- docs.1/headers/arithmetic/add.hpp.html | 20 - docs.1/headers/arithmetic/dec.hpp.html | 19 - docs.1/headers/arithmetic/div.hpp.html | 20 - docs.1/headers/arithmetic/inc.hpp.html | 19 - docs.1/headers/arithmetic/mod.hpp.html | 20 - docs.1/headers/arithmetic/mul.hpp.html | 20 - docs.1/headers/arithmetic/sub.hpp.html | 20 - docs.1/headers/array.hpp.html | 21 - docs.1/headers/array/data.hpp.html | 19 - docs.1/headers/array/elem.hpp.html | 19 - docs.1/headers/array/size.hpp.html | 19 - docs.1/headers/cat.hpp.html | 19 - docs.1/headers/comparison.hpp.html | 24 -- docs.1/headers/comparison/equal.hpp.html | 20 - docs.1/headers/comparison/greater.hpp.html | 20 - .../headers/comparison/greater_equal.hpp.html | 20 - docs.1/headers/comparison/less.hpp.html | 20 - docs.1/headers/comparison/less_equal.hpp.html | 20 - docs.1/headers/comparison/not_equal.hpp.html | 20 - docs.1/headers/config/limits.hpp.html | 29 -- docs.1/headers/control.hpp.html | 23 -- docs.1/headers/control/expr_if.hpp.html | 19 - docs.1/headers/control/expr_iif.hpp.html | 19 - docs.1/headers/control/if.hpp.html | 19 - docs.1/headers/control/iif.hpp.html | 19 - docs.1/headers/control/while.hpp.html | 20 - docs.1/headers/debug.hpp.html | 20 - docs.1/headers/debug/assert.hpp.html | 20 - docs.1/headers/debug/line.hpp.html | 19 - docs.1/headers/facilities.hpp.html | 23 -- docs.1/headers/facilities/apply.hpp.html | 19 - docs.1/headers/facilities/empty.hpp.html | 19 - docs.1/headers/facilities/expand.hpp.html | 19 - docs.1/headers/facilities/identity.hpp.html | 19 - docs.1/headers/facilities/intercept.hpp.html | 19 - docs.1/headers/iteration.hpp.html | 21 - docs.1/headers/iteration/iterate.hpp.html | 32 -- docs.1/headers/iteration/local.hpp.html | 19 - docs.1/headers/iteration/self.hpp.html | 19 - docs.1/headers/library.hpp.html | 15 - docs.1/headers/list.hpp.html | 35 -- docs.1/headers/list/adt.hpp.html | 24 -- docs.1/headers/list/append.hpp.html | 20 - docs.1/headers/list/at.hpp.html | 20 - docs.1/headers/list/cat.hpp.html | 20 - docs.1/headers/list/enum.hpp.html | 20 - docs.1/headers/list/filter.hpp.html | 20 - docs.1/headers/list/first_n.hpp.html | 20 - docs.1/headers/list/fold_left.hpp.html | 23 -- docs.1/headers/list/fold_right.hpp.html | 23 -- docs.1/headers/list/for_each.hpp.html | 20 - docs.1/headers/list/for_each_i.hpp.html | 20 - docs.1/headers/list/for_each_product.hpp.html | 20 - docs.1/headers/list/rest_n.hpp.html | 20 - docs.1/headers/list/reverse.hpp.html | 20 - docs.1/headers/list/size.hpp.html | 20 - docs.1/headers/list/to_tuple.hpp.html | 20 - docs.1/headers/list/transform.hpp.html | 20 - docs.1/headers/logical.hpp.html | 29 -- docs.1/headers/logical/and.hpp.html | 19 - docs.1/headers/logical/bitand.hpp.html | 19 - docs.1/headers/logical/bitnor.hpp.html | 19 - docs.1/headers/logical/bitor.hpp.html | 19 - docs.1/headers/logical/bitxor.hpp.html | 19 - docs.1/headers/logical/bool.hpp.html | 19 - docs.1/headers/logical/compl.hpp.html | 19 - docs.1/headers/logical/nor.hpp.html | 19 - docs.1/headers/logical/not.hpp.html | 19 - docs.1/headers/logical/or.hpp.html | 19 - docs.1/headers/logical/xor.hpp.html | 19 - docs.1/headers/preprocessor.hpp.html | 15 - docs.1/headers/punctuation.hpp.html | 22 - docs.1/headers/punctuation/comma.hpp.html | 19 - docs.1/headers/punctuation/comma_if.hpp.html | 19 - docs.1/headers/punctuation/paren.hpp.html | 20 - docs.1/headers/punctuation/paren_if.hpp.html | 20 - docs.1/headers/repetition.hpp.html | 28 -- docs.1/headers/repetition/enum.hpp.html | 20 - .../repetition/enum_binary_params.hpp.html | 20 - .../headers/repetition/enum_params.hpp.html | 20 - .../enum_params_with_a_default.hpp.html | 19 - .../enum_params_with_defaults.hpp.html | 19 - .../headers/repetition/enum_shifted.hpp.html | 20 - .../repetition/enum_shifted_params.hpp.html | 20 - docs.1/headers/repetition/for.hpp.html | 20 - docs.1/headers/repetition/repeat.hpp.html | 23 -- .../repetition/repeat_from_to.hpp.html | 23 -- docs.1/headers/selection.hpp.html | 20 - docs.1/headers/selection/max.hpp.html | 20 - docs.1/headers/selection/min.hpp.html | 20 - docs.1/headers/slot.hpp.html | 19 - docs.1/headers/slot/slot.hpp.html | 20 - docs.1/headers/stringize.hpp.html | 19 - docs.1/headers/tuple.hpp.html | 23 -- docs.1/headers/tuple/eat.hpp.html | 19 - docs.1/headers/tuple/elem.hpp.html | 19 - docs.1/headers/tuple/rem.hpp.html | 19 - docs.1/headers/tuple/reverse.hpp.html | 19 - docs.1/headers/tuple/to_list.hpp.html | 19 - docs.1/index.html | 13 - docs.1/ref/add.html | 58 --- docs.1/ref/add_d.html | 80 ---- docs.1/ref/and.html | 54 --- docs.1/ref/apply.html | 54 --- docs.1/ref/array_data.html | 39 -- docs.1/ref/array_elem.html | 41 -- docs.1/ref/array_size.html | 35 -- docs.1/ref/assert.html | 96 ----- docs.1/ref/assert_msg.html | 56 --- docs.1/ref/assign_slot.html | 51 --- docs.1/ref/bitand.html | 55 --- docs.1/ref/bitnor.html | 55 --- docs.1/ref/bitor.html | 55 --- docs.1/ref/bitxor.html | 55 --- docs.1/ref/bool.html | 54 --- docs.1/ref/cat.html | 47 --- docs.1/ref/comma.html | 33 -- docs.1/ref/comma_if.html | 50 --- docs.1/ref/compl.html | 48 --- docs.1/ref/config_errors.html | 29 -- docs.1/ref/config_extended_line_info.html | 33 -- docs.1/ref/config_unrolled.html | 29 -- docs.1/ref/dec.html | 44 -- docs.1/ref/div.html | 53 --- docs.1/ref/div_d.html | 75 ---- docs.1/ref/empty.html | 36 -- docs.1/ref/enum.html | 70 ---- docs.1/ref/enum_binary_params.html | 66 --- docs.1/ref/enum_binary_params_z.html | 83 ---- docs.1/ref/enum_params.html | 59 --- docs.1/ref/enum_params_with_a_default.html | 73 ---- docs.1/ref/enum_params_with_defaults.html | 74 ---- docs.1/ref/enum_params_z.html | 72 ---- docs.1/ref/enum_shifted.html | 72 ---- docs.1/ref/enum_shifted_params.html | 63 --- docs.1/ref/enum_shifted_params_z.html | 69 ---- docs.1/ref/enum_shifted_z.html | 83 ---- docs.1/ref/enum_z.html | 86 ---- docs.1/ref/equal.html | 54 --- docs.1/ref/equal_d.html | 59 --- docs.1/ref/expand.html | 57 --- docs.1/ref/expr_if.html | 60 --- docs.1/ref/expr_iif.html | 57 --- docs.1/ref/filename_x.html | 42 -- docs.1/ref/for.html | 95 ----- docs.1/ref/for_r.html | 145 ------- docs.1/ref/frame_finish.html | 32 -- docs.1/ref/frame_flags.html | 32 -- docs.1/ref/frame_iteration.html | 63 --- docs.1/ref/frame_start.html | 32 -- docs.1/ref/greater.html | 55 --- docs.1/ref/greater_d.html | 59 --- docs.1/ref/greater_equal.html | 55 --- docs.1/ref/greater_equal_d.html | 59 --- docs.1/ref/identity.html | 47 --- docs.1/ref/if.html | 53 --- docs.1/ref/iif.html | 55 --- docs.1/ref/inc.html | 44 -- docs.1/ref/include_self.html | 91 ---- docs.1/ref/indirect_self.html | 35 -- docs.1/ref/intercept.html | 41 -- docs.1/ref/is_iterating.html | 27 -- docs.1/ref/is_selfish.html | 27 -- docs.1/ref/iterate.html | 73 ---- docs.1/ref/iteration.html | 45 -- docs.1/ref/iteration_depth.html | 58 --- docs.1/ref/iteration_finish.html | 47 --- docs.1/ref/iteration_flags.html | 58 --- docs.1/ref/iteration_limits.html | 48 --- docs.1/ref/iteration_params_x.html | 66 --- docs.1/ref/iteration_start.html | 47 --- docs.1/ref/less.html | 55 --- docs.1/ref/less_d.html | 59 --- docs.1/ref/less_equal.html | 55 --- docs.1/ref/less_equal_d.html | 59 --- docs.1/ref/limit_bool.html | 31 -- docs.1/ref/limit_dim.html | 24 -- docs.1/ref/limit_for.html | 24 -- docs.1/ref/limit_iteration.html | 24 -- docs.1/ref/limit_iteration_dim.html | 24 -- docs.1/ref/limit_mag.html | 24 -- docs.1/ref/limit_repeat.html | 25 -- docs.1/ref/limit_slot_count.html | 24 -- docs.1/ref/limit_slot_sig.html | 24 -- docs.1/ref/limit_tuple.html | 24 -- docs.1/ref/limit_while.html | 24 -- docs.1/ref/line.html | 103 ----- docs.1/ref/list_append.html | 59 --- docs.1/ref/list_append_d.html | 86 ---- docs.1/ref/list_at.html | 51 --- docs.1/ref/list_at_d.html | 53 --- docs.1/ref/list_cat.html | 48 --- docs.1/ref/list_cat_d.html | 57 --- docs.1/ref/list_cons.html | 77 ---- docs.1/ref/list_enum.html | 52 --- docs.1/ref/list_enum_r.html | 59 --- docs.1/ref/list_filter.html | 65 --- docs.1/ref/list_filter_d.html | 76 ---- docs.1/ref/list_first.html | 52 --- docs.1/ref/list_first_n.html | 52 --- docs.1/ref/list_first_n_d.html | 61 --- docs.1/ref/list_fold_left.html | 65 --- docs.1/ref/list_fold_left_2nd.html | 65 --- docs.1/ref/list_fold_left_2nd_d.html | 76 ---- docs.1/ref/list_fold_left_d.html | 71 ---- docs.1/ref/list_fold_left_d_old.html | 76 ---- docs.1/ref/list_fold_right.html | 69 ---- docs.1/ref/list_fold_right_2nd.html | 69 ---- docs.1/ref/list_fold_right_2nd_d.html | 76 ---- docs.1/ref/list_fold_right_d.html | 71 ---- docs.1/ref/list_fold_right_d_old.html | 80 ---- docs.1/ref/list_for_each.html | 65 --- docs.1/ref/list_for_each_i.html | 65 --- docs.1/ref/list_for_each_i_r.html | 72 ---- docs.1/ref/list_for_each_product.html | 76 ---- docs.1/ref/list_for_each_product_r.html | 108 ----- docs.1/ref/list_for_each_r.html | 71 ---- docs.1/ref/list_is_cons.html | 41 -- docs.1/ref/list_is_nil.html | 41 -- docs.1/ref/list_nil.html | 58 --- docs.1/ref/list_rest.html | 52 --- docs.1/ref/list_rest_n.html | 52 --- docs.1/ref/list_rest_n_d.html | 61 --- docs.1/ref/list_reverse.html | 45 -- docs.1/ref/list_reverse_d.html | 53 --- docs.1/ref/list_size.html | 45 -- docs.1/ref/list_size_d.html | 57 --- docs.1/ref/list_to_tuple.html | 52 --- docs.1/ref/list_to_tuple_r.html | 59 --- docs.1/ref/list_transform.html | 67 --- docs.1/ref/list_transform_d.html | 76 ---- docs.1/ref/local_iterate.html | 53 --- docs.1/ref/local_limits.html | 71 ---- docs.1/ref/local_macro.html | 55 --- docs.1/ref/lparen.html | 42 -- docs.1/ref/lparen_if.html | 51 --- docs.1/ref/max.html | 54 --- docs.1/ref/max_d.html | 60 --- docs.1/ref/min.html | 54 --- docs.1/ref/min_d.html | 60 --- docs.1/ref/mod.html | 53 --- docs.1/ref/mod_d.html | 66 --- docs.1/ref/mul.html | 58 --- docs.1/ref/mul_d.html | 81 ---- docs.1/ref/nil.html | 31 -- docs.1/ref/nor.html | 54 --- docs.1/ref/not.html | 49 --- docs.1/ref/not_equal.html | 54 --- docs.1/ref/not_equal_d.html | 59 --- docs.1/ref/or.html | 54 --- docs.1/ref/relative_finish.html | 35 -- docs.1/ref/relative_flags.html | 35 -- docs.1/ref/relative_iteration.html | 91 ---- docs.1/ref/relative_start.html | 35 -- docs.1/ref/repeat.html | 70 ---- docs.1/ref/repeat_1st.html | 72 ---- docs.1/ref/repeat_2nd.html | 72 ---- docs.1/ref/repeat_3rd.html | 72 ---- docs.1/ref/repeat_from_to.html | 85 ---- docs.1/ref/repeat_from_to_1st.html | 81 ---- docs.1/ref/repeat_from_to_2nd.html | 81 ---- docs.1/ref/repeat_from_to_3rd.html | 81 ---- docs.1/ref/repeat_from_to_z.html | 95 ----- docs.1/ref/repeat_z.html | 90 ---- docs.1/ref/rparen.html | 43 -- docs.1/ref/rparen_if.html | 51 --- docs.1/ref/slot.html | 50 --- docs.1/ref/stringize.html | 40 -- docs.1/ref/sub.html | 53 --- docs.1/ref/sub_d.html | 75 ---- docs.1/ref/tuple_eat.html | 48 --- docs.1/ref/tuple_elem.html | 55 --- docs.1/ref/tuple_rem.html | 42 -- docs.1/ref/tuple_reverse.html | 46 --- docs.1/ref/tuple_to_list.html | 47 --- docs.1/ref/value.html | 27 -- docs.1/ref/while.html | 106 ----- docs.1/ref/while_d.html | 119 ------ docs.1/ref/xor.html | 54 --- docs.1/scripts.js | 24 -- docs.1/styles.css | 72 ---- docs.1/syntax.html | 199 --------- docs.1/top.html | 27 -- 289 files changed, 13184 deletions(-) delete mode 100644 docs.1/blank.html delete mode 100644 docs.1/contents.html delete mode 100644 docs.1/data/arrays.html delete mode 100644 docs.1/data/lists.html delete mode 100644 docs.1/data/tuples.html delete mode 100644 docs.1/headers/arithmetic.hpp.html delete mode 100644 docs.1/headers/arithmetic/add.hpp.html delete mode 100644 docs.1/headers/arithmetic/dec.hpp.html delete mode 100644 docs.1/headers/arithmetic/div.hpp.html delete mode 100644 docs.1/headers/arithmetic/inc.hpp.html delete mode 100644 docs.1/headers/arithmetic/mod.hpp.html delete mode 100644 docs.1/headers/arithmetic/mul.hpp.html delete mode 100644 docs.1/headers/arithmetic/sub.hpp.html delete mode 100644 docs.1/headers/array.hpp.html delete mode 100644 docs.1/headers/array/data.hpp.html delete mode 100644 docs.1/headers/array/elem.hpp.html delete mode 100644 docs.1/headers/array/size.hpp.html delete mode 100644 docs.1/headers/cat.hpp.html delete mode 100644 docs.1/headers/comparison.hpp.html delete mode 100644 docs.1/headers/comparison/equal.hpp.html delete mode 100644 docs.1/headers/comparison/greater.hpp.html delete mode 100644 docs.1/headers/comparison/greater_equal.hpp.html delete mode 100644 docs.1/headers/comparison/less.hpp.html delete mode 100644 docs.1/headers/comparison/less_equal.hpp.html delete mode 100644 docs.1/headers/comparison/not_equal.hpp.html delete mode 100644 docs.1/headers/config/limits.hpp.html delete mode 100644 docs.1/headers/control.hpp.html delete mode 100644 docs.1/headers/control/expr_if.hpp.html delete mode 100644 docs.1/headers/control/expr_iif.hpp.html delete mode 100644 docs.1/headers/control/if.hpp.html delete mode 100644 docs.1/headers/control/iif.hpp.html delete mode 100644 docs.1/headers/control/while.hpp.html delete mode 100644 docs.1/headers/debug.hpp.html delete mode 100644 docs.1/headers/debug/assert.hpp.html delete mode 100644 docs.1/headers/debug/line.hpp.html delete mode 100644 docs.1/headers/facilities.hpp.html delete mode 100644 docs.1/headers/facilities/apply.hpp.html delete mode 100644 docs.1/headers/facilities/empty.hpp.html delete mode 100644 docs.1/headers/facilities/expand.hpp.html delete mode 100644 docs.1/headers/facilities/identity.hpp.html delete mode 100644 docs.1/headers/facilities/intercept.hpp.html delete mode 100644 docs.1/headers/iteration.hpp.html delete mode 100644 docs.1/headers/iteration/iterate.hpp.html delete mode 100644 docs.1/headers/iteration/local.hpp.html delete mode 100644 docs.1/headers/iteration/self.hpp.html delete mode 100644 docs.1/headers/library.hpp.html delete mode 100644 docs.1/headers/list.hpp.html delete mode 100644 docs.1/headers/list/adt.hpp.html delete mode 100644 docs.1/headers/list/append.hpp.html delete mode 100644 docs.1/headers/list/at.hpp.html delete mode 100644 docs.1/headers/list/cat.hpp.html delete mode 100644 docs.1/headers/list/enum.hpp.html delete mode 100644 docs.1/headers/list/filter.hpp.html delete mode 100644 docs.1/headers/list/first_n.hpp.html delete mode 100644 docs.1/headers/list/fold_left.hpp.html delete mode 100644 docs.1/headers/list/fold_right.hpp.html delete mode 100644 docs.1/headers/list/for_each.hpp.html delete mode 100644 docs.1/headers/list/for_each_i.hpp.html delete mode 100644 docs.1/headers/list/for_each_product.hpp.html delete mode 100644 docs.1/headers/list/rest_n.hpp.html delete mode 100644 docs.1/headers/list/reverse.hpp.html delete mode 100644 docs.1/headers/list/size.hpp.html delete mode 100644 docs.1/headers/list/to_tuple.hpp.html delete mode 100644 docs.1/headers/list/transform.hpp.html delete mode 100644 docs.1/headers/logical.hpp.html delete mode 100644 docs.1/headers/logical/and.hpp.html delete mode 100644 docs.1/headers/logical/bitand.hpp.html delete mode 100644 docs.1/headers/logical/bitnor.hpp.html delete mode 100644 docs.1/headers/logical/bitor.hpp.html delete mode 100644 docs.1/headers/logical/bitxor.hpp.html delete mode 100644 docs.1/headers/logical/bool.hpp.html delete mode 100644 docs.1/headers/logical/compl.hpp.html delete mode 100644 docs.1/headers/logical/nor.hpp.html delete mode 100644 docs.1/headers/logical/not.hpp.html delete mode 100644 docs.1/headers/logical/or.hpp.html delete mode 100644 docs.1/headers/logical/xor.hpp.html delete mode 100644 docs.1/headers/preprocessor.hpp.html delete mode 100644 docs.1/headers/punctuation.hpp.html delete mode 100644 docs.1/headers/punctuation/comma.hpp.html delete mode 100644 docs.1/headers/punctuation/comma_if.hpp.html delete mode 100644 docs.1/headers/punctuation/paren.hpp.html delete mode 100644 docs.1/headers/punctuation/paren_if.hpp.html delete mode 100644 docs.1/headers/repetition.hpp.html delete mode 100644 docs.1/headers/repetition/enum.hpp.html delete mode 100644 docs.1/headers/repetition/enum_binary_params.hpp.html delete mode 100644 docs.1/headers/repetition/enum_params.hpp.html delete mode 100644 docs.1/headers/repetition/enum_params_with_a_default.hpp.html delete mode 100644 docs.1/headers/repetition/enum_params_with_defaults.hpp.html delete mode 100644 docs.1/headers/repetition/enum_shifted.hpp.html delete mode 100644 docs.1/headers/repetition/enum_shifted_params.hpp.html delete mode 100644 docs.1/headers/repetition/for.hpp.html delete mode 100644 docs.1/headers/repetition/repeat.hpp.html delete mode 100644 docs.1/headers/repetition/repeat_from_to.hpp.html delete mode 100644 docs.1/headers/selection.hpp.html delete mode 100644 docs.1/headers/selection/max.hpp.html delete mode 100644 docs.1/headers/selection/min.hpp.html delete mode 100644 docs.1/headers/slot.hpp.html delete mode 100644 docs.1/headers/slot/slot.hpp.html delete mode 100644 docs.1/headers/stringize.hpp.html delete mode 100644 docs.1/headers/tuple.hpp.html delete mode 100644 docs.1/headers/tuple/eat.hpp.html delete mode 100644 docs.1/headers/tuple/elem.hpp.html delete mode 100644 docs.1/headers/tuple/rem.hpp.html delete mode 100644 docs.1/headers/tuple/reverse.hpp.html delete mode 100644 docs.1/headers/tuple/to_list.hpp.html delete mode 100644 docs.1/index.html delete mode 100644 docs.1/ref/add.html delete mode 100644 docs.1/ref/add_d.html delete mode 100644 docs.1/ref/and.html delete mode 100644 docs.1/ref/apply.html delete mode 100644 docs.1/ref/array_data.html delete mode 100644 docs.1/ref/array_elem.html delete mode 100644 docs.1/ref/array_size.html delete mode 100644 docs.1/ref/assert.html delete mode 100644 docs.1/ref/assert_msg.html delete mode 100644 docs.1/ref/assign_slot.html delete mode 100644 docs.1/ref/bitand.html delete mode 100644 docs.1/ref/bitnor.html delete mode 100644 docs.1/ref/bitor.html delete mode 100644 docs.1/ref/bitxor.html delete mode 100644 docs.1/ref/bool.html delete mode 100644 docs.1/ref/cat.html delete mode 100644 docs.1/ref/comma.html delete mode 100644 docs.1/ref/comma_if.html delete mode 100644 docs.1/ref/compl.html delete mode 100644 docs.1/ref/config_errors.html delete mode 100644 docs.1/ref/config_extended_line_info.html delete mode 100644 docs.1/ref/config_unrolled.html delete mode 100644 docs.1/ref/dec.html delete mode 100644 docs.1/ref/div.html delete mode 100644 docs.1/ref/div_d.html delete mode 100644 docs.1/ref/empty.html delete mode 100644 docs.1/ref/enum.html delete mode 100644 docs.1/ref/enum_binary_params.html delete mode 100644 docs.1/ref/enum_binary_params_z.html delete mode 100644 docs.1/ref/enum_params.html delete mode 100644 docs.1/ref/enum_params_with_a_default.html delete mode 100644 docs.1/ref/enum_params_with_defaults.html delete mode 100644 docs.1/ref/enum_params_z.html delete mode 100644 docs.1/ref/enum_shifted.html delete mode 100644 docs.1/ref/enum_shifted_params.html delete mode 100644 docs.1/ref/enum_shifted_params_z.html delete mode 100644 docs.1/ref/enum_shifted_z.html delete mode 100644 docs.1/ref/enum_z.html delete mode 100644 docs.1/ref/equal.html delete mode 100644 docs.1/ref/equal_d.html delete mode 100644 docs.1/ref/expand.html delete mode 100644 docs.1/ref/expr_if.html delete mode 100644 docs.1/ref/expr_iif.html delete mode 100644 docs.1/ref/filename_x.html delete mode 100644 docs.1/ref/for.html delete mode 100644 docs.1/ref/for_r.html delete mode 100644 docs.1/ref/frame_finish.html delete mode 100644 docs.1/ref/frame_flags.html delete mode 100644 docs.1/ref/frame_iteration.html delete mode 100644 docs.1/ref/frame_start.html delete mode 100644 docs.1/ref/greater.html delete mode 100644 docs.1/ref/greater_d.html delete mode 100644 docs.1/ref/greater_equal.html delete mode 100644 docs.1/ref/greater_equal_d.html delete mode 100644 docs.1/ref/identity.html delete mode 100644 docs.1/ref/if.html delete mode 100644 docs.1/ref/iif.html delete mode 100644 docs.1/ref/inc.html delete mode 100644 docs.1/ref/include_self.html delete mode 100644 docs.1/ref/indirect_self.html delete mode 100644 docs.1/ref/intercept.html delete mode 100644 docs.1/ref/is_iterating.html delete mode 100644 docs.1/ref/is_selfish.html delete mode 100644 docs.1/ref/iterate.html delete mode 100644 docs.1/ref/iteration.html delete mode 100644 docs.1/ref/iteration_depth.html delete mode 100644 docs.1/ref/iteration_finish.html delete mode 100644 docs.1/ref/iteration_flags.html delete mode 100644 docs.1/ref/iteration_limits.html delete mode 100644 docs.1/ref/iteration_params_x.html delete mode 100644 docs.1/ref/iteration_start.html delete mode 100644 docs.1/ref/less.html delete mode 100644 docs.1/ref/less_d.html delete mode 100644 docs.1/ref/less_equal.html delete mode 100644 docs.1/ref/less_equal_d.html delete mode 100644 docs.1/ref/limit_bool.html delete mode 100644 docs.1/ref/limit_dim.html delete mode 100644 docs.1/ref/limit_for.html delete mode 100644 docs.1/ref/limit_iteration.html delete mode 100644 docs.1/ref/limit_iteration_dim.html delete mode 100644 docs.1/ref/limit_mag.html delete mode 100644 docs.1/ref/limit_repeat.html delete mode 100644 docs.1/ref/limit_slot_count.html delete mode 100644 docs.1/ref/limit_slot_sig.html delete mode 100644 docs.1/ref/limit_tuple.html delete mode 100644 docs.1/ref/limit_while.html delete mode 100644 docs.1/ref/line.html delete mode 100644 docs.1/ref/list_append.html delete mode 100644 docs.1/ref/list_append_d.html delete mode 100644 docs.1/ref/list_at.html delete mode 100644 docs.1/ref/list_at_d.html delete mode 100644 docs.1/ref/list_cat.html delete mode 100644 docs.1/ref/list_cat_d.html delete mode 100644 docs.1/ref/list_cons.html delete mode 100644 docs.1/ref/list_enum.html delete mode 100644 docs.1/ref/list_enum_r.html delete mode 100644 docs.1/ref/list_filter.html delete mode 100644 docs.1/ref/list_filter_d.html delete mode 100644 docs.1/ref/list_first.html delete mode 100644 docs.1/ref/list_first_n.html delete mode 100644 docs.1/ref/list_first_n_d.html delete mode 100644 docs.1/ref/list_fold_left.html delete mode 100644 docs.1/ref/list_fold_left_2nd.html delete mode 100644 docs.1/ref/list_fold_left_2nd_d.html delete mode 100644 docs.1/ref/list_fold_left_d.html delete mode 100644 docs.1/ref/list_fold_left_d_old.html delete mode 100644 docs.1/ref/list_fold_right.html delete mode 100644 docs.1/ref/list_fold_right_2nd.html delete mode 100644 docs.1/ref/list_fold_right_2nd_d.html delete mode 100644 docs.1/ref/list_fold_right_d.html delete mode 100644 docs.1/ref/list_fold_right_d_old.html delete mode 100644 docs.1/ref/list_for_each.html delete mode 100644 docs.1/ref/list_for_each_i.html delete mode 100644 docs.1/ref/list_for_each_i_r.html delete mode 100644 docs.1/ref/list_for_each_product.html delete mode 100644 docs.1/ref/list_for_each_product_r.html delete mode 100644 docs.1/ref/list_for_each_r.html delete mode 100644 docs.1/ref/list_is_cons.html delete mode 100644 docs.1/ref/list_is_nil.html delete mode 100644 docs.1/ref/list_nil.html delete mode 100644 docs.1/ref/list_rest.html delete mode 100644 docs.1/ref/list_rest_n.html delete mode 100644 docs.1/ref/list_rest_n_d.html delete mode 100644 docs.1/ref/list_reverse.html delete mode 100644 docs.1/ref/list_reverse_d.html delete mode 100644 docs.1/ref/list_size.html delete mode 100644 docs.1/ref/list_size_d.html delete mode 100644 docs.1/ref/list_to_tuple.html delete mode 100644 docs.1/ref/list_to_tuple_r.html delete mode 100644 docs.1/ref/list_transform.html delete mode 100644 docs.1/ref/list_transform_d.html delete mode 100644 docs.1/ref/local_iterate.html delete mode 100644 docs.1/ref/local_limits.html delete mode 100644 docs.1/ref/local_macro.html delete mode 100644 docs.1/ref/lparen.html delete mode 100644 docs.1/ref/lparen_if.html delete mode 100644 docs.1/ref/max.html delete mode 100644 docs.1/ref/max_d.html delete mode 100644 docs.1/ref/min.html delete mode 100644 docs.1/ref/min_d.html delete mode 100644 docs.1/ref/mod.html delete mode 100644 docs.1/ref/mod_d.html delete mode 100644 docs.1/ref/mul.html delete mode 100644 docs.1/ref/mul_d.html delete mode 100644 docs.1/ref/nil.html delete mode 100644 docs.1/ref/nor.html delete mode 100644 docs.1/ref/not.html delete mode 100644 docs.1/ref/not_equal.html delete mode 100644 docs.1/ref/not_equal_d.html delete mode 100644 docs.1/ref/or.html delete mode 100644 docs.1/ref/relative_finish.html delete mode 100644 docs.1/ref/relative_flags.html delete mode 100644 docs.1/ref/relative_iteration.html delete mode 100644 docs.1/ref/relative_start.html delete mode 100644 docs.1/ref/repeat.html delete mode 100644 docs.1/ref/repeat_1st.html delete mode 100644 docs.1/ref/repeat_2nd.html delete mode 100644 docs.1/ref/repeat_3rd.html delete mode 100644 docs.1/ref/repeat_from_to.html delete mode 100644 docs.1/ref/repeat_from_to_1st.html delete mode 100644 docs.1/ref/repeat_from_to_2nd.html delete mode 100644 docs.1/ref/repeat_from_to_3rd.html delete mode 100644 docs.1/ref/repeat_from_to_z.html delete mode 100644 docs.1/ref/repeat_z.html delete mode 100644 docs.1/ref/rparen.html delete mode 100644 docs.1/ref/rparen_if.html delete mode 100644 docs.1/ref/slot.html delete mode 100644 docs.1/ref/stringize.html delete mode 100644 docs.1/ref/sub.html delete mode 100644 docs.1/ref/sub_d.html delete mode 100644 docs.1/ref/tuple_eat.html delete mode 100644 docs.1/ref/tuple_elem.html delete mode 100644 docs.1/ref/tuple_rem.html delete mode 100644 docs.1/ref/tuple_reverse.html delete mode 100644 docs.1/ref/tuple_to_list.html delete mode 100644 docs.1/ref/value.html delete mode 100644 docs.1/ref/while.html delete mode 100644 docs.1/ref/while_d.html delete mode 100644 docs.1/ref/xor.html delete mode 100644 docs.1/scripts.js delete mode 100644 docs.1/styles.css delete mode 100644 docs.1/syntax.html delete mode 100644 docs.1/top.html diff --git a/docs.1/blank.html b/docs.1/blank.html deleted file mode 100644 index 05e6d82..0000000 --- a/docs.1/blank.html +++ /dev/null @@ -1,9 +0,0 @@ - - - blank.html - - - - - - diff --git a/docs.1/contents.html b/docs.1/contents.html deleted file mode 100644 index 3d1d735..0000000 --- a/docs.1/contents.html +++ /dev/null @@ -1,390 +0,0 @@ - - - contents.html - - - - - - - - - -

Topics

- - - -

Terminology

- - - -

Data Formats

- - -

- Reference - [abbr.] -

- - - -

Headers

- - - -

Resources

- - - - diff --git a/docs.1/data/arrays.html b/docs.1/data/arrays.html deleted file mode 100644 index 91f1ddc..0000000 --- a/docs.1/data/arrays.html +++ /dev/null @@ -1,43 +0,0 @@ - - - arrays.html - - - - -

Arrays

-
- An array is a data structure consisting of a two-element tuple.  - The first element is the number of elements in the array.  - The second element is another tuple of the elements in the array.  - For example, -
-
- (3, (a, b, c)) -
-
- ...is an array of 3 elements--a, b, and c. -
-
- The primary strength of arrays is that they store their own size.  - Because of this, access to elements does not require the size.  - It only requires that the element exists at a certain index. -
-
- This allows macro parameters to be variable in size and allows data states to change - size without the user explicitly keeping track of the size independently. -
-
- Elements of an array can be extracted with BOOST_PP_ARRAY_ELEM, - an array's size can be extracted with BOOST_PP_ARRAY_SIZE, and - an array can be converted to the more primitive tuple data structure - with BOOST_PP_ARRAY_DATA. -
-

Primitives

- - - diff --git a/docs.1/data/lists.html b/docs.1/data/lists.html deleted file mode 100644 index 3f0fabb..0000000 --- a/docs.1/data/lists.html +++ /dev/null @@ -1,36 +0,0 @@ - - - lists.html - - - - -

Lists

-
- A list is a simple cons-style list with a head and a tail.  - The head of a list is an element, - and the tail is either another list or BOOST_PP_NIL. - For example, -
-
- (a, (b, (c, BOOST_PP_NIL))) -
-
- ...is a list of 3 elements--a, b, and c. -
-
- This allows macro parameters to be variable in size and allows data states to change - size without the user explicitly keeping track of the size independently. -
-
- Elements of a list can be extracted with - BOOST_PP_LIST_FIRST and BOOST_PP_LIST_REST.  -
-

Primitives

- - - diff --git a/docs.1/data/tuples.html b/docs.1/data/tuples.html deleted file mode 100644 index ca01b2e..0000000 --- a/docs.1/data/tuples.html +++ /dev/null @@ -1,32 +0,0 @@ - - - tuples.html - - - - -

Tuples

-
- A tuple is a simple comma-separated list of elements inside parenthesis.  - For example, -
-
- (a, b, c) -
-
- ...is a tuple of 3 elements--a, b, and c. -
-
- Tuples are fast and easy to use.  - However, all access to tuples requires knowledge of its size. -
-
- Elements of a tuple can be extracted with - BOOST_PP_TUPLE_ELEM. -
-

Primitives

- - - diff --git a/docs.1/headers/arithmetic.hpp.html b/docs.1/headers/arithmetic.hpp.html deleted file mode 100644 index 29a8bfd..0000000 --- a/docs.1/headers/arithmetic.hpp.html +++ /dev/null @@ -1,25 +0,0 @@ - - - arithmetic.hpp - - - -
- The arithmetic.hpp includes the headers in the arithmetic folder. -
-

Usage

-
- #include <boost/preprocessor/arithmetic.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/arithmetic/add.hpp.html b/docs.1/headers/arithmetic/add.hpp.html deleted file mode 100644 index c9fb843..0000000 --- a/docs.1/headers/arithmetic/add.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - arithmetic/add.hpp - - - -
- The arithmetic/add.hpp header defines macros for addition. -
-

Usage

-
- #include <boost/preprocessor/arithmetic/add.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/arithmetic/dec.hpp.html b/docs.1/headers/arithmetic/dec.hpp.html deleted file mode 100644 index 2e06a7f..0000000 --- a/docs.1/headers/arithmetic/dec.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - arithmetic/dec.hpp - - - -
- The arithmetic/dec.hpp header defines a decrementation macro. -
-

Usage

-
- #include <boost/preprocessor/arithmetic/dec.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/arithmetic/div.hpp.html b/docs.1/headers/arithmetic/div.hpp.html deleted file mode 100644 index 63fa1b3..0000000 --- a/docs.1/headers/arithmetic/div.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - arithmetic/div.hpp - - - -
- The arithmetic/div.hpp header defines macros for division. -
-

Usage

-
- #include <boost/preprocessor/arithmetic/div.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/arithmetic/inc.hpp.html b/docs.1/headers/arithmetic/inc.hpp.html deleted file mode 100644 index e0208ca..0000000 --- a/docs.1/headers/arithmetic/inc.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - arithmetic/inc.hpp - - - -
- The arithmetic/inc.hpp header defines an incrementation macro. -
-

Usage

-
- #include <boost/preprocessor/arithmetic/inc.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/arithmetic/mod.hpp.html b/docs.1/headers/arithmetic/mod.hpp.html deleted file mode 100644 index 4d7fec4..0000000 --- a/docs.1/headers/arithmetic/mod.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - arithmetic/mod.hpp - - - -
- The arithmetic/mod.hpp header defines macros for modulus. -
-

Usage

-
- #include <boost/preprocessor/arithmetic/mod.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/arithmetic/mul.hpp.html b/docs.1/headers/arithmetic/mul.hpp.html deleted file mode 100644 index 04adf09..0000000 --- a/docs.1/headers/arithmetic/mul.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - arithmetic/mul.hpp - - - -
- The arithmetic/mul.hpp header defines macros for multiplication. -
-

Usage

-
- #include <boost/preprocessor/arithmetic/mul.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/arithmetic/sub.hpp.html b/docs.1/headers/arithmetic/sub.hpp.html deleted file mode 100644 index 3633bde..0000000 --- a/docs.1/headers/arithmetic/sub.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - arithmetic/sub.hpp - - - -
- The arithmetic/sub.hpp header defines macros for subtraction. -
-

Usage

-
- #include <boost/preprocessor/arithmetic/sub.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/array.hpp.html b/docs.1/headers/array.hpp.html deleted file mode 100644 index 11f5c6b..0000000 --- a/docs.1/headers/array.hpp.html +++ /dev/null @@ -1,21 +0,0 @@ - - - array.hpp - - - -
- The array.hpp includes the headers in the array folder. -
-

Usage

-
- #include <boost/preprocessor/array.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/array/data.hpp.html b/docs.1/headers/array/data.hpp.html deleted file mode 100644 index 9729172..0000000 --- a/docs.1/headers/array/data.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - array/data.hpp - - - -
- The array/data.hpp header defines a macro to extract the tuple data from an array. -
-

Usage

-
- #include <boost/preprocessor/array/data.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/array/elem.hpp.html b/docs.1/headers/array/elem.hpp.html deleted file mode 100644 index 606219c..0000000 --- a/docs.1/headers/array/elem.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - array/elem.hpp - - - -
- The array/elem.hpp header defines a macro to extract elements from an array. -
-

Usage

-
- #include <boost/preprocessor/array/elem.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/array/size.hpp.html b/docs.1/headers/array/size.hpp.html deleted file mode 100644 index f1a7895..0000000 --- a/docs.1/headers/array/size.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - array/size.hpp - - - -
- The array/size.hpp header defines a macro that extracts the size of an array. -
-

Usage

-
- #include <boost/preprocessor/array/size.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/cat.hpp.html b/docs.1/headers/cat.hpp.html deleted file mode 100644 index 55be6d1..0000000 --- a/docs.1/headers/cat.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - cat.hpp - - - -
- The cat.hpp header defines a concatenation macro. -
-

Usage

-
- #include <boost/preprocessor/cat.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/comparison.hpp.html b/docs.1/headers/comparison.hpp.html deleted file mode 100644 index 066f290..0000000 --- a/docs.1/headers/comparison.hpp.html +++ /dev/null @@ -1,24 +0,0 @@ - - - comparison.hpp - - - -
- The comparison.hpp includes the headers in the comparison folder. -
-

Usage

-
- #include <boost/preprocessor/comparison.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/comparison/equal.hpp.html b/docs.1/headers/comparison/equal.hpp.html deleted file mode 100644 index 15123ca..0000000 --- a/docs.1/headers/comparison/equal.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - comparison/equal.hpp - - - -
- The comparison/equal.hpp header defines macros that compare for equality. -
-

Usage

-
- #include <boost/preprocessor/comparison/equal.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/comparison/greater.hpp.html b/docs.1/headers/comparison/greater.hpp.html deleted file mode 100644 index f242edd..0000000 --- a/docs.1/headers/comparison/greater.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - comparison/greater.hpp - - - -
- The comparison/greater.hpp header defines macros that compare for greater magnitude. -
-

Usage

-
- #include <boost/preprocessor/comparison/greater.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/comparison/greater_equal.hpp.html b/docs.1/headers/comparison/greater_equal.hpp.html deleted file mode 100644 index e4e76d5..0000000 --- a/docs.1/headers/comparison/greater_equal.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - comparison/greater_equal.hpp - - - -
- The comparison/greater_equal.hpp header defines macros that compare for equality or greater magnitude. -
-

Usage

-
- #include <boost/preprocessor/comparison/greater_equal.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/comparison/less.hpp.html b/docs.1/headers/comparison/less.hpp.html deleted file mode 100644 index 20288c8..0000000 --- a/docs.1/headers/comparison/less.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - comparison/less.hpp - - - -
- The comparison/less.hpp header defines macros that compare for lesser magnitude. -
-

Usage

-
- #include <boost/preprocessor/comparison/less.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/comparison/less_equal.hpp.html b/docs.1/headers/comparison/less_equal.hpp.html deleted file mode 100644 index 7809706..0000000 --- a/docs.1/headers/comparison/less_equal.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - comparison/less_equal.hpp - - - -
- The comparison/less_equal.hpp header defines macros that compare for equality or lesser magnitude. -
-

Usage

-
- #include <boost/preprocessor/comparison/less_equal.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/comparison/not_equal.hpp.html b/docs.1/headers/comparison/not_equal.hpp.html deleted file mode 100644 index 2ddf2a6..0000000 --- a/docs.1/headers/comparison/not_equal.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - comparison/not_equal.hpp - - - -
- The comparison/not_equal.hpp header defines macros that compare for equality. -
-

Usage

-
- #include <boost/preprocessor/comparison/not_equal.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/config/limits.hpp.html b/docs.1/headers/config/limits.hpp.html deleted file mode 100644 index 314e2cf..0000000 --- a/docs.1/headers/config/limits.hpp.html +++ /dev/null @@ -1,29 +0,0 @@ - - - config/limits.hpp - - - -
- The config/limits.hpp header defines various library limits. -
-

Usage

-
- #include <boost/preprocessor/config/limits.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/control.hpp.html b/docs.1/headers/control.hpp.html deleted file mode 100644 index e2f941b..0000000 --- a/docs.1/headers/control.hpp.html +++ /dev/null @@ -1,23 +0,0 @@ - - - control.hpp - - - -
- The control.hpp includes the headers in the control folder. -
-

Usage

-
- #include <boost/preprocessor/control.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/control/expr_if.hpp.html b/docs.1/headers/control/expr_if.hpp.html deleted file mode 100644 index bbbc2d9..0000000 --- a/docs.1/headers/control/expr_if.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - control/expr_if.hpp - - - -
- The control/expr_if.hpp header defines a macro that expands to an expression selectively. -
-

Usage

-
- #include <boost/preprocessor/control/expr_if.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/control/expr_iif.hpp.html b/docs.1/headers/control/expr_iif.hpp.html deleted file mode 100644 index 7e47ec1..0000000 --- a/docs.1/headers/control/expr_iif.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - control/expr_iif.hpp - - - -
- The control/expr_iif.hpp header defines a macro that expands to an expression selectively. -
-

Usage

-
- #include <boost/preprocessor/control/expr_iif.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/control/if.hpp.html b/docs.1/headers/control/if.hpp.html deleted file mode 100644 index 9cb01da..0000000 --- a/docs.1/headers/control/if.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - control/if.hpp - - - -
- The control/if.hpp header defines a macro that chooses between two alternatives. -
-

Usage

-
- #include <boost/preprocessor/control/if.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/control/iif.hpp.html b/docs.1/headers/control/iif.hpp.html deleted file mode 100644 index 4bc26bb..0000000 --- a/docs.1/headers/control/iif.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - control/iif.hpp - - - -
- The control/iif.hpp header defines a macro that chooses between two alternatives. -
-

Usage

-
- #include <boost/preprocessor/control/iif.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/control/while.hpp.html b/docs.1/headers/control/while.hpp.html deleted file mode 100644 index d759749..0000000 --- a/docs.1/headers/control/while.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - control/while.hpp - - - -
- The control/while.hpp header defines a looping contruct. -
-

Usage

-
- #include <boost/preprocessor/control/while.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/debug.hpp.html b/docs.1/headers/debug.hpp.html deleted file mode 100644 index 3acc7b4..0000000 --- a/docs.1/headers/debug.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - debug.hpp - - - -
- The debug.hpp includes the headers in the debug folder. -
-

Usage

-
- #include <boost/preprocessor/debug.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/debug/assert.hpp.html b/docs.1/headers/debug/assert.hpp.html deleted file mode 100644 index b7d237b..0000000 --- a/docs.1/headers/debug/assert.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - debug/assert.hpp - - - -
- The debug/assert.hpp header defines macros for preprocessing-time assertions. -
-

Usage

-
- #include <boost/preprocessor/debug/assert.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/debug/line.hpp.html b/docs.1/headers/debug/line.hpp.html deleted file mode 100644 index eed9348..0000000 --- a/docs.1/headers/debug/line.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - debug/line.hpp - - - -
- The debug/line.hpp header defines macros for preprocessing-time assertions. -
-

Usage

-
- #include <boost/preprocessor/debug/line.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/facilities.hpp.html b/docs.1/headers/facilities.hpp.html deleted file mode 100644 index 0add972..0000000 --- a/docs.1/headers/facilities.hpp.html +++ /dev/null @@ -1,23 +0,0 @@ - - - facilities.hpp - - - -
- The facilities.hpp includes the headers in the facilities folder. -
-

Usage

-
- #include <boost/preprocessor/facilities.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/facilities/apply.hpp.html b/docs.1/headers/facilities/apply.hpp.html deleted file mode 100644 index f5bce67..0000000 --- a/docs.1/headers/facilities/apply.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - facilities/apply.hpp - - - -
- The facilities/apply.hpp header defines facilities that abstract the difference between an argument and nothing. -
-

Usage

-
- #include <boost/preprocessor/facilities/apply.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/facilities/empty.hpp.html b/docs.1/headers/facilities/empty.hpp.html deleted file mode 100644 index 047a855..0000000 --- a/docs.1/headers/facilities/empty.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - facilities/empty.hpp - - - -
- The facilities/empty.hpp header defines a nullary macro that expands to nothing. -
-

Usage

-
- #include <boost/preprocessor/facilities/empty.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/facilities/expand.hpp.html b/docs.1/headers/facilities/expand.hpp.html deleted file mode 100644 index 06c4ead..0000000 --- a/docs.1/headers/facilities/expand.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - facilities/expand.hpp - - - -
- The facilities/expand.hpp header defines a macro that causes double expansion. -
-

Usage

-
- #include <boost/preprocessor/facilities/expand.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/facilities/identity.hpp.html b/docs.1/headers/facilities/identity.hpp.html deleted file mode 100644 index b9b9002..0000000 --- a/docs.1/headers/facilities/identity.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - facilities/identity.hpp - - - -
- The facilities/identity.hpp header defines a utility macro to use with BOOST_PP_IF and BOOST_PP_IIF. -
-

Usage

-
- #include <boost/preprocessor/facilities/identity.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/facilities/intercept.hpp.html b/docs.1/headers/facilities/intercept.hpp.html deleted file mode 100644 index 97b66ab..0000000 --- a/docs.1/headers/facilities/intercept.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - facilities/intercept.hpp - - - -
- The facilities/intercept.hpp header defines a utility macro to intercept a numeric concatenation. -
-

Usage

-
- #include <boost/preprocessor/facilities/intercept.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/iteration.hpp.html b/docs.1/headers/iteration.hpp.html deleted file mode 100644 index 9f394e2..0000000 --- a/docs.1/headers/iteration.hpp.html +++ /dev/null @@ -1,21 +0,0 @@ - - - iteration.hpp - - - -
- The iteration.hpp includes the headers in the iteration folder. -
-

Usage

-
- #include <boost/preprocessor/iteration.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/iteration/iterate.hpp.html b/docs.1/headers/iteration/iterate.hpp.html deleted file mode 100644 index 0ad0695..0000000 --- a/docs.1/headers/iteration/iterate.hpp.html +++ /dev/null @@ -1,32 +0,0 @@ - - - iteration/iterate.hpp - - - -
- The iteration/iterate.hpp header defines a macros to interface with the file-iteration mechanism. -
-

Usage

-
- #include <boost/preprocessor/iteration/iterate.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/iteration/local.hpp.html b/docs.1/headers/iteration/local.hpp.html deleted file mode 100644 index c514048..0000000 --- a/docs.1/headers/iteration/local.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - iteration/local.hpp - - - -
- The iteration/local.hpp header defines a macro to interface with the local-iteration mechanism. -
-

Usage

-
- #include <boost/preprocessor/iteration/local.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/iteration/self.hpp.html b/docs.1/headers/iteration/self.hpp.html deleted file mode 100644 index a999a83..0000000 --- a/docs.1/headers/iteration/self.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - iteration/self.hpp - - - -
- The iteration/self.hpp header defines a macro to facilitate self-inclusion. -
-

Usage

-
- #include <boost/preprocessor/iteration/self.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/library.hpp.html b/docs.1/headers/library.hpp.html deleted file mode 100644 index 7b3e955..0000000 --- a/docs.1/headers/library.hpp.html +++ /dev/null @@ -1,15 +0,0 @@ - - - library.hpp - - - -
- The library.hpp includes the entire library. -
-

Usage

-
- #include <boost/preprocessor/library.hpp> -
- - diff --git a/docs.1/headers/list.hpp.html b/docs.1/headers/list.hpp.html deleted file mode 100644 index 0583bcf..0000000 --- a/docs.1/headers/list.hpp.html +++ /dev/null @@ -1,35 +0,0 @@ - - - list.hpp - - - -
- The list.hpp includes the headers in the list folder. -
-

Usage

-
- #include <boost/preprocessor/list.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/list/adt.hpp.html b/docs.1/headers/list/adt.hpp.html deleted file mode 100644 index a753534..0000000 --- a/docs.1/headers/list/adt.hpp.html +++ /dev/null @@ -1,24 +0,0 @@ - - - list/adt.hpp - - - -
- The list/adt.hpp header defines basic operations for manipulating lists. -
-

Usage

-
- #include <boost/preprocessor/list/adt.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/append.hpp.html b/docs.1/headers/list/append.hpp.html deleted file mode 100644 index a269fe7..0000000 --- a/docs.1/headers/list/append.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/append.hpp - - - -
- The list/append.hpp header defines macros for appending one list to another. -
-

Usage

-
- #include <boost/preprocessor/list/append.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/at.hpp.html b/docs.1/headers/list/at.hpp.html deleted file mode 100644 index 79f4d80..0000000 --- a/docs.1/headers/list/at.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/at.hpp - - - -
- The list/at.hpp header defines macros for extracting an element from a list. -
-

Usage

-
- #include <boost/preprocessor/list/at.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/cat.hpp.html b/docs.1/headers/list/cat.hpp.html deleted file mode 100644 index e0303e9..0000000 --- a/docs.1/headers/list/cat.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/cat.hpp - - - -
- The list/cat.hpp header defines macros for concatenating all elements in a list. -
-

Usage

-
- #include <boost/preprocessor/list/cat.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/enum.hpp.html b/docs.1/headers/list/enum.hpp.html deleted file mode 100644 index 4b856f1..0000000 --- a/docs.1/headers/list/enum.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/enum.hpp - - - -
- The list/enum.hpp header defines macros to convert a list to a comma-separated list. -
-

Usage

-
- #include <boost/preprocessor/list/enum.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/filter.hpp.html b/docs.1/headers/list/filter.hpp.html deleted file mode 100644 index 4a412e0..0000000 --- a/docs.1/headers/list/filter.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/filter.hpp - - - -
- The list/filter.hpp header defines macros to filter a list. -
-

Usage

-
- #include <boost/preprocessor/list/filter.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/first_n.hpp.html b/docs.1/headers/list/first_n.hpp.html deleted file mode 100644 index ffd53d8..0000000 --- a/docs.1/headers/list/first_n.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/first_n.hpp - - - -
- The list/first_n.hpp header defines macros for extracting a group of elements from the beginning of a list. -
-

Usage

-
- #include <boost/preprocessor/list/first_n.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/fold_left.hpp.html b/docs.1/headers/list/fold_left.hpp.html deleted file mode 100644 index 68ba314..0000000 --- a/docs.1/headers/list/fold_left.hpp.html +++ /dev/null @@ -1,23 +0,0 @@ - - - list/fold_left.hpp - - - -
- The list/fold_left.hpp header defines folding (or accumulating) a list left-to-right. -
-

Usage

-
- #include <boost/preprocessor/list/fold_left.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/fold_right.hpp.html b/docs.1/headers/list/fold_right.hpp.html deleted file mode 100644 index bf5334e..0000000 --- a/docs.1/headers/list/fold_right.hpp.html +++ /dev/null @@ -1,23 +0,0 @@ - - - list/fold_right.hpp - - - -
- The list/fold_right.hpp header defines folding (or accumulating) a list right-to-left. -
-

Usage

-
- #include <boost/preprocessor/list/fold_right.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/for_each.hpp.html b/docs.1/headers/list/for_each.hpp.html deleted file mode 100644 index b469ef1..0000000 --- a/docs.1/headers/list/for_each.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/for_each.hpp - - - -
- The list/for_each.hpp header defines macros to repeat a macro for each element in a list. -
-

Usage

-
- #include <boost/preprocessor/list/for_each.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/for_each_i.hpp.html b/docs.1/headers/list/for_each_i.hpp.html deleted file mode 100644 index 936c6e5..0000000 --- a/docs.1/headers/list/for_each_i.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/for_each_i.hpp - - - -
- The list/for_each_i.hpp header defines macros to repeat a macro for each element in a list. -
-

Usage

-
- #include <boost/preprocessor/list/for_each_i.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/for_each_product.hpp.html b/docs.1/headers/list/for_each_product.hpp.html deleted file mode 100644 index a6c5ee6..0000000 --- a/docs.1/headers/list/for_each_product.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/for_each_product.hpp - - - -
- The list/for_each_product.hpp header defines macros to repeat a macro for each cartesian product of several lists. -
-

Usage

-
- #include <boost/preprocessor/list/for_each_product.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/rest_n.hpp.html b/docs.1/headers/list/rest_n.hpp.html deleted file mode 100644 index 6580123..0000000 --- a/docs.1/headers/list/rest_n.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/rest_n.hpp - - - -
- The list/rest_n.hpp header defines macros for extracting a group of elements from the end of a list. -
-

Usage

-
- #include <boost/preprocessor/list/rest_n.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/reverse.hpp.html b/docs.1/headers/list/reverse.hpp.html deleted file mode 100644 index f66ea64..0000000 --- a/docs.1/headers/list/reverse.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/reverse.hpp - - - -
- The list/reverse.hpp header defines macros to reverse a list. -
-

Usage

-
- #include <boost/preprocessor/list/reverse.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/size.hpp.html b/docs.1/headers/list/size.hpp.html deleted file mode 100644 index 5b6a3cd..0000000 --- a/docs.1/headers/list/size.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/size.hpp - - - -
- The list/size.hpp header defines macros to calculate the size of a list. -
-

Usage

-
- #include <boost/preprocessor/list/size.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/to_tuple.hpp.html b/docs.1/headers/list/to_tuple.hpp.html deleted file mode 100644 index 3a3ba9a..0000000 --- a/docs.1/headers/list/to_tuple.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/to_tuple.hpp - - - -
- The list/to_tuple.hpp header defines macros to convert a list to a tuple. -
-

Usage

-
- #include <boost/preprocessor/list/to_tuple.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/list/transform.hpp.html b/docs.1/headers/list/transform.hpp.html deleted file mode 100644 index 17867f3..0000000 --- a/docs.1/headers/list/transform.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - list/transform.hpp - - - -
- The list/transform.hpp header defines macros to transform a list. -
-

Usage

-
- #include <boost/preprocessor/list/transform.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical.hpp.html b/docs.1/headers/logical.hpp.html deleted file mode 100644 index c347646..0000000 --- a/docs.1/headers/logical.hpp.html +++ /dev/null @@ -1,29 +0,0 @@ - - - logical.hpp - - - -
- The logical.hpp includes the headers in the logical folder. -
-

Usage

-
- #include <boost/preprocessor/logical.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/logical/and.hpp.html b/docs.1/headers/logical/and.hpp.html deleted file mode 100644 index 29a86c1..0000000 --- a/docs.1/headers/logical/and.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/and.hpp - - - -
- The logical/and.hpp header defines a macro that expands to the logical AND of its operands. -
-

Usage

-
- #include <boost/preprocessor/logical/and.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/bitand.hpp.html b/docs.1/headers/logical/bitand.hpp.html deleted file mode 100644 index 691533b..0000000 --- a/docs.1/headers/logical/bitand.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/bitand.hpp - - - -
- The logical/bitand.hpp header defines a macro that expands to the bitwise AND of its operands. -
-

Usage

-
- #include <boost/preprocessor/logical/bitand.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/bitnor.hpp.html b/docs.1/headers/logical/bitnor.hpp.html deleted file mode 100644 index c3312c4..0000000 --- a/docs.1/headers/logical/bitnor.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/bitnor.hpp - - - -
- The logical/bitnor.hpp header defines a macro that expands to the bitwise NOR of its operands. -
-

Usage

-
- #include <boost/preprocessor/logical/bitnor.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/bitor.hpp.html b/docs.1/headers/logical/bitor.hpp.html deleted file mode 100644 index 299f01a..0000000 --- a/docs.1/headers/logical/bitor.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/bitor.hpp - - - -
- The logical/bitor.hpp header defines a macro that expands to the bitwise OR of its operands. -
-

Usage

-
- #include <boost/preprocessor/logical/bitor.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/bitxor.hpp.html b/docs.1/headers/logical/bitxor.hpp.html deleted file mode 100644 index 862c0f3..0000000 --- a/docs.1/headers/logical/bitxor.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/bitxor.hpp - - - -
- The logical/bitxor.hpp header defines a macro that expands to the bitwise XOR of its operands. -
-

Usage

-
- #include <boost/preprocessor/logical/bitxor.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/bool.hpp.html b/docs.1/headers/logical/bool.hpp.html deleted file mode 100644 index 724d0c4..0000000 --- a/docs.1/headers/logical/bool.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/bool.hpp - - - -
- The logical/bool.hpp header defines a macro that performs a boolean conversion on its operand. -
-

Usage

-
- #include <boost/preprocessor/logical/bool.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/compl.hpp.html b/docs.1/headers/logical/compl.hpp.html deleted file mode 100644 index 519ada3..0000000 --- a/docs.1/headers/logical/compl.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/compl.hpp - - - -
- The logical/compl.hpp header defines a macro that performs a bitwise inversion on its operand. -
-

Usage

-
- #include <boost/preprocessor/logical/compl.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/nor.hpp.html b/docs.1/headers/logical/nor.hpp.html deleted file mode 100644 index 25dc873..0000000 --- a/docs.1/headers/logical/nor.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/nor.hpp - - - -
- The logical/nor.hpp header defines a macro that expands to the logical NOR of its operands. -
-

Usage

-
- #include <boost/preprocessor/logical/nor.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/not.hpp.html b/docs.1/headers/logical/not.hpp.html deleted file mode 100644 index 44c2f34..0000000 --- a/docs.1/headers/logical/not.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/not.hpp - - - -
- The logical/not.hpp header defines a macro that performs a logical NOT on its operand. -
-

Usage

-
- #include <boost/preprocessor/logical/not.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/or.hpp.html b/docs.1/headers/logical/or.hpp.html deleted file mode 100644 index 57e8787..0000000 --- a/docs.1/headers/logical/or.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/or.hpp - - - -
- The logical/or.hpp header defines a macro that expands to the logical OR of its operands. -
-

Usage

-
- #include <boost/preprocessor/logical/or.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/logical/xor.hpp.html b/docs.1/headers/logical/xor.hpp.html deleted file mode 100644 index e4dec9d..0000000 --- a/docs.1/headers/logical/xor.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - logical/xor.hpp - - - -
- The logical/xor.hpp header defines a macro that expands to the logical XOR of its operands. -
-

Usage

-
- #include <boost/preprocessor/logical/xor.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/preprocessor.hpp.html b/docs.1/headers/preprocessor.hpp.html deleted file mode 100644 index b63c449..0000000 --- a/docs.1/headers/preprocessor.hpp.html +++ /dev/null @@ -1,15 +0,0 @@ - - - preprocessor.hpp - - - -
- The preprocessor.hpp includes the entire library. -
-

Usage

-
- #include <boost/preprocessor.hpp> -
- - diff --git a/docs.1/headers/punctuation.hpp.html b/docs.1/headers/punctuation.hpp.html deleted file mode 100644 index b05d7e7..0000000 --- a/docs.1/headers/punctuation.hpp.html +++ /dev/null @@ -1,22 +0,0 @@ - - - punctuation.hpp - - - -
- The punctuation.hpp includes the headers in the punctuation folder. -
-

Usage

-
- #include <boost/preprocessor/punctuation.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/punctuation/comma.hpp.html b/docs.1/headers/punctuation/comma.hpp.html deleted file mode 100644 index dbb9621..0000000 --- a/docs.1/headers/punctuation/comma.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - punctuation/comma.hpp - - - -
- The punctuation/comma.hpp header defines a macro that expands to a comma. -
-

Usage

-
- #include <boost/preprocessor/punctuation/comma.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/punctuation/comma_if.hpp.html b/docs.1/headers/punctuation/comma_if.hpp.html deleted file mode 100644 index 2a48a8c..0000000 --- a/docs.1/headers/punctuation/comma_if.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - punctuation/comma_if.hpp - - - -
- The punctuation/comma_if.hpp header defines a macro that conditionally expands to a comma. -
-

Usage

-
- #include <boost/preprocessor/punctuation/comma_if.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/punctuation/paren.hpp.html b/docs.1/headers/punctuation/paren.hpp.html deleted file mode 100644 index afdc43e..0000000 --- a/docs.1/headers/punctuation/paren.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - punctuation/paren.hpp - - - -
- The punctuation/paren.hpp header defines macros that expand to left and right parentheses. -
-

Usage

-
- #include <boost/preprocessor/punctuation/paren.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/punctuation/paren_if.hpp.html b/docs.1/headers/punctuation/paren_if.hpp.html deleted file mode 100644 index a6d3f8b..0000000 --- a/docs.1/headers/punctuation/paren_if.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - punctuation/paren_if.hpp - - - -
- The punctuation/paren_if.hpp header defines macros that conditionally expand to left and right parentheses. -
-

Usage

-
- #include <boost/preprocessor/punctuation/paren_if.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition.hpp.html b/docs.1/headers/repetition.hpp.html deleted file mode 100644 index d4ddbcc..0000000 --- a/docs.1/headers/repetition.hpp.html +++ /dev/null @@ -1,28 +0,0 @@ - - - repetition.hpp - - - -
- The repetition.hpp includes the headers in the repetition folder. -
-

Usage

-
- #include <boost/preprocessor/repetition.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/repetition/enum.hpp.html b/docs.1/headers/repetition/enum.hpp.html deleted file mode 100644 index c2ea4e7..0000000 --- a/docs.1/headers/repetition/enum.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - repetition/enum.hpp - - - -
- The repetition/enum.hpp header defines a construct that produces a comma-separated list. -
-

Usage

-
- #include <boost/preprocessor/repetition/enum.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/enum_binary_params.hpp.html b/docs.1/headers/repetition/enum_binary_params.hpp.html deleted file mode 100644 index 756651a..0000000 --- a/docs.1/headers/repetition/enum_binary_params.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - repetition/enum_binary_params.hpp - - - -
- The repetition/enum_binary_params.hpp header defines a construct that produces a comma-separated list of binary parameters. -
-

Usage

-
- #include <boost/preprocessor/repetition/enum_binary_params.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/enum_params.hpp.html b/docs.1/headers/repetition/enum_params.hpp.html deleted file mode 100644 index fd8e1b9..0000000 --- a/docs.1/headers/repetition/enum_params.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - repetition/enum_params.hpp - - - -
- The repetition/enum_params.hpp header defines a construct that produces a comma-separated list of parameters. -
-

Usage

-
- #include <boost/preprocessor/repetition/enum_params.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/enum_params_with_a_default.hpp.html b/docs.1/headers/repetition/enum_params_with_a_default.hpp.html deleted file mode 100644 index ebf8410..0000000 --- a/docs.1/headers/repetition/enum_params_with_a_default.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - repetition/enum_params_with_a_default.hpp - - - -
- The repetition/enum_params_with_a_default.hpp header defines a construct that produces a comma-separated list of parameters with a default argument. -
-

Usage

-
- #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/enum_params_with_defaults.hpp.html b/docs.1/headers/repetition/enum_params_with_defaults.hpp.html deleted file mode 100644 index 07c741b..0000000 --- a/docs.1/headers/repetition/enum_params_with_defaults.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - repetition/enum_params_with_defaults.hpp - - - -
- The repetition/enum_params_with_defaults.hpp header defines a construct that produces a comma-separated list of parameters with default arguments. -
-

Usage

-
- #include <boost/preprocessor/repetition/enum_params_with_defaults.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/enum_shifted.hpp.html b/docs.1/headers/repetition/enum_shifted.hpp.html deleted file mode 100644 index 29de802..0000000 --- a/docs.1/headers/repetition/enum_shifted.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - repetition/enum_shifted.hpp - - - -
- The repetition/enum_shifted.hpp header defines a construct that produces a comma-separated, shifted list. -
-

Usage

-
- #include <boost/preprocessor/repetition/enum_shifted.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/enum_shifted_params.hpp.html b/docs.1/headers/repetition/enum_shifted_params.hpp.html deleted file mode 100644 index 25abbf6..0000000 --- a/docs.1/headers/repetition/enum_shifted_params.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - repetition/enum_shifted_params.hpp - - - -
- The repetition/enum_shifted_params.hpp header defines a construct that produces a comma-separated list of parameters. -
-

Usage

-
- #include <boost/preprocessor/repetition/enum_shifted_params.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/for.hpp.html b/docs.1/headers/repetition/for.hpp.html deleted file mode 100644 index 69e56fe..0000000 --- a/docs.1/headers/repetition/for.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - repetition/for.hpp - - - -
- The repetition/for.hpp header defines a generalized horizontal repetition construct. -
-

Usage

-
- #include <boost/preprocessor/repetition/for.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/repeat.hpp.html b/docs.1/headers/repetition/repeat.hpp.html deleted file mode 100644 index 7eb16ac..0000000 --- a/docs.1/headers/repetition/repeat.hpp.html +++ /dev/null @@ -1,23 +0,0 @@ - - - repetition/repeat.hpp - - - -
- The repetition/repeat.hpp header defines a fast horizontal repetition construct. -
-

Usage

-
- #include <boost/preprocessor/repetition/repeat.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/repetition/repeat_from_to.hpp.html b/docs.1/headers/repetition/repeat_from_to.hpp.html deleted file mode 100644 index 34e3462..0000000 --- a/docs.1/headers/repetition/repeat_from_to.hpp.html +++ /dev/null @@ -1,23 +0,0 @@ - - - repetition/repeat_from_to.hpp - - - -
- The repetition/repeat_from_to.hpp header defines a horizontal repetition construct. -
-

Usage

-
- #include <boost/preprocessor/repetition/repeat_from_to.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/selection.hpp.html b/docs.1/headers/selection.hpp.html deleted file mode 100644 index 6b61935..0000000 --- a/docs.1/headers/selection.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - selection.hpp - - - -
- The selection.hpp includes the headers in the selection folder. -
-

Usage

-
- #include <boost/preprocessor/selection.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/selection/max.hpp.html b/docs.1/headers/selection/max.hpp.html deleted file mode 100644 index e73fa7c..0000000 --- a/docs.1/headers/selection/max.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - selection/max.hpp - - - -
- The selection/max.hpp header defines a macro that returns the greater of two elements. -
-

Usage

-
- #include <boost/preprocessor/selection/max.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/selection/min.hpp.html b/docs.1/headers/selection/min.hpp.html deleted file mode 100644 index e4dcf53..0000000 --- a/docs.1/headers/selection/min.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - selection/min.hpp - - - -
- The selection/min.hpp header defines a macro that returns the lesser of two elements. -
-

Usage

-
- #include <boost/preprocessor/selection/min.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/slot.hpp.html b/docs.1/headers/slot.hpp.html deleted file mode 100644 index 4e13c7b..0000000 --- a/docs.1/headers/slot.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - slot.hpp - - - -
- The slot.hpp includes the headers in the slot folder. -
-

Usage

-
- #include <boost/preprocessor/slot.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/slot/slot.hpp.html b/docs.1/headers/slot/slot.hpp.html deleted file mode 100644 index 724732d..0000000 --- a/docs.1/headers/slot/slot.hpp.html +++ /dev/null @@ -1,20 +0,0 @@ - - - slot/slot.hpp - - - -
- The slot/slot.hpp header defines macros to manipulate slots. -
-

Usage

-
- #include <boost/preprocessor/slot/slot.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/stringize.hpp.html b/docs.1/headers/stringize.hpp.html deleted file mode 100644 index 2945d06..0000000 --- a/docs.1/headers/stringize.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - stringize.hpp - - - -
- The stringize.hpp header defines a stringizing macro. -
-

Usage

-
- #include <boost/preprocessor/stringize.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/tuple.hpp.html b/docs.1/headers/tuple.hpp.html deleted file mode 100644 index 2926b21..0000000 --- a/docs.1/headers/tuple.hpp.html +++ /dev/null @@ -1,23 +0,0 @@ - - - tuple.hpp - - - -
- The tuple.hpp includes the headers in the tuple folder. -
-

Usage

-
- #include <boost/preprocessor/tuple.hpp> -
-

Includes

- - - diff --git a/docs.1/headers/tuple/eat.hpp.html b/docs.1/headers/tuple/eat.hpp.html deleted file mode 100644 index e94cef7..0000000 --- a/docs.1/headers/tuple/eat.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - tuple/eat.hpp - - - -
- The tuple/eat.hpp header defines a macro eats a tuple. -
-

Usage

-
- #include <boost/preprocessor/tuple/eat.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/tuple/elem.hpp.html b/docs.1/headers/tuple/elem.hpp.html deleted file mode 100644 index b28f174..0000000 --- a/docs.1/headers/tuple/elem.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - tuple/elem.hpp - - - -
- The tuple/elem.hpp header defines a macro to extract elements from a tuple. -
-

Usage

-
- #include <boost/preprocessor/tuple/elem.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/tuple/rem.hpp.html b/docs.1/headers/tuple/rem.hpp.html deleted file mode 100644 index 996dd0f..0000000 --- a/docs.1/headers/tuple/rem.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - tuple/rem.hpp - - - -
- The tuple/rem.hpp header defines a macro that removes the parentheses from a tuple. -
-

Usage

-
- #include <boost/preprocessor/tuple/rem.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/tuple/reverse.hpp.html b/docs.1/headers/tuple/reverse.hpp.html deleted file mode 100644 index 6a533b0..0000000 --- a/docs.1/headers/tuple/reverse.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - tuple/reverse.hpp - - - -
- The tuple/reverse.hpp header defines a macro that reverses a tuple. -
-

Usage

-
- #include <boost/preprocessor/tuple/reverse.hpp> -
-

Contents

- - - diff --git a/docs.1/headers/tuple/to_list.hpp.html b/docs.1/headers/tuple/to_list.hpp.html deleted file mode 100644 index c5507c6..0000000 --- a/docs.1/headers/tuple/to_list.hpp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - tuple/to_list.hpp - - - -
- The tuple/to_list.hpp header defines a macro that converts a tuple to a list. -
-

Usage

-
- #include <boost/preprocessor/tuple/to_list.hpp> -
-

Contents

- - - diff --git a/docs.1/index.html b/docs.1/index.html deleted file mode 100644 index f44f37a..0000000 --- a/docs.1/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - Boost.Preprocessor - - - - - - - - .. - - diff --git a/docs.1/ref/add.html b/docs.1/ref/add.html deleted file mode 100644 index 0664a82..0000000 --- a/docs.1/ref/add.html +++ /dev/null @@ -1,58 +0,0 @@ - - - BOOST_PP_ADD - - - - -
- The BOOST_PP_ADD macro expands to the sum of its arguments. -
-

Usage

-
- BOOST_PP_ADD(x, y) -
-

Arguments

-
-
x
-
- The first addend of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The second addend of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If the sum of x and y is greater than BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_ADD_D in such a situation. -
-
- This macro is the most efficient when x is less than or equal to y.  - However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.  - In other words, x should be the addend that is most likely to be the largest of the two operands. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/add.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/add.hpp>
-
-BOOST_PP_ADD(4, 3) // expands to 7
-
- - diff --git a/docs.1/ref/add_d.html b/docs.1/ref/add_d.html deleted file mode 100644 index d6d35a5..0000000 --- a/docs.1/ref/add_d.html +++ /dev/null @@ -1,80 +0,0 @@ - - - BOOST_PP_ADD_D - - - - -
- The BOOST_PP_ADD_D macro expands to the sum of its second and third arguments.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_ADD_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The first addend of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The second addend of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If the sum of x and y is greater than BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. -
-
- This macro is the most efficient when x is less than or equal to y.  - However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.  - In other words, x should be the addend that is most likely to be the largest of the two operands. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/add.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/add.hpp>
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define PRED(d, data) BOOST_PP_TUPLE_ELEM(2, 0, data)
-
-#define OP(d, data) /* ............... */ \
-   (                                      \
-      BOOST_PP_DEC(                       \
-         BOOST_PP_TUPLE_ELEM(2, 0, data)  \
-      ),                                  \
-      BOOST_PP_ADD_D(                     \
-         d,                               \
-         BOOST_PP_TUPLE_ELEM(2, 1, data), \
-         2                                \
-      )                                   \
-   )                                      \
-   /**/
-
-// increment 'x' by 2 'n' times
-#define STRIDE(x, n) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_WHILE(PRED, OP, (n, x)))
-
-STRIDE(10, 2) // expands to 14
-STRIDE(51, 6) // expands to 63
-
- - diff --git a/docs.1/ref/and.html b/docs.1/ref/and.html deleted file mode 100644 index e46f496..0000000 --- a/docs.1/ref/and.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_AND - - - - -
- The BOOST_PP_AND macro expands to the logical AND of its operands. -
-

Usage

-
- BOOST_PP_AND(p, q) -
-

Arguments

-
-
p
-
- The left operand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
q
-
- The right operand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If both p and q are non-zero, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro performs a boolean conversion on each operand before performing the logical AND operation.  - If that conversion is not necessary, use BOOST_PP_BITAND instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/and.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/and.hpp>
-
-BOOST_PP_AND(4, 3) // expands to 1
-BOOST_PP_AND(5, 0) // expands to 0
-
- - diff --git a/docs.1/ref/apply.html b/docs.1/ref/apply.html deleted file mode 100644 index 68a9c94..0000000 --- a/docs.1/ref/apply.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_APPLY - - - - -
- The BOOST_PP_APPLY macro abstracts the difference between an argument and nothing. -
-

Usage

-
- BOOST_PP_APPLY(x) -
-

Arguments

-
-
x
-
- The abstracted argument.  - This argument must be either BOOST_PP_NIL or a tuple with one element--such as (arg) or ((a, b)). -
-
-

Remarks

-
- If x is BOOST_PP_NIL, this macro expands to nothing.  - If x is a one element tuple, it expands to the contents of that tuple. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/facilities/apply.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/facilities/apply.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define CV(i) /* .......................................... */ \
-   BOOST_PP_APPLY(                                             \
-      BOOST_PP_TUPLE_ELEM(                                     \
-         4, i,                                                 \
-         (BOOST_PP_NIL, (const), (volatile), (const volatile)) \
-      )                                                        \
-   )                                                           \
-   /**/
-
-CV(0) // expands to nothing
-CV(1) // expands to const
-
- - diff --git a/docs.1/ref/array_data.html b/docs.1/ref/array_data.html deleted file mode 100644 index 3870ceb..0000000 --- a/docs.1/ref/array_data.html +++ /dev/null @@ -1,39 +0,0 @@ - - - BOOST_PP_ARRAY_DATA - - - - -
- The BOOST_PP_ARRAY_DATA macro extracts the tuple data from an array. -
-

Usage

-
- BOOST_PP_ARRAY_DATA(array) -
-

Arguments

-
-
array
-
- An array to be converted to a tuple. -
-
-

Remarks

-
- This macro expands to the data portion of an array which is a tuple. -
-

Requirements

-
- Header:  <boost/preprocessor/array/data.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/array/data.hpp>
-
-#define ARRAY (3, (x, y, z))
-
-BOOST_PP_ARRAY_DATA(ARRAY) // expands to (x, y, z)
-
- - diff --git a/docs.1/ref/array_elem.html b/docs.1/ref/array_elem.html deleted file mode 100644 index d1e54a4..0000000 --- a/docs.1/ref/array_elem.html +++ /dev/null @@ -1,41 +0,0 @@ - - - BOOST_PP_ARRAY_ELEM - - - - -
- The BOOST_PP_ARRAY_ELEM macro extracts an element from a array. -
-

Usage

-
- BOOST_PP_ARRAY_ELEM(i, array) -
-

Arguments

-
-
i
-
- The zero-based index into the array of the element to be extracted.  -
-
array
-
- The array from which an element is to be extracted.  - This array must contain at least i + 1 elements. -
-
-

Requirements

-
- Header:  <boost/preprocessor/array/elem.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/array/elem.hpp>
-
-#define ARRAY (4, (a, b, c, d))
-
-BOOST_PP_ARRAY_ELEM(0, ARRAY) // expands to a
-BOOST_PP_ARRAY_ELEM(3, ARRAY) // expands to d
-
- - diff --git a/docs.1/ref/array_size.html b/docs.1/ref/array_size.html deleted file mode 100644 index 03c5db7..0000000 --- a/docs.1/ref/array_size.html +++ /dev/null @@ -1,35 +0,0 @@ - - - BOOST_PP_ARRAY_SIZE - - - - -
- The BOOST_PP_ARRAY_SIZE macro expands to the size of the array passed to it. -
-

Usage

-
- BOOST_PP_ARRAY_SIZE(array) -
-

Arguments

-
-
array
-
- An array whose size is to be extracted. -
-
-

Requirements

-
- Header:  <boost/preprocessor/array/size.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/array/size.hpp>
-
-#define ARRAY (3, (x, y, z))
-
-BOOST_PP_ARRAY_SIZE(ARRAY) // expands to 3
-
- - diff --git a/docs.1/ref/assert.html b/docs.1/ref/assert.html deleted file mode 100644 index 9c8ebe4..0000000 --- a/docs.1/ref/assert.html +++ /dev/null @@ -1,96 +0,0 @@ - - - BOOST_PP_ASSERT - - - - -
- The BOOST_PP_ASSERT macro conditionally causes a preprocessing error. -
-

Usage

-
- BOOST_PP_ASSERT(cond) -
-

Arguments

-
-
cond
-
- A condition that determines whether an assertion occurs.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If cond expands to 0, this macro causes a preprocessing error.  - Otherwise, it expands to nothing. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/debug/assert.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/debug/assert.hpp>
-#include <boost/preprocessor/detail/is_nullary.hpp>
-#include <boost/preprocessor/logical/bitnor.hpp>
-#include <boost/preprocessor/logical/compl.hpp>
-
-#define IS_EDISON_DESIGN_GROUP() /* ..... */ \
-   BOOST_PP_COMPL(                           \
-      BOOST_PP_IS_NULLARY(                   \
-         BOOST_PP_CAT(IS_EDG_CHECK, __EDG__) \
-      )                                      \
-   )                                         \
-   /**/
-#define IS_EDG_CHECK__EDG__ ()
-
-#define IS_METROWERKS() /* .................... */ \
-   BOOST_PP_COMPL(                                 \
-      BOOST_PP_IS_NULLARY(                         \
-         BOOST_PP_CAT(IS_MWERKS_CHECK, __MWERKS__) \
-      )                                            \
-   )                                               \
-   /**/
-#define IS_MWERKS_CHECK__MWERKS__ ()
-
-#define IS_MICROSOFT() /* ... */ \
-   BOOST_PP_BITNOR(              \
-      IS_MICROSOFT_ROOT(),       \
-      IS_EDISON_DESIGN_GROUP()   \
-   )                             \
-   /**/
-#define IS_MICROSOFT_ROOT() /* ......... */ \
-   BOOST_PP_IS_NULLARY(                     \
-      BOOST_PP_CAT(IS_MSVC_CHECK, _MSC_VER) \
-   )                                        \
-   /**/
-#define IS_MSVC_CHECK_MS_VER ()
-
-// this macro doesn't work on EDG...
-// (this is just an example)
-
-#define MACRO(n) /* ....... */ \
-   BOOST_PP_CAT(               \
-      MACRO_,                  \
-      IS_EDISON_DESIGN_GROUP() \
-   )(n)                        \
-   /**/
-
-#define MACRO_1(n) /* ................ */ \
-   BOOST_PP_ASSERT(0)                     \
-   "Edison Design Group is not supported" \
-   /**/
-
-#define MACRO_0(n) normal mode: n
-
-MACRO(10)
-
- - diff --git a/docs.1/ref/assert_msg.html b/docs.1/ref/assert_msg.html deleted file mode 100644 index 30953a1..0000000 --- a/docs.1/ref/assert_msg.html +++ /dev/null @@ -1,56 +0,0 @@ - - - BOOST_PP_ASSERT_MSG - - - - -
- The BOOST_PP_ASSERT_MSG macro conditionally inserts debugging text. -
-

Usage

-
- BOOST_PP_ASSERT_MSG(cond, msg) -
-

Arguments

-
-
cond
-
- A condition that determines whether an assertion occurs.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
msg
-
- A message to display if cond evaluates to 0. -
-
-

Remarks

-
- If cond expands to 0, this macro expands to msg.  - Otherwise, it expands to nothing. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/debug/assert.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/equal.hpp>
-#include <boost/preprocessor/debug/assert.hpp>
-
-// lines are supposed to be counted
-// in translation phase 1
-
-#line 9
-BOOST_PP_ASSERT_MSG( /* ....... */ \
-   BOOST_PP_EQUAL(__LINE__, 9),    \
-   "weird line numbering detected" \
-)
-
- - diff --git a/docs.1/ref/assign_slot.html b/docs.1/ref/assign_slot.html deleted file mode 100644 index 0a05d64..0000000 --- a/docs.1/ref/assign_slot.html +++ /dev/null @@ -1,51 +0,0 @@ - - - BOOST_PP_ASSIGN_SLOT - - - - -
- The BOOST_PP_ASSIGN_SLOT macro fully evaluates a numeric macro or expression. -
-

Usage

-
- #include BOOST_PP_ASSIGN_SLOT(i) -
-

Arguments

-
-
i
-
- The slot index that is to be assigned.  - This value must be in the range of 1 to BOOST_PP_LIMIT_SLOT_COUNT. -
-
-

Remarks

-
- Prior to use, the named external argument BOOST_PP_VALUE must be defined.  - Also, it must expand to a numeric value that is in the range of 0 to 2^32 - 1. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/slot/slot.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/slot/slot.hpp>
-
-#define X() 4
-
-#define BOOST_PP_VALUE 1 + 2 + 3 + X()
-#include BOOST_PP_ASSIGN_SLOT(1)
-
-#undef X
-
-BOOST_PP_SLOT(1) // expands to 10
-
- - diff --git a/docs.1/ref/bitand.html b/docs.1/ref/bitand.html deleted file mode 100644 index e442e2f..0000000 --- a/docs.1/ref/bitand.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_BITAND - - - - -
- The BOOST_PP_BITAND macro expands to the bitwise AND of its operands. -
-

Usage

-
- BOOST_PP_BITAND(x, y) -
-

Arguments

-
-
x
-
- The left operand of the operation.  - This value must expand to 0 or 1. -
-
y
-
- The right operand of the operation.  - This value must expand to 0 or 1. -
-
-

Remarks

-
- If both x and y are 1, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro does not perform a boolean conversion on either operand before performing the bitwise AND operation.  - If that conversion is necessary, use BOOST_PP_AND instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/bitand.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/bitand.hpp>
-
-BOOST_PP_BITAND(0, 0) // expands to 0
-BOOST_PP_BITAND(0, 1) // expands to 0
-BOOST_PP_BITAND(1, 0) // expands to 0
-BOOST_PP_BITAND(1, 1) // expands to 1
-
- - diff --git a/docs.1/ref/bitnor.html b/docs.1/ref/bitnor.html deleted file mode 100644 index 7ec2f41..0000000 --- a/docs.1/ref/bitnor.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_BITNOR - - - - -
- The BOOST_PP_BITNOR macro expands to the bitwise NOR of its operands. -
-

Usage

-
- BOOST_PP_BITNOR(x, y) -
-

Arguments

-
-
x
-
- The left operand of the operation.  - This value must expand to 0 or 1. -
-
y
-
- The right operand of the operation.  - This value must expand to 0 or 1. -
-
-

Remarks

-
- If neither x nor y is 1, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro does not perform a boolean conversion on either operand before performing the bitwise NOR operation.  - If that conversion is necessary, use BOOST_PP_NOR instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/bitnor.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/bitnor.hpp>
-
-BOOST_PP_BITNOR(0, 0) // expands to 1
-BOOST_PP_BITNOR(0, 1) // expands to 0
-BOOST_PP_BITNOR(1, 0) // expands to 0
-BOOST_PP_BITNOR(1, 1) // expands to 0
-
- - diff --git a/docs.1/ref/bitor.html b/docs.1/ref/bitor.html deleted file mode 100644 index 954cb7b..0000000 --- a/docs.1/ref/bitor.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_BITOR - - - - -
- The BOOST_PP_BITOR macro expands to the bitwise OR of its operands. -
-

Usage

-
- BOOST_PP_BITOR(x, y) -
-

Arguments

-
-
x
-
- The left operand of the operation.  - This value must expand to 0 or 1. -
-
y
-
- The right operand of the operation.  - This value must expand to 0 or 1. -
-
-

Remarks

-
- If either x or y is 1, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro does not perform a boolean conversion on either operand before performing the bitwise OR operation.  - If that conversion is necessary, use BOOST_PP_OR instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/bitor.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/bitor.hpp>
-
-BOOST_PP_BITOR(0, 0) // expands to 0
-BOOST_PP_BITOR(0, 1) // expands to 1
-BOOST_PP_BITOR(1, 0) // expands to 1
-BOOST_PP_BITOR(1, 1) // expands to 1
-
- - diff --git a/docs.1/ref/bitxor.html b/docs.1/ref/bitxor.html deleted file mode 100644 index cb0f512..0000000 --- a/docs.1/ref/bitxor.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_BITXOR - - - - -
- The BOOST_PP_BITXOR macro expands to the bitwise XOR of its operands. -
-

Usage

-
- BOOST_PP_BITXOR(x, y) -
-

Arguments

-
-
x
-
- The left operand of the operation.  - This value must expand to 0 or 1. -
-
y
-
- The right operand of the operation.  - This value must expand to 0 or 1. -
-
-

Remarks

-
- If either x or y is 1 exclusively, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro does not perform a boolean conversion on either operand before performing the bitwise OR operation.  - If that conversion is necessary, use BOOST_PP_XOR instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/bitxor.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/bitxor.hpp>
-
-BOOST_PP_BITXOR(0, 0) // expands to 0
-BOOST_PP_BITXOR(0, 1) // expands to 1
-BOOST_PP_BITXOR(1, 0) // expands to 1
-BOOST_PP_BITXOR(1, 1) // expands to 0
-
- - diff --git a/docs.1/ref/bool.html b/docs.1/ref/bool.html deleted file mode 100644 index 859767a..0000000 --- a/docs.1/ref/bool.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_BOOL - - - - -
- The BOOST_PP_BOOL macro performs a boolean conversion on its operand. -
-

Usage

-
- BOOST_PP_BOOL(x) -
-

Arguments

-
-
x
-
- The value to be converted.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG*. -
-
-

Remarks

-
- If x is 0, this macro expands to 0.  - Otherwise it expands to 1. -
-
- *If BOOST_PP_CONFIG_FLAGS does not include BOOST_PP_CONFIG_EDG, this macro can convert an infinite range--e.g. BOOST_PP_BOOL(123456789).  - However, it is not safe to rely on this behavior unless it is known that EDG-based compilers will never be used. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/bool.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/bool.hpp>
-
-BOOST_PP_BOOL(6) // expands to 1
-BOOST_PP_BOOL(0) // expands to 0
-
-#if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG
-
-BOOST_PP_BOOL(123456789) // expands to 1
-
-#endif
-
- - diff --git a/docs.1/ref/cat.html b/docs.1/ref/cat.html deleted file mode 100644 index 172d46c..0000000 --- a/docs.1/ref/cat.html +++ /dev/null @@ -1,47 +0,0 @@ - - - BOOST_PP_CAT - - - - -
- The BOOST_PP_CAT macro concatenates its arguments after they have been expanded. -
-

Usage

-
- BOOST_PP_CAT(a, b) -
-

Arguments

-
-
a
-
- The left operand of the concatenation. -
-
b
-
- The right operand of the concatenation. -
-
-

Remarks

-
- The preprocessor token-pasting operator (##) prevents arguments from expanding.  - This macro allows its arguments to expand before concatenation. -
-
- Concatenation must not result in an invocation of a macro that uses BOOST_PP_CAT.  - If that happens, BOOST_PP_CAT will not expand the second time. -
- -

Requirements

-
- Header:  <boost/preprocessor/cat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-
-BOOST_PP_CAT(x, BOOST_PP_CAT(y, z)) // expands to xyz
-
- - diff --git a/docs.1/ref/comma.html b/docs.1/ref/comma.html deleted file mode 100644 index e8b723a..0000000 --- a/docs.1/ref/comma.html +++ /dev/null @@ -1,33 +0,0 @@ - - - BOOST_PP_COMMA - - - - -
- The BOOST_PP_COMMA macro expands to a comma. -
-

Usage

-
- BOOST_PP_COMMA() -
-

Remarks

-
- The preprocessor interprets commas as argument separators in macro invocations.  - Because of this, commas require special handling. -
-

Requirements

-
- Header:  <boost/preprocessor/punctuation/comma.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/punctuation/comma.hpp>
-
-BOOST_PP_IF(1, BOOST_PP_COMMA, BOOST_PP_EMPTY)() // expands to ,
-
- - diff --git a/docs.1/ref/comma_if.html b/docs.1/ref/comma_if.html deleted file mode 100644 index 8660989..0000000 --- a/docs.1/ref/comma_if.html +++ /dev/null @@ -1,50 +0,0 @@ - - - BOOST_PP_COMMA_IF - - - - -
- The BOOST_PP_COMMA_IF macro conditionally expands to a comma. -
-

Usage

-
- BOOST_PP_COMMA_IF(cond) -
-

Arguments

-
-
cond
-
- The condition that determines if a the macro expands to a comma or nothing.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If cond expands to 0, this macro expands to nothing.  - Otherwise, it expands to a comma. -
-
- The preprocessor interprets commas as argument separators in macro invocations.  - Because of this, commas require special handling. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/punctuation/comma_if.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-#define MACRO(z, n, text) BOOST_PP_COMMA_IF(n) text
-
-BOOST_PP_REPEAT(3, MACRO, class) // expands to class, class, class
-
- - diff --git a/docs.1/ref/compl.html b/docs.1/ref/compl.html deleted file mode 100644 index 50973b0..0000000 --- a/docs.1/ref/compl.html +++ /dev/null @@ -1,48 +0,0 @@ - - - BOOST_PP_COMPL - - - - -
- The BOOST_PP_COMPL macro performs a bitwise inversion (bitwise NOT or one's complement) on its operand. -
-

Usage

-
- BOOST_PP_COMPL(x) -
-

Arguments

-
-
x
-
- The value to be converted.  - This value must expand to 0 or 1. -
-
-

Remarks

-
- If x is 0, this macro expands to 1.  - If x is 1, this it expands to 0. -
-
- This macro does not perform a boolean conversion on its operand before performing the inversion OR operation.  - If that conversion is necessary, use BOOST_PP_NOT instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/compl.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/compl.hpp>
-
-BOOST_PP_COMPL(1) // expands to 0
-BOOST_PP_COMPL(0) // expands to 1
-
- - diff --git a/docs.1/ref/config_errors.html b/docs.1/ref/config_errors.html deleted file mode 100644 index da1f2f7..0000000 --- a/docs.1/ref/config_errors.html +++ /dev/null @@ -1,29 +0,0 @@ - - - BOOST_PP_CONFIG_ERRORS - - - - -
- The BOOST_PP_CONFIG_ERRORS is a user-defined macro that determines whether library overflows and certain other errors are expanded to error messages. -
-

Usage

-
- #define BOOST_PP_CONFIG_ERRORS n -
-

Arguments

-
-
n
-
- The value that determines if error codes are expanded.  - This value must be 0 or 1. -
-
-

Remarks

-
- By default, if NDEBUG is not defined, this macro is set to 1.  - Otherwise, it is set to 0. -
- - diff --git a/docs.1/ref/config_extended_line_info.html b/docs.1/ref/config_extended_line_info.html deleted file mode 100644 index 1d07a60..0000000 --- a/docs.1/ref/config_extended_line_info.html +++ /dev/null @@ -1,33 +0,0 @@ - - - BOOST_PP_CONFIG_EXTENDED_LINE_INFO - - - - -
- The BOOST_PP_CONFIG_EXTENDED_LINE_INFO is a user-defined macro that determines whether BOOST_PP_LINE outputs extended file-iteration state information. -
-

Usage

-
- #define BOOST_PP_CONFIG_EXTENDED_LINE_INFO n -
-

Arguments

-
-
n
-
- The value that determines if BOOST_PP_LINE outputs extended file-iteration information.  - This value must be 0 or 1. -
-
-

Remarks

-
- If n is 1, BOOST_PP_LINE will output extended data.  - By default, this macro is set to 0. -
-

See Also

- - - diff --git a/docs.1/ref/config_unrolled.html b/docs.1/ref/config_unrolled.html deleted file mode 100644 index 85057b5..0000000 --- a/docs.1/ref/config_unrolled.html +++ /dev/null @@ -1,29 +0,0 @@ - - - BOOST_PP_CONFIG_UNROLLED - - - - -
- The BOOST_PP_CONFIG_UNROLLED is a user-defined macro that determines whether BOOST_PP_REPEAT is unrolled. -
-

Usage

-
- #define BOOST_PP_CONFIG_UNROLLED n -
-

Arguments

-
-
n
-
- The value that determines if BOOST_PP_REPEAT is unrolled. - This value must be 0 or 1. -
-
-

Remarks

-
- If n is 1, BOOST_PP_REPEAT will be unrolled.  - By default, this macro is set to 0. -
- - diff --git a/docs.1/ref/dec.html b/docs.1/ref/dec.html deleted file mode 100644 index aa794aa..0000000 --- a/docs.1/ref/dec.html +++ /dev/null @@ -1,44 +0,0 @@ - - - BOOST_PP_DEC - - - - -
- The BOOST_PP_DEC macro expands to one less than its argument. -
-

Usage

-
- BOOST_PP_DEC(x) -
-

Arguments

-
-
x
-
- The value to be decremented.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is 0, the result is saturated to 0. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/dec.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/dec.hpp>
-
-BOOST_PP_DEC(BOOST_PP_DEC(6)) // expands to 4
-BOOST_PP_DEC(0) // expands to 0
-
- - diff --git a/docs.1/ref/div.html b/docs.1/ref/div.html deleted file mode 100644 index 1491337..0000000 --- a/docs.1/ref/div.html +++ /dev/null @@ -1,53 +0,0 @@ - - - BOOST_PP_DIV - - - - -
- The BOOST_PP_DIV macro expands to the quotient of its arguments. -
-

Usage

-
- BOOST_PP_DIV(x, y) -
-

Arguments

-
-
x
-
- The dividend (numerator) of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The divisor (denominator) of the operation.  - Valid values range from 1 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_DIV_D in such a situation. -
-
- If y is 0, the result is undefined. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/div.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/div.hpp>
-
-BOOST_PP_DIV(11, 5) // expands to 2
-
- - diff --git a/docs.1/ref/div_d.html b/docs.1/ref/div_d.html deleted file mode 100644 index bcb4afa..0000000 --- a/docs.1/ref/div_d.html +++ /dev/null @@ -1,75 +0,0 @@ - - - BOOST_PP_DIV_D - - - - -
- The BOOST_PP_DIV_D macro expands to the quotient of its second and third arguments.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_DIV_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The dividend (numerator) of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The divisor (denominator) of the operation.  - Valid values range from 1 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If y is 0, the result is undefined. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/div.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/arithmetic/div.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define PRED(d, data) BOOST_PP_TUPLE_ELEM(2, 0, data)
-
-#define OP(d, data) /* ............... */ \
-   (                                      \
-      BOOST_PP_DEC(                       \
-         BOOST_PP_TUPLE_ELEM(2, 0, data)  \
-      ),                                  \
-      BOOST_PP_DIV_D(                     \
-         d,                               \
-         BOOST_PP_TUPLE_ELEM(2, 1, data), \
-         2                                \
-      )                                   \
-   )                                      \
-   /**/
-
-// halve 'x' 'n' times
-#define HALVE(x, n) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_WHILE(PRED, OP, (n, x)))
-
-HALVE(8, 2) // expands to 2
-HALVE(16, 1) // expands to 8
-
- - diff --git a/docs.1/ref/empty.html b/docs.1/ref/empty.html deleted file mode 100644 index 1b70063..0000000 --- a/docs.1/ref/empty.html +++ /dev/null @@ -1,36 +0,0 @@ - - - BOOST_PP_EMPTY - - - - -
- The BOOST_PP_EMPTY macro is a nullary utility macro that expands to nothing. -
-

Usage

-
- BOOST_PP_EMPTY() -
-

Remarks

-
- This macro is helps avoid inefficient macro-expansion.  - It is primarily useful as arguments to BOOST_PP_IF or BOOST_PP_IIF. -
-

Requirements

-
- Header:  <boost/preprocessor/facilities/empty.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
-
-#define X() result
-#define MACRO(c) BOOST_PP_IF(c, X, BOOST_PP_EMPTY)()
-
-MACRO(0) // expands to nothing
-MACRO(1) // expands to result
-
- - diff --git a/docs.1/ref/enum.html b/docs.1/ref/enum.html deleted file mode 100644 index dcca46d..0000000 --- a/docs.1/ref/enum.html +++ /dev/null @@ -1,70 +0,0 @@ - - - BOOST_PP_ENUM - - - - -
- The BOOST_PP_ENUM macro generates a comma-separated list. -
-

Usage

-
- BOOST_PP_ENUM(count, macro, data) -
-

Arguments

-
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_ENUM with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- macro(z, 0, data), macro(z, 1, data), ... macro(z, count - 1, data) -
-
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_ENUM_z. -
-
- Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  - This limitation no longer exists, as the library can automatically detect the next available repetition depth. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/enum.hpp>
-
-#define TEXT(z, n, text) text
-
-BOOST_PP_ENUM(4, TEXT, class) // expands to class, class, class, class
-
- - diff --git a/docs.1/ref/enum_binary_params.html b/docs.1/ref/enum_binary_params.html deleted file mode 100644 index f9b1207..0000000 --- a/docs.1/ref/enum_binary_params.html +++ /dev/null @@ -1,66 +0,0 @@ - - - BOOST_PP_ENUM_BINARY_PARAMS - - - - -
- The BOOST_PP_ENUM_BINARY_PARAMS macro generates a comma-separated list of binary parameters. -
-

Usage

-
- BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) -
-

Arguments

-
-
count
-
- The number of parameters to generate.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
p1
-
- The text of the first part of the parameter.  - BOOST_PP_ENUM_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 - to generate parameters. -
-
p2
-
- The text of the first part of the parameter.  - BOOST_PP_ENUM_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 - to generate parameters. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- p1 ## 0 p2 ## 0, p1 ## 1 p2 ## 1, ... p1 ## count - 1 p2 ## count - 1 -
-
-
- To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_BINARY_PARAMS_Z. -
-
- This macro is a replacement for both BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT and BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_binary_params.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-
-BOOST_PP_ENUM_BINARY_PARAMS(3, T, p) // expands to T0 p0, T1 p1, T2 p2
-
- - diff --git a/docs.1/ref/enum_binary_params_z.html b/docs.1/ref/enum_binary_params_z.html deleted file mode 100644 index bf3cc66..0000000 --- a/docs.1/ref/enum_binary_params_z.html +++ /dev/null @@ -1,83 +0,0 @@ - - - BOOST_PP_ENUM_BINARY_PARAMS_Z - - - - -
- The BOOST_PP_ENUM_BINARY_PARAMS_Z macro generates a comma-separated list of binary parameters.  - It reenters BOOST_PP_REPEAT with maximum efficiency. -
-

Usage

-
- BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) -
-

Arguments

-
-
z
-
- The next available BOOST_PP_REPEAT dimension. -
-
count
-
- The number of parameters to generate.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
p1
-
- The text of the first part of the parameter.  - BOOST_PP_ENUM_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 - to generate parameters. -
-
p2
-
- The text of the first part of the parameter.  - BOOST_PP_ENUM_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 - to generate parameters. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- p1 ## 0 p2 ## 0, p1 ## 1 p2 ## 1, ... p1 ## count - 1 p2 ## count - 1 -
-
-
- This macro is a replacement for both BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT and BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_binary_params.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-
-#define FUNCTION(z, n, _) \
-   template<BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(n), class T)> \
-   void f(BOOST_PP_ENUM_BINARY_PARAMS_Z(z, BOOST_PP_INC(n), T, p)) { \
-      /* ... */ \
-   } \
-   /**/
-
-BOOST_PP_REPEAT(2, FUNCTION, nil)
-/*
-   expands to...
-
-   template<class T0> void f(T0 p0) { }
-   template<class T0, class T1> void f(T0 p0, T1 p1) { }
-*/
-
- - diff --git a/docs.1/ref/enum_params.html b/docs.1/ref/enum_params.html deleted file mode 100644 index 87faff7..0000000 --- a/docs.1/ref/enum_params.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_ENUM_PARAMS - - - - -
- The BOOST_PP_ENUM_PARAMS macro generates a comma-separated list of parameters. -
-

Usage

-
- BOOST_PP_ENUM_PARAMS(count, param) -
-

Arguments

-
-
count
-
- The number of parameters to generate.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
param
-
- The text of the parameter.  - BOOST_PP_ENUM_PARAMS concatenates numbers ranging from 0 to count - 1 - to generate parameters. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- param ## 0, param ## 1, ... param ## count - 1 -
-
-
- To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_PARAMS_Z. -
-
- Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  - This limitation no longer exists, as the library can automatically detect the next available repetition depth. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_params.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/enum_params.hpp>
-
-BOOST_PP_ENUM_PARAMS(3, class T) // expands to class T0, class T1, class T2
-
- - diff --git a/docs.1/ref/enum_params_with_a_default.html b/docs.1/ref/enum_params_with_a_default.html deleted file mode 100644 index 5050cde..0000000 --- a/docs.1/ref/enum_params_with_a_default.html +++ /dev/null @@ -1,73 +0,0 @@ - - - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT - - - - -
- The BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT macro generates a comma-separated list of parameters with a default argument. -
-

Usage

-
- BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(count, param, def) -
-

Arguments

-
-
count
-
- The number of parameters to generate.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
param
-
- The text of the parameter.  - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT concatenates numbers ranging from 0 to count - 1 - to generate parameters. -
-
def
-
- The default value that trails each parameter. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- param ## 0 = def, param ## 1 = def, ... param ## count - 1 = def -
-
-
- Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  - This limitation no longer exists, as the library can automatically detect the next available repetition depth. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_ENUM_BINARY_PARAMS with BOOST_PP_INTERCEPT instead: -
- BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def BOOST_PP_INTERCEPT) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-
-BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(3, class T, int)
-   // expands to T0 = int, T1 = int, T2 = int
-
-BOOST_PP_ENUM_BINARY_PARAMS(3, class T, = int BOOST_PP_INTERCEPT)
-   // expands to T0 = int, T1 = int, T2 = int
-
- - diff --git a/docs.1/ref/enum_params_with_defaults.html b/docs.1/ref/enum_params_with_defaults.html deleted file mode 100644 index 886a0e3..0000000 --- a/docs.1/ref/enum_params_with_defaults.html +++ /dev/null @@ -1,74 +0,0 @@ - - - BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS - - - - -
- The BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS macro generates a comma-separated list of parameters with default arguments. -
-

Usage

-
- BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(count, param, def) -
-

Arguments

-
-
count
-
- The number of parameters to generate.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
param
-
- The text of the parameter.  - BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS concatenates numbers ranging from 0 to count - 1 - to generate parameters. -
-
def
-
- The default value that trails each parameter. - BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS concatenates numbers ranging from 0 to count - 1 - to generate default arguments. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- param ## 0 = def ## 0, param ## 1 = def ## 1, ... param ## count - 1 = def ## count - 1 -
-
-
- Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  - This limitation no longer exists, as the library can automatically detect the next available repetition depth. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_ENUM_BINARY_PARAMS instead: -
- BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_params_with_defaults.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/enum_params_with_defaults.hpp>
-
-BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(3, class T, U)
-   // expands to T0 = U0, T1 = U1, T2 = U2
-
-BOOST_PP_ENUM_BINARY_PARAMS(3, class T, = U)
-   // expands to T0 = U0, T1 = U1, T2 = U2
-
- - diff --git a/docs.1/ref/enum_params_z.html b/docs.1/ref/enum_params_z.html deleted file mode 100644 index dc18b33..0000000 --- a/docs.1/ref/enum_params_z.html +++ /dev/null @@ -1,72 +0,0 @@ - - - BOOST_PP_ENUM_PARAMS_Z - - - - -
- The BOOST_PP_ENUM_PARAMS_Z macro generates a comma-separated list of parameters.  - It reenters BOOST_PP_REPEAT with maximum efficiency. -
-

Usage

-
- BOOST_PP_ENUM_PARAMS_Z(z, count, param) -
-

Arguments

-
-
z
-
- The next available BOOST_PP_REPEAT dimension. -
-
count
-
- The number of parameters to generate.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
param
-
- The text of the parameter.  - BOOST_PP_ENUM_PARAMS_Z concatenates numbers ranging from 0 to count - 1 - to generate parameters. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- param ## 0, param ## 1, ... param ## count - 1 -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_params.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-#define MACRO(z, n, _) /* ............................ */ \
-   template<                                              \
-      BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(n), class T) \
-   > class X ## n {                                       \
-      /* ... */                                           \
-   };                                                     \
-   /**/
-
-BOOST_PP_REPEAT(2, MACRO, nil)
-/*
-   expands to...
-   template<class T0> class X0 { };
-   template<class T0, class T1> class X1 { };
-*/
-
- - diff --git a/docs.1/ref/enum_shifted.html b/docs.1/ref/enum_shifted.html deleted file mode 100644 index 27464f0..0000000 --- a/docs.1/ref/enum_shifted.html +++ /dev/null @@ -1,72 +0,0 @@ - - - BOOST_PP_ENUM_SHIFTED - - - - -
- The BOOST_PP_ENUM_SHIFTED macro generates a comma-separated, shifted list. -
-

Usage

-
- BOOST_PP_ENUM_SHIFTED(count, macro, data) -
-

Arguments

-
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_ENUM_SHIFTED with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- macro(z, 1, data), ... macro(z, count - 1, data) -
-
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_ENUM_SHIFTED_z. -
-
- Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  - This limitation no longer exists, as the library can automatically detect the next available repetition depth. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_shifted.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/enum.hpp>
-#include <boost/preprocessor/repetition/enum_shifted.hpp>
-
-#define TYPE(z, n, type) type
-
-BOOST_PP_ENUM(5, TYPE, int) // expands to int, int, int, int, int
-BOOST_PP_ENUM_SHIFTED(5, TYPE, int) // expands to int, int, int, int
-
- - diff --git a/docs.1/ref/enum_shifted_params.html b/docs.1/ref/enum_shifted_params.html deleted file mode 100644 index b4865d2..0000000 --- a/docs.1/ref/enum_shifted_params.html +++ /dev/null @@ -1,63 +0,0 @@ - - - BOOST_PP_ENUM_SHIFTED_PARAMS - - - - -
- The BOOST_PP_ENUM_SHIFTED_PARAMS macro generates a comma-separated, shifted list of parameters. -
-

Usage

-
- BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) -
-

Arguments

-
-
count
-
- The number of parameters to generate.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
param
-
- The text of the parameter.  - BOOST_PP_ENUM_SHIFTED_PARAMS concatenates numbers ranging from 1 to count - 1 - to generate parameters. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- param ## 1, ... param ## count - 1 -
-
-
- This macro facilitates a typical usage of the library.  - Shifted parameter lists are common in template metaprograms. -
-
- To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_SHIFTED_PARAMS_Z. -
-
- Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  - This limitation no longer exists, as the library can automatically detect the next available repetition depth. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_shifted_params.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
-
-BOOST_PP_ENUM_SHIFTED_PARAMS(3, class T) // expands to class T1, class T2
-
- - diff --git a/docs.1/ref/enum_shifted_params_z.html b/docs.1/ref/enum_shifted_params_z.html deleted file mode 100644 index f2f36a0..0000000 --- a/docs.1/ref/enum_shifted_params_z.html +++ /dev/null @@ -1,69 +0,0 @@ - - - BOOST_PP_ENUM_SHIFTED_PARAMS_Z - - - - -
- The BOOST_PP_ENUM_SHIFTED_PARAMS_Z macro generates a comma-separated, shifted list of parameters.  - It reenters BOOST_PP_REPEAT with maximum efficiency. -
-

Usage

-
- BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) -
-

Arguments

-
-
z
-
- The next available BOOST_PP_REPEAT dimension. -
-
count
-
- The number of parameters to generate.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
param
-
- The text of the parameter.  - BOOST_PP_ENUM_SHIFTED_PARAMS_Z concatenates numbers ranging from 1 to count - 1 - to generate parameters. -
-
-

Remarks

-
- This macro expands to the comma-separated sequence: -
- param ## 1, ... param ## count - 1 -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_shifted_params.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-int add_f(void) {
-   return 0;
-}
-
-#define ADD_F(z, n, _) \
-   int add_f(BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(n), int p)) { \
-      return p0 + add_f(BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, BOOST_PP_INC(n), p)); \
-   } \
-   /**/
-
-BOOST_PP_REPEAT(5, ADD_F, nil)
-
- - diff --git a/docs.1/ref/enum_shifted_z.html b/docs.1/ref/enum_shifted_z.html deleted file mode 100644 index 1601282..0000000 --- a/docs.1/ref/enum_shifted_z.html +++ /dev/null @@ -1,83 +0,0 @@ - - - BOOST_PP_ENUM_SHIFTED_z - - - - -
- The BOOST_PP_ENUM_SHIFTED_z macro represents a reentry into the BOOST_PP_ENUM_SHIFTED repetition construct. -
-

Usage

-
- BOOST_PP_ENUM_SHIFTED_ ## z(count, macro, data) -
-

Arguments

-
-
z
-
- The next available BOOST_PP_REPEAT dimension. -
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_ENUM_SHIFTED with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, 1, data), ... macro(z, count - 1, data) -
-
-
- At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  - This happens when the z value is a macro invocation itself.  - It needs a delay to allow it to expand.  - The syntax in such a scenario becomes: -
- BOOST_PP_CAT(BOOST_PP_ENUM_SHIFTED_, z)(count, macro, data). -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum_shifted.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_shifted.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-#define TEXT(z, n, text) text
-
-#define MACRO(z, n, data) /* ... */ \
-   (                                \
-      BOOST_PP_ENUM_SHIFTED_ ## z(  \
-         BOOST_PP_INC(n),           \
-         TEXT, data                 \
-      )                             \
-   )                                \
-   /**/
-
-BOOST_PP_REPEAT(3, MACRO, class) // expands to () (class) (class, class)
-
- - diff --git a/docs.1/ref/enum_z.html b/docs.1/ref/enum_z.html deleted file mode 100644 index 3be9bd4..0000000 --- a/docs.1/ref/enum_z.html +++ /dev/null @@ -1,86 +0,0 @@ - - - BOOST_PP_ENUM_z - - - - -
- The BOOST_PP_ENUM_z macro represents a reentry into the BOOST_PP_ENUM repetition construct. -
-

Usage

-
- BOOST_PP_ENUM_ ## z(count, macro, data) -
-

Arguments

-
-
z
-
- The next available BOOST_PP_REPEAT dimension. -
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_ENUM with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, 0, data), macro(z, 1, data), ... macro(z, count - 1, data) -
-
-
- At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  - This happens when the z value is a macro invocation itself.  - It needs a delay to allow it to expand.  - The syntax in such a scenario becomes: -
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)(count, macro, data) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/enum.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum.hpp>
-
-#define TEXT(z, n, text) text
-
-#define TTP(z, n, _) /* ............................ */ \
-   template<                                            \
-      BOOST_PP_ENUM_ ## z(BOOST_PP_INC(n), TEXT, class) \
-   >                                                    \
-   class T ## n                                         \
-   /**/
-
-BOOST_PP_ENUM(3, TTP, nil)
-   /*
-      expands to...
-      template<class> class T0,
-      template<class, class> class T1,
-      template<class, class, class> class T2
-   */
-
- - diff --git a/docs.1/ref/equal.html b/docs.1/ref/equal.html deleted file mode 100644 index 7a03eee..0000000 --- a/docs.1/ref/equal.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_EQUAL - - - - -
- The BOOST_PP_EQUAL macro compares two values for equality. -
-

Usage

-
- BOOST_PP_EQUAL(x, y) -
-

Arguments

-
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is equal to y, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction because this macro no longer uses BOOST_PP_WHILE. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/equal.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/equal.hpp>
-
-BOOST_PP_EQUAL(4, 3) // expands to 0
-BOOST_PP_EQUAL(5, 5) // expands to 1
-
- - diff --git a/docs.1/ref/equal_d.html b/docs.1/ref/equal_d.html deleted file mode 100644 index 268055a..0000000 --- a/docs.1/ref/equal_d.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_EQUAL_D - - - - -
- The BOOST_PP_EQUAL_D macro compares two values for equality. -
-

Usage

-
- BOOST_PP_EQUAL_D(d, x, y) -
-

Arguments

-
-
d
-
- This argument is ignored. -
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is equal to y, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_EQUAL instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/equal.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/equal.hpp>
-
-BOOST_PP_EQUAL_D(1, 4, 3) // expands to 0
-BOOST_PP_EQUAL_D(1, 5, 5) // expands to 1
-
- - diff --git a/docs.1/ref/expand.html b/docs.1/ref/expand.html deleted file mode 100644 index 79af4ff..0000000 --- a/docs.1/ref/expand.html +++ /dev/null @@ -1,57 +0,0 @@ - - - BOOST_PP_EXPAND - - - - -
- The BOOST_PP_EXPAND macro performs a double macro-expansion on its argument. -
-

Usage

-
- BOOST_PP_EXPAND(x) -
-

Arguments

-
-
x
-
- The argument to be expanded twice. -
-
-

Remarks

-
- This macro is useful when a delay is necessary to produce the correct semantics of a macro invocation.  - For example, when a macro expands to an argument list to another macro.  - This macro will expand the the argument list on the first pass, and then rescan to expand any more macros. -
-

Requirements

-
- Header:  <boost/preprocessor/facilities/expand.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/facilities/expand.hpp>
-
-#define MACRO(a, b, c) (a)(b)(c)
-#define ARGS() (1, 2, 3)
-
-BOOST_PP_EXPAND(MACRO ARGS) // expands to (1)(2)(3)
-
-#define SAMPLE(n) /* ... */ \
-   BOOST_PP_EXPAND(         \
-      MACRO,                \
-      BOOST_PP_IF(          \
-         n,                 \
-         (x, y, z),         \
-         (a, b, c)          \
-      )                     \
-   )                        \
-   /**/
-
-SAMPLE(0) // expands to (a)(b)(c)
-SAMPLE(1) // expands to (x)(y)(z)
-
- - diff --git a/docs.1/ref/expr_if.html b/docs.1/ref/expr_if.html deleted file mode 100644 index c24cd6a..0000000 --- a/docs.1/ref/expr_if.html +++ /dev/null @@ -1,60 +0,0 @@ - - - BOOST_PP_EXPR_IF - - - - -
- The BOOST_PP_EXPR_IF macro expands to its second argument if its first argument is non-zero or expands to nothing otherwise. -
-

Usage

-
- BOOST_PP_EXPR_IF(cond, expr) -
-

Arguments

-
-
cond
-
- The condition that determines if the result is expr or nothing.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
expr
-
- The result of the expansion if cond is non-zero. -
-
-

Remarks

-
- This macro performs a boolean conversion on its first argument.  - If that conversion is unnecessary, use BOOST_PP_EXPR_IIF instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/control/expr_if.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/expr_if.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define CV(n) /* ........................... */ \
-   BOOST_PP_EXPR_IF(                            \
-      n,                                        \
-      BOOST_PP_TUPLE_ELEM(                      \
-         4, n,                                  \
-         (..., const, volatile, const volatile) \
-      )                                         \
-   )                                            \
-   /**/
-
-CV(0) // expands to nothing
-CV(1) // expands to const
-
- - diff --git a/docs.1/ref/expr_iif.html b/docs.1/ref/expr_iif.html deleted file mode 100644 index 12351a8..0000000 --- a/docs.1/ref/expr_iif.html +++ /dev/null @@ -1,57 +0,0 @@ - - - BOOST_PP_EXPR_IIF - - - - -
- The BOOST_PP_EXPR_IIF macro expands to its second argument if its first argument is 1 and expands to nothing if its first argument is 0. -
-

Usage

-
- BOOST_PP_EXPR_IIF(bit, expr) -
-

Arguments

-
-
bit
-
- The condition that determines if the result is expr or nothing.  - This value must expand to 0 or 1. -
-
expr
-
- The result of the expansion if bit is 1. -
-
-

Remarks

-
- This macro does not perform a boolean conversion on its first argument.  - If that conversion is necessary, use BOOST_PP_EXPR_IF instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/control/expr_iif.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/and.hpp>
-#include <boost/preprocessor/control/expr_iif.hpp>
-
-#define INSERT_AND(p, q, text) /* ... */ \
-   BOOST_PP_EXPR_IIF(                    \
-      BOOST_PP_AND(p, q),                \
-      text                               \
-   )                                     \
-   /**/
-
-INSERT_AND(2, 3, abc) // expands to abc
-INSERT_AND(0, 7, xyz) // expands to nothing
-
- - diff --git a/docs.1/ref/filename_x.html b/docs.1/ref/filename_x.html deleted file mode 100644 index 511f25c..0000000 --- a/docs.1/ref/filename_x.html +++ /dev/null @@ -1,42 +0,0 @@ - - - BOOST_PP_FILENAME_x - - - - -
- The BOOST_PP_FILENAME_x macro is a user-defined named external argument used by BOOST_PP_ITERATE.  - It denotes the file to be iterated over. -
-

Usage

-
- #define BOOST_PP_FILENAME_x filename -
-

Arguments

-
-
x
-
- The iteration depth of the next file-iteration.  - This value must be the current iteration depth + 1. -
-
filename
-
- A quoted or angle-bracketed filename to used as the target of a file-iteration. -
-
-

Remarks

-
- This macro is part of the secondary method of passing arguments to BOOST_PP_ITERATE.  - The other part is BOOST_PP_ITERATION_LIMITS. -
-
- This macro is automatically undefined for reuse by a call to BOOST_PP_ITERATE. -
-

See Also

- - - diff --git a/docs.1/ref/for.html b/docs.1/ref/for.html deleted file mode 100644 index 02e89ab..0000000 --- a/docs.1/ref/for.html +++ /dev/null @@ -1,95 +0,0 @@ - - - BOOST_PP_FOR - - - - -
- The BOOST_PP_FOR macro represents a generalized horizontal repetition construct. -
-

Usage

-
- BOOST_PP_FOR(state, pred, op, macro) -
-

Arguments

-
-
state
-
- The initial state. -
-
pred
-
- A binary predicate of the form pred(r, state).  - This macro must expand to an integer in the range of 0 to BOOST_PP_LIMIT_MAG.  - BOOST_PP_FOR repeatedly expands macro while this predicate returns non-zero.  - This macro is called with the next available BOOST_PP_FOR repetition and the current state. -
-
op
-
- A binary operation of the form op(r, state).  - This operation is expanded by BOOST_PP_FOR with the next available BOOST_PP_FOR repetition and the current state.  - This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. -
-
macro
-
- A binary macro of the form macro(r, state).  - This macro is expanded by BOOST_PP_FOR with the next available BOOST_PP_FOR repetition and the current state.  - This macro is is repeated by BOOST_PP_FOR until pred returns 0. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(r, state) macro(r, op(r, state)) ... macro(r, op(r, ... op(r, state) ... )) -
-
-
- The r value that is passed to pred, op, and macro represents the next available BOOST_PP_FOR repetition.  - Other macros that have _R suffix variants internally use BOOST_PP_FOR--for example, BOOST_PP_LIST_FOR_EACH and BOOST_PP_LIST_FOR_EACH_R.  - Using these _R versions is not strictly necessary, but passing the r value (that is passed to pred, op, and macro) to these macros allows them to reenter BOOST_PP_FOR with maximum efficiency. -
-
- To directly use this r value, rather than simply passing it to another macro, see BOOST_PP_FOR_r. -
-
- Previously, this macro could not be used recursively inside BOOST_PP_FOR.  - This limitation no longer exists, as the library can automatically detect the next available BOOST_PP_FOR repetition. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/for.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/comparison/not_equal.hpp>
-#include <boost/preprocessor/repetition/for.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define PRED(r, state) /* ....................... */ \
-   BOOST_PP_NOT_EQUAL(                               \
-      BOOST_PP_TUPLE_ELEM(2, 0, state),              \
-      BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2, 1, state)) \
-   )                                                 \
-   /**/
-
-#define OP(r, state) /* .......................... */ \
-   (                                                  \
-      BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2, 0, state)), \
-      BOOST_PP_TUPLE_ELEM(2, 1, state)                \
-   )                                                  \
-   /**/
-
-#define MACRO(r, state) BOOST_PP_TUPLE_ELEM(2, 0, state)
-
-BOOST_PP_FOR((5, 10), PRED, OP, MACRO) // expands to 5 6 7 8 9 10
-
- - diff --git a/docs.1/ref/for_r.html b/docs.1/ref/for_r.html deleted file mode 100644 index c896b16..0000000 --- a/docs.1/ref/for_r.html +++ /dev/null @@ -1,145 +0,0 @@ - - - BOOST_PP_FOR_r - - - - -
- The BOOST_PP_FOR_r macro represents a reentry into the BOOST_PP_FOR repetition construct. -
-

Usage

-
- BOOST_PP_FOR_ ## r(state, pred, op, macro) -
-

Arguments

-
-
r
-
- The next available BOOST_PP_FOR repetition. -
-
state
-
- The initial state. -
-
pred
-
- A binary predicate of the form pred(r, state).  - This macro must expand to an integer in the range of 0 to BOOST_PP_LIMIT_MAG.  - BOOST_PP_FOR repeatedly expands macro while this predicate returns non-zero.  - This macro is called with the next available BOOST_PP_FOR repetition and the current state. -
-
op
-
- A binary operation of the form op(r, state).  - This operation is expanded by BOOST_PP_FOR with the next available BOOST_PP_FOR repetition and the current state.  - This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. -
-
macro
-
- A binary macro of the form macro(r, state).  - This macro is expanded by BOOST_PP_FOR with the next available BOOST_PP_FOR repetition and the current state.  - This macro is is repeated by BOOST_PP_FOR until pred returns 0. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(r, state) macro(r, op(r, state)) ... macro(r, op(r, ... op(r, state) ... )) -
-
-
- At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  - This happens when the r value is a macro invocation itself.  - It needs a delay to allow it to expand.  - The syntax in such a scenario becomes: -
- BOOST_PP_CAT(BOOST_PP_FOR_, r)(state, pred, op, macro) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/for.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/comparison/not_equal.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/repetition/for.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define PRED(r, state) /* ............ */ \
-   BOOST_PP_NOT_EQUAL(                    \
-      BOOST_PP_TUPLE_ELEM(4, 0, state),   \
-      BOOST_PP_INC(                       \
-         BOOST_PP_TUPLE_ELEM(4, 1, state) \
-      )                                   \
-   )                                      \
-   /**/
-
-#define OP(r, state) /* .............. */ \
-   (                                      \
-      BOOST_PP_INC(                       \
-         BOOST_PP_TUPLE_ELEM(4, 0, state) \
-      ),                                  \
-      BOOST_PP_TUPLE_ELEM(4, 1, state),   \
-      BOOST_PP_TUPLE_ELEM(4, 2, state),   \
-      BOOST_PP_INC(                       \
-         BOOST_PP_TUPLE_ELEM(4, 3, state) \
-      )                                   \
-   )                                      \
-   /**/
-
-#define MACRO(r, state) /* ....................... */ \
-   BOOST_PP_COMMA_IF(                                 \
-      BOOST_PP_TUPLE_ELEM(4, 3, state)                \
-   ) template<                                        \
-      BOOST_PP_FOR_ ## r(                             \
-         (0, BOOST_PP_TUPLE_ELEM(4, 0, state), _, 0), \
-         PRED_2, OP, MACRO_2                          \
-      )                                               \
-   > class BOOST_PP_CAT(                              \
-      BOOST_PP_TUPLE_ELEM(4, 2, state),               \
-      BOOST_PP_TUPLE_ELEM(4, 0, state)                \
-   )                                                  \
-   /**/
-
-#define PRED_2(r, state) /* ........ */ \
-   BOOST_PP_NOT_EQUAL(                  \
-      BOOST_PP_TUPLE_ELEM(4, 0, state), \
-      BOOST_PP_TUPLE_ELEM(4, 1, state)  \
-   )                                    \
-   /**/
-
-#define MACRO_2(r, state) /* ...... */ \
-   BOOST_PP_COMMA_IF(                  \
-      BOOST_PP_TUPLE_ELEM(4, 0, state) \
-   ) class                             \
-   /**/
-
-#define TEMPLATE_TEMPLATE(low, high, name) /* ... */ \
-   BOOST_PP_FOR(                                     \
-      (low, high, name, 0),                          \
-      PRED, OP, MACRO                                \
-   )                                                 \
-   /**/
-
-TEMPLATE_TEMPLATE(2, 4, T)
-/*
-   expands to...
-   template<class, class> class T2,
-   template<class, class, class> class T3,
-   template<class, class, class, class> class T4
-*/
-
- - diff --git a/docs.1/ref/frame_finish.html b/docs.1/ref/frame_finish.html deleted file mode 100644 index 19bac1b..0000000 --- a/docs.1/ref/frame_finish.html +++ /dev/null @@ -1,32 +0,0 @@ - - - BOOST_PP_FRAME_FINISH - - - - -
- The BOOST_PP_FRAME_FINISH macro expands to the upper bound of an absolute file-iteration depth. -
-

Usage

-
- BOOST_PP_FRAME_FINISH(i) -
-

Arguments

-
-
i
-
- The absolute depth of the frame whose upper bound is to be retreived.  - Valid values range from 1 to BOOST_PP_ITERATION_DEPTH(). -
-
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
- - diff --git a/docs.1/ref/frame_flags.html b/docs.1/ref/frame_flags.html deleted file mode 100644 index d046435..0000000 --- a/docs.1/ref/frame_flags.html +++ /dev/null @@ -1,32 +0,0 @@ - - - BOOST_PP_FRAME_FLAGS - - - - -
- The BOOST_PP_FRAME_FLAGS macro expands to the flags associated with an absolute file-iteration depth. -
-

Usage

-
- BOOST_PP_FRAME_FLAGS(i) -
-

Arguments

-
-
i
-
- The absolute depth of the frame whose flags are to be retreived.  - Valid values range from 1 to BOOST_PP_ITERATION_DEPTH(). -
-
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
- - diff --git a/docs.1/ref/frame_iteration.html b/docs.1/ref/frame_iteration.html deleted file mode 100644 index 5215775..0000000 --- a/docs.1/ref/frame_iteration.html +++ /dev/null @@ -1,63 +0,0 @@ - - - BOOST_PP_FRAME_ITERATION - - - - -
- The BOOST_PP_FRAME_ITERATION macro expands to the iteration value of an absolute file-iteration depth. -
-

Usage

-
- BOOST_PP_FRAME_ITERATION(i) -
-

Arguments

-
-
i
-
- The absolute depth of the frame whose iteration value is to be retreived.  - Valid values range from 1 to BOOST_PP_ITERATION_DEPTH(). -
-
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_ITERATING
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
-   #include BOOST_PP_ITERATE()
-
-   #endif
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1
-
-   --
-   #define BOOST_PP_ITERATION_PARAMS_2 /* ... */ \
-      (3, (1, BOOST_PP_ITERATION(), "file.h"))   \
-      /**/
-
-   #include BOOST_PP_ITERATE()
-
-#else
-
-   outer: BOOST_PP_FRAME_ITERATION(1)
-   inner: BOOST_PP_FRAME_ITERATION(2)
-
-#endif
-
- - diff --git a/docs.1/ref/frame_start.html b/docs.1/ref/frame_start.html deleted file mode 100644 index 07db997..0000000 --- a/docs.1/ref/frame_start.html +++ /dev/null @@ -1,32 +0,0 @@ - - - BOOST_PP_FRAME_START - - - - -
- The BOOST_PP_FRAME_START macro expands to the lower bound of an absolute file-iteration depth. -
-

Usage

-
- BOOST_PP_FRAME_START(i) -
-

Arguments

-
-
i
-
- The absolute depth of the frame whose lower bound is to be retreived.  - Valid values range from 1 to BOOST_PP_ITERATION_DEPTH(). -
-
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
- - diff --git a/docs.1/ref/greater.html b/docs.1/ref/greater.html deleted file mode 100644 index addbefa..0000000 --- a/docs.1/ref/greater.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_GREATER - - - - -
- The BOOST_PP_GREATER macro compares two values for greater magnitude. -
-

Usage

-
- BOOST_PP_GREATER(x, y) -
-

Arguments

-
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is greater than y, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_GREATER_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/greater.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/greater.hpp>
-
-BOOST_PP_GREATER(4, 3) // expands to 1
-BOOST_PP_GREATER(5, 5) // expands to 0
-
- - diff --git a/docs.1/ref/greater_d.html b/docs.1/ref/greater_d.html deleted file mode 100644 index e371fdd..0000000 --- a/docs.1/ref/greater_d.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_GREATER_D - - - - -
- The BOOST_PP_GREATER_D macro compares two values for greater magnitude.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_GREATER_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is greater than y, this macro expands to 1.  - Otherwise, it expands to 0. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/greater.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/greater.hpp>
-#include <boost/preprocessor/list/filter.hpp>
-
-#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
-
-#define PRED(d, _, num) BOOST_PP_GREATER_D(d, num, 2)
-
-BOOST_PP_LIST_FILTER(PRED, nil, LIST) // expands to (3, (4, (5, BOOST_PP_NIL)))
-
- - diff --git a/docs.1/ref/greater_equal.html b/docs.1/ref/greater_equal.html deleted file mode 100644 index fd9c69a..0000000 --- a/docs.1/ref/greater_equal.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_GREATER_EQUAL - - - - -
- The BOOST_PP_GREATER_EQUAL macro compares two values for equality or greater magnitude. -
-

Usage

-
- BOOST_PP_GREATER_EQUAL(x, y) -
-

Arguments

-
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is greater than or equal to y, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_GREATER_EQUAL_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/greater_equal.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/greater_equal.hpp>
-
-BOOST_PP_GREATER_EQUAL(4, 3) // expands to 1
-BOOST_PP_GREATER_EQUAL(5, 5) // expands to 1
-
- - diff --git a/docs.1/ref/greater_equal_d.html b/docs.1/ref/greater_equal_d.html deleted file mode 100644 index 7b36c53..0000000 --- a/docs.1/ref/greater_equal_d.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_GREATER_EQUAL_D - - - - -
- The BOOST_PP_GREATER_EQUAL_D macro compares two values for equality or greater magnitude.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_GREATER_EQUAL_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is greater than or equal to y, this macro expands to 1.  - Otherwise, it expands to 0. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/greater_equal.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/greater_equal.hpp>
-#include <boost/preprocessor/list/filter.hpp>
-
-#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
-
-#define PRED(d, _, num) BOOST_PP_GREATER_EQUAL_D(d, num, 4)
-
-BOOST_PP_LIST_FILTER(PRED, nil, LIST) // expands to (4, (5, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/identity.html b/docs.1/ref/identity.html deleted file mode 100644 index 1d549bd..0000000 --- a/docs.1/ref/identity.html +++ /dev/null @@ -1,47 +0,0 @@ - - - BOOST_PP_IDENTITY - - - - -
- The BOOST_PP_IDENTITY macro expands to its argument when invoked. -
-

Usage

-
- BOOST_PP_IDENTITY(item)() -
-

Arguments

-
-
item
-
- The result of the expansion. -
-
-

Remarks

-
- This macro is designed to be used with BOOST_PP_IF and BOOST_PP_IIF when only one of the clauses needs to be invoked. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/facilities/identity.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/facilities/identity.hpp>
-
-#define MACRO(n) BOOST_PP_IF(n, BOOST_PP_IDENTITY(x), BOOST_PP_EMPTY)()
-
-MACRO(0) // expands to nothing
-MACRO(1) // expands to x
-
- - diff --git a/docs.1/ref/if.html b/docs.1/ref/if.html deleted file mode 100644 index 3c6b5d5..0000000 --- a/docs.1/ref/if.html +++ /dev/null @@ -1,53 +0,0 @@ - - - BOOST_PP_IF - - - - -
- The BOOST_PP_IF macro chooses between to values based on a logical condition. -
-

Usage

-
- BOOST_PP_IF(cond, t, f) -
-

Arguments

-
-
cond
-
- The condition that determines if the result is expr or nothing.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
t
-
- The result of the expansion if cond is non-zero. -
-
f
-
- The result of the expansion if cond is 0. -
-
-

Remarks

-
- This macro performs a boolean conversion on its first argument.  - If that conversion is unnecessary, use BOOST_PP_IIF instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/control/if.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/if.hpp>
-
-BOOST_PP_IF(10, a, b) // expands to a
-BOOST_PP_IF(0, a, b) // expands to b
-
- - diff --git a/docs.1/ref/iif.html b/docs.1/ref/iif.html deleted file mode 100644 index 0578e5e..0000000 --- a/docs.1/ref/iif.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_IIF - - - - -
- The BOOST_PP_IIF macro chooses between to values based on a bitwise condition. -
-

Usage

-
- BOOST_PP_IIF(bit, t, f) -
-

Arguments

-
-
bit
-
- The condition that determines if the result is expr or nothing.  - This value must expand to 0 or 1. -
-
t
-
- The result of the expansion if bit is 1. -
-
f
-
- The result of the expansion if bit is 0. -
-
-

Remarks

-
- This macro does not perform a boolean conversion on its first argument.  - If that conversion is necessary, use BOOST_PP_IF instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/control/iif.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/iif.hpp>
-
-#define OR_IF(p, q, t, f) BOOST_PP_IIF(BOOST_PP_OR(p, q), t, f)
-
-OR_IF(1, 0, abc, xyz) // expands to abc
-OF_IF(0, 0, abc, xyz) // expands to xyz
-
- - diff --git a/docs.1/ref/inc.html b/docs.1/ref/inc.html deleted file mode 100644 index 8d35c4c..0000000 --- a/docs.1/ref/inc.html +++ /dev/null @@ -1,44 +0,0 @@ - - - BOOST_PP_INC - - - - -
- The BOOST_PP_INC macro expands to one more than its argument. -
-

Usage

-
- BOOST_PP_INC(x) -
-

Arguments

-
-
x
-
- The value to be incremented.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/inc.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-
-BOOST_PP_INC(BOOST_PP_INC(6)) // expands to 8
-BOOST_PP_INC(4) // expands to 5
-
- - diff --git a/docs.1/ref/include_self.html b/docs.1/ref/include_self.html deleted file mode 100644 index 3faa38f..0000000 --- a/docs.1/ref/include_self.html +++ /dev/null @@ -1,91 +0,0 @@ - - - BOOST_PP_INCLUDE_SELF - - - - -
- The BOOST_PP_INCLUDE_SELF macro includes a file indirectly. -
-

Usage

-
- #include BOOST_PP_INCLUDE_SELF() -
-

Arguments

-
-
filename
-
- A quoted or angle-bracketed filename to be included by BOOST_PP_INCLUDE_SELF. -
-
-

Remarks

-
- BOOST_PP_INDIRECT_SELF must be defined prior to using this macro. -
-
- Most preprocessors will not allow a file to directly include itself--even when the file protects itself from such a scenario.  - This macro, in combination with BOOST_PP_INDIRECT_SELF allows a file to include itself indirectly. -
-
- While BOOST_PP_INDIRECT_SELF is being included, BOOST_PP_INCLUDE_SELF defines the macro BOOST_PP_IS_SELFISH to 1.  - When it returns from the inclusion, BOOST_PP_IS_SELFISH is undefined. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/iteration/self.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_SELFISH
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/self.hpp>
-
-   #define NAME X
-   struct NAME {
-      // ...
-      #define BOOST_PP_INDIRECT_SELF "file.h"
-      #include BOOST_PP_INCLUDE_SELF()
-   };
-
-   #define NAME Y
-   struct NAME {
-      // ...
-      #define BOOST_PP_INDIRECT_SELF "file.h"
-      #include BOOST_PP_INCLUDE_SELF()
-   };
-
-   #define NAME Z
-   struct NAME {
-      // ...
-      #define BOOST_PP_INDIRECT_SELF "file.h"
-      #include BOOST_PP_INCLUDE_SELF()
-   };
-
-   #endif
-
-#else
-
-      inline bool validate(NAME* p) {
-         return true;
-      }
-
-      template<class T> bool validate(T* p) {
-         return dynamic_cast<NAME*>(p);
-      }
-
-   #undef NAME
-
-#endif
-
- - diff --git a/docs.1/ref/indirect_self.html b/docs.1/ref/indirect_self.html deleted file mode 100644 index 45c06ff..0000000 --- a/docs.1/ref/indirect_self.html +++ /dev/null @@ -1,35 +0,0 @@ - - - BOOST_PP_INDIRECT_SELF - - - - -
- The BOOST_PP_INDIRECT_SELF macro is a user-defined named external argument used by BOOST_PP_INCLUDE_SELF.  -
-

Usage

-
- #define BOOST_PP_INDIRECT_SELF filename -
-

Arguments

-
-
filename
-
- A quoted or angle-bracketed filename to be included by BOOST_PP_INCLUDE_SELF. -
-
-

Remarks

-
- Most preprocessors will not allow a file to directly include itself--even when the file protects itself from such a scenario.  - This macro, in combination with BOOST_PP_INCLUDE_SELF allows a file to include itself indirectly. -
-
- This macro is automatically undefined for reuse by a call to BOOST_PP_INCLUDE_SELF. -
-

See Also

- - - diff --git a/docs.1/ref/intercept.html b/docs.1/ref/intercept.html deleted file mode 100644 index 2e30e3e..0000000 --- a/docs.1/ref/intercept.html +++ /dev/null @@ -1,41 +0,0 @@ - - - BOOST_PP_INTERCEPT - - - - -
- The BOOST_PP_INTERCEPT macro intercepts a numeric concatenation and expands to nothing. -
-

Usage

-
- BOOST_PP_INTERCEPT -
-

Remarks

-
- This macro is used to intercept concatenations performed by various other library constructs.  - It is typically used after other text to prevent eat the concatenation expand to nothing.  - This macro can only intercept integer constants in the range of 0 to BOOST_PP_LIMIT_MAG. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/facilities/intercept.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/facilities/intercept.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-
-BOOST_PP_ENUM_BINARY_PARAMS(3, class T, = U)
-// expands to class T0 = U0, class T1 = U1, class T2 = U2
-
-BOOST_PP_ENUM_BINARY_PARAMS(3, class T, = int BOOST_PP_INTERCEPT)
-// expands to class T0 = int, class T1 = int, class T2 = int
-
- - diff --git a/docs.1/ref/is_iterating.html b/docs.1/ref/is_iterating.html deleted file mode 100644 index 7667369..0000000 --- a/docs.1/ref/is_iterating.html +++ /dev/null @@ -1,27 +0,0 @@ - - - BOOST_PP_IS_ITERATING - - - - -
- The BOOST_PP_IS_ITERATING macro is defined when a file-iteration is in progress. -
-

Usage

-
- #if !defined(BOOST_PP_IS_ITERATING) // ... -
-

Remarks

-
- If a file-iteration is in progress, this macro is defined as 1.  - This means that the following will also work: -
- #if !BOOST_PP_IS_ITERATING // ... -
-
-
- This macro is defined to guard a file from infinite inclusion. -
- - diff --git a/docs.1/ref/is_selfish.html b/docs.1/ref/is_selfish.html deleted file mode 100644 index 7240d44..0000000 --- a/docs.1/ref/is_selfish.html +++ /dev/null @@ -1,27 +0,0 @@ - - - BOOST_PP_IS_SELFISH - - - - -
- The BOOST_PP_IS_SELFISH macro is defined when a self-inclusion is in progress. -
-

Usage

-
- #if !defined(BOOST_PP_IS_SELFISH) // ... -
-

Remarks

-
- If a self-inclusion is in progress, this macro is defined as 1.  - This means that the following will also work: -
- #if !BOOST_PP_IS_SELFISH // ... -
-
-
- This macro is defined to guard a file from infinite inclusion. -
- - diff --git a/docs.1/ref/iterate.html b/docs.1/ref/iterate.html deleted file mode 100644 index 44c5a53..0000000 --- a/docs.1/ref/iterate.html +++ /dev/null @@ -1,73 +0,0 @@ - - - BOOST_PP_ITERATE - - - - -
- The BOOST_PP_ITERATE macro initiates a file-iteration. -
-

Usage

-
- #include BOOST_PP_ITERATE() -
-

Remarks

-
- Arguments to this macro are passed as external named arguments in one of two - ways--either through BOOST_PP_FILENAME_x and BOOST_PP_ITERATION_LIMITS or - through BOOST_PP_ITERATION_PARAMS_x.  -
-
- Three pieces of information are required to perform a file-iteration.  - First, the name of a file to iterate over.  - This is passed via BOOST_PP_FILENAME_x or as part of BOOST_PP_ITERATION_PARAMS_x.  - The file-iteration mechanism will repeatedly include this file with iteration values ranging from a lower bound to an upper bound--the second and third required parameters.  - These two boundaries are either passed through BOOST_PP_ITERATION_LIMITS or as part of BOOST_PP_ITERATION_PARAMS_x. -
-
- Optionally, a fourth parameter may be passed that associates flags with an iteration.  - These flags are primarily useful to distinguish one iteration from another in the same file.  - This parameter can only be passed through BOOST_PP_ITERATION_PARAMS_x. -
-
- While a file-iteration is in progress, BOOST_PP_IS_ITERATING is defined as 1. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_ITERATING
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
-   #include BOOST_PP_ITERATE()
-
-   #define BOOST_PP_FILENAME_1 "file.h"
-   #define BOOST_PP_ITERATION_LIMITS (11, 20)
-   #include BOOST_PP_ITERATE()
-
-   #endif
-
-#else
-
-   current iteration value is BOOST_PP_ITERATION()
-
-#endif
-
- - diff --git a/docs.1/ref/iteration.html b/docs.1/ref/iteration.html deleted file mode 100644 index 5c4d3bc..0000000 --- a/docs.1/ref/iteration.html +++ /dev/null @@ -1,45 +0,0 @@ - - - BOOST_PP_ITERATION - - - - -
- The BOOST_PP_ITERATION macro expands to the iteration value of the current file-iteration depth. -
-

Usage

-
- BOOST_PP_ITERATION() -
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_ITERATING
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 3, "file.h"))
-   #include BOOST_PP_ITERATE()
-
-   #endif
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1
-
-   value == BOOST_PP_ITERATION()
-
-#endif
-
- - diff --git a/docs.1/ref/iteration_depth.html b/docs.1/ref/iteration_depth.html deleted file mode 100644 index acba6b6..0000000 --- a/docs.1/ref/iteration_depth.html +++ /dev/null @@ -1,58 +0,0 @@ - - - BOOST_PP_ITERATION_DEPTH - - - - -
- The BOOST_PP_ITERATION_DEPTH macro expands to the current file-iteration depth. -
-

Usage

-
- BOOST_PP_ITERATION_DEPTH() -
-

Remarks

-
- If a file-iteration is not in progress, this macro expands to 0.  - Otherwise, it expands to the current depth of file-iteration. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_ITERATING
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 3, "file.h"))
-   #include BOOST_PP_ITERATE()
-
-   #endif
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1
-
-   + depth BOOST_PP_ITERATION_DEPTH()
-   // ...
-
-   #define BOOST_PP_ITERATION_PARAMS_2 /* ... */ \
-      (3, (1, BOOST_PP_ITERATION(), "file.h"))   \
-      /**/
-
-   #include BOOST_PP_ITERATE()
-
-#elif BOOST_PP_ITERATION_DEPTH() == 2
-
-   - depth BOOST_PP_ITERATION_DEPTH()
-   // ...
-
-#endif
-
- - diff --git a/docs.1/ref/iteration_finish.html b/docs.1/ref/iteration_finish.html deleted file mode 100644 index 573ef01..0000000 --- a/docs.1/ref/iteration_finish.html +++ /dev/null @@ -1,47 +0,0 @@ - - - BOOST_PP_ITERATION_FINISH - - - - -
- The BOOST_PP_ITERATION_FINISH macro expands to the upper bound of the current file-iteration depth. -
-

Usage

-
- BOOST_PP_ITERATION_FINISH() -
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_ITERATING
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
-   #include BOOST_PP_ITERATE()
-
-   #endif
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1
-
-   start -> BOOST_PP_ITERATION_START()
-   iteration -> BOOST_PP_ITERATION()
-   finish -> BOOST_PP_ITERATION_FINISH()
-
-#endif
-
- - diff --git a/docs.1/ref/iteration_flags.html b/docs.1/ref/iteration_flags.html deleted file mode 100644 index 29f67d7..0000000 --- a/docs.1/ref/iteration_flags.html +++ /dev/null @@ -1,58 +0,0 @@ - - - BOOST_PP_ITERATION_FLAGS - - - - -
- The BOOST_PP_ITERATION_FLAGS macro retrieves flags associated with the current file-iteration depth. -
-

Usage

-
- BOOST_PP_ITERATION_FLAGS() -
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_ITERATING
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-   // 1st iteration:
-   #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 10, "file.h", 0x0001))
-   #include BOOST_PP_ITERATE()
-
-   // 2nd iteration:
-   #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 10, "file.h", 0x0002))
-   #include BOOST_PP_ITERATE()
-
-   #endif
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1 /* ... */ \
-   && BOOST_PP_ITERATION_FLAGS() == 0x0001      \
-   /**/
-
-   { 1st }
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1 /* ... */ \
-   && BOOST_PP_ITERATION_FLAGS() == 0x0002      \
-   /**/
-
-   { 2nd }
-
-#endif
-
- - diff --git a/docs.1/ref/iteration_limits.html b/docs.1/ref/iteration_limits.html deleted file mode 100644 index 3ef9810..0000000 --- a/docs.1/ref/iteration_limits.html +++ /dev/null @@ -1,48 +0,0 @@ - - - BOOST_PP_ITERATION_LIMITS - - - - -
- The BOOST_PP_ITERATION_LIMITS macro is a user-defined named external argument used by BOOST_PP_ITERATE.  - It denotes the lower and upper bounds of a file-iteration. -
-

Usage

-
- #define BOOST_PP_ITERATION_LIMITS (start, finish) -
-

Arguments

-
-
start
-
- The lower bound (inclusive) of a file-iteration.  - Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. -
-
finish
-
- The upper bound (inclusive) of a file-iteration.  - Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. -
-
-

Remarks

-
- Note that there is a whitespace character after the macro identifier. -
-
- This macro is part of the secondary method of passing arguments to BOOST_PP_ITERATE.  - The other part is BOOST_PP_FILENAME_x. Both start and finish are evaluated parameters.  - This implies that they may include simple arithmetic. -
-
- This macro is automatically undefined for reuse by a call to BOOST_PP_ITERATE. -
-

See Also

- - - diff --git a/docs.1/ref/iteration_params_x.html b/docs.1/ref/iteration_params_x.html deleted file mode 100644 index 455edf1..0000000 --- a/docs.1/ref/iteration_params_x.html +++ /dev/null @@ -1,66 +0,0 @@ - - - BOOST_PP_ITERATION_PARAMS_x - - - - -
- The BOOST_PP_ITERATION_PARAMS_x macro is a user-defined named external argument used by BOOST_PP_ITERATE.  - It denotes the lower bound, upper bound, and the filename of a file-iteration. It can optionally denote flags associated with a file-iteration as well. -
-

Usage

-
- #define BOOST_PP_ITERATION_PARAMS_x (c, (start, finish, filename [, flags])) -
-

Arguments

-
-
x
-
- The iteration depth of the next file-iteration.  - This value must be the current iteration depth + 1. -
-
c
-
- The number of parameters.  - If flags is specified, this value must be 4.  - Otherwise, it must be 3. -
-
start
-
- The lower bound (inclusive) of a file-iteration.  - Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. -
-
finish
-
- The upper bound (inclusive) of a file-iteration.  - Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. -
-
filename
-
- A quoted or angle-bracketed filename to used as the target of a file-iteration. -
-
[flags]
-
- A quoted or angle-bracketed filename to used as the target of a file-iteration. -
-
-

Remarks

-
- Note that there is a whitespace character after the macro identifier. -
-
- This macro is must be defined as an array of arguments in one of the two formats above (with or without flags). - It is the primary method of passing arguments to BOOST_PP_ITERATE.  - Both start and finish are evaluated parameters, which implies that simple arithmetic can be used. -
-
- This macro is automatically undefined for reuse by a call to BOOST_PP_ITERATE. -
-

See Also

- - - diff --git a/docs.1/ref/iteration_start.html b/docs.1/ref/iteration_start.html deleted file mode 100644 index ccee08e..0000000 --- a/docs.1/ref/iteration_start.html +++ /dev/null @@ -1,47 +0,0 @@ - - - BOOST_PP_ITERATION_START - - - - -
- The BOOST_PP_ITERATION_START macro expands to the lower bound of the current file-iteration depth. -
-

Usage

-
- BOOST_PP_ITERATION_START() -
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_ITERATING
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
-   #include BOOST_PP_ITERATE()
-
-   #endif
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1
-
-   start -> BOOST_PP_ITERATION_START()
-   iteration -> BOOST_PP_ITERATION()
-   finish -> BOOST_PP_ITERATION_FINISH()
-
-#endif
-
- - diff --git a/docs.1/ref/less.html b/docs.1/ref/less.html deleted file mode 100644 index a70a056..0000000 --- a/docs.1/ref/less.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_LESS - - - - -
- The BOOST_PP_LESS macro compares two values for lesser magnitude. -
-

Usage

-
- BOOST_PP_LESS(x, y) -
-

Arguments

-
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is less than y, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LESS_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/less.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/less.hpp>
-
-BOOST_PP_LESS(4, 3) // expands to 0
-BOOST_PP_LESS(3, 4) // expands to 1
-
- - diff --git a/docs.1/ref/less_d.html b/docs.1/ref/less_d.html deleted file mode 100644 index 691c0d1..0000000 --- a/docs.1/ref/less_d.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_LESS_D - - - - -
- The BOOST_PP_LESS_D macro compares two values for lesser magnitude.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LESS_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is less than y, this macro expands to 1.  - Otherwise, it expands to 0. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/less.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/less.hpp>
-#include <boost/preprocessor/list/filter.hpp>
-
-#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
-
-#define PRED(d, _, num) BOOST_PP_LESS_D(d, num, 3)
-
-BOOST_PP_LIST_FILTER(PRED, nil, LIST) // expands to (1, (2, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/less_equal.html b/docs.1/ref/less_equal.html deleted file mode 100644 index 1ba99a7..0000000 --- a/docs.1/ref/less_equal.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_LESS_EQUAL - - - - -
- The BOOST_PP_LESS_EQUAL macro compares two values for equality or lesser magnitude. -
-

Usage

-
- BOOST_PP_LESS_EQUAL(x, y) -
-

Arguments

-
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is lesser than or equal to y, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LESS_EQUAL_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/less_equal.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/less_equal.hpp>
-
-BOOST_PP_LESS_EQUAL(4, 3) // expands to 0
-BOOST_PP_LESS_EQUAL(5, 5) // expands to 1
-
- - diff --git a/docs.1/ref/less_equal_d.html b/docs.1/ref/less_equal_d.html deleted file mode 100644 index b39537e..0000000 --- a/docs.1/ref/less_equal_d.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_LESS_EQUAL_D - - - - -
- The BOOST_PP_LESS_EQUAL_D macro compares two values for equality or lesser magnitude.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LESS_EQUAL_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is less than or equal to y, this macro expands to 1.  - Otherwise, it expands to 0. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/less_equal.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/less_equal.hpp>
-#include <boost/preprocessor/list/filter.hpp>
-
-#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
-
-#define PRED(d, _, num) BOOST_PP_LESS_EQUAL_D(d, num, 4)
-
-BOOST_PP_LIST_FILTER(PRED, nil, LIST) // expands to (1, (2, (3, (4, BOOST_PP_NIL))))
-
- - diff --git a/docs.1/ref/limit_bool.html b/docs.1/ref/limit_bool.html deleted file mode 100644 index e4349e7..0000000 --- a/docs.1/ref/limit_bool.html +++ /dev/null @@ -1,31 +0,0 @@ - - - BOOST_PP_LIMIT_BOOL - - - - -
- The BOOST_PP_LIMIT_BOOL macro defines the maximum integer value that can be passed to BOOST_PP_BOOL. -
-

Usage

-
- BOOST_PP_LIMIT_BOOL -
-

Remarks

-
- If BOOST_PP_CONFIG_FLAGS does not include BOOST_PP_CONFIG_EDG, - this macro expands to BOOST_PP_INFINITY.  - Otherwise it expands to BOOST_PP_LIMIT_MAG. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_dim.html b/docs.1/ref/limit_dim.html deleted file mode 100644 index 81cc7c6..0000000 --- a/docs.1/ref/limit_dim.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_DIM - - - - -
- The BOOST_PP_LIMIT_DIM macro defines the maximum number of available BOOST_PP_REPEAT dimensions. -
-

Usage

-
- BOOST_PP_LIMIT_DIM -
-

Remarks

-
- This macro currently expands to 3. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_for.html b/docs.1/ref/limit_for.html deleted file mode 100644 index 4f9b884..0000000 --- a/docs.1/ref/limit_for.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_FOR - - - - -
- The BOOST_PP_LIMIT_FOR macro defines the maximum number of BOOST_PP_FOR repetitions. -
-

Usage

-
- BOOST_PP_LIMIT_FOR -
-

Remarks

-
- This macro currently expands to 256. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_iteration.html b/docs.1/ref/limit_iteration.html deleted file mode 100644 index 707b1fe..0000000 --- a/docs.1/ref/limit_iteration.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_ITERATION - - - - -
- The BOOST_PP_LIMIT_ITERATION macro defines the maximum number of local and file iterations. -
-

Usage

-
- BOOST_PP_LIMIT_ITERATION -
-

Remarks

-
- This macro currently expands to 256. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_iteration_dim.html b/docs.1/ref/limit_iteration_dim.html deleted file mode 100644 index 557389d..0000000 --- a/docs.1/ref/limit_iteration_dim.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_ITERATION_DIM - - - - -
- The BOOST_PP_LIMIT_ITERATION_DIM macro defines the maximum depth of file-iteration. -
-

Usage

-
- BOOST_PP_LIMIT_ITERATION_DIM -
-

Remarks

-
- This macro currently expands to 5. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_mag.html b/docs.1/ref/limit_mag.html deleted file mode 100644 index be7006e..0000000 --- a/docs.1/ref/limit_mag.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_MAG - - - - -
- The BOOST_PP_LIMIT_MAG macro defines the maximum input and result magnitudes of arithmetic. -
-

Usage

-
- BOOST_PP_LIMIT_MAG -
-

Remarks

-
- This macro currently expands to 256. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_repeat.html b/docs.1/ref/limit_repeat.html deleted file mode 100644 index 0603323..0000000 --- a/docs.1/ref/limit_repeat.html +++ /dev/null @@ -1,25 +0,0 @@ - - - BOOST_PP_LIMIT_REPEAT - - - - -
- The BOOST_PP_LIMIT_REPEAT macro defines the maximum number of repetitions supported by each BOOST_PP_REPEAT dimension. -
-

Usage

-
- BOOST_PP_LIMIT_REPEAT -
-

Remarks

-
- If BOOST_PP_CONFIG_UNROLLED is 1, this macro currently expands to 128.  - Otherwise, it expands to 256. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_slot_count.html b/docs.1/ref/limit_slot_count.html deleted file mode 100644 index d9382ba..0000000 --- a/docs.1/ref/limit_slot_count.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_SLOT_COUNT - - - - -
- The BOOST_PP_LIMIT_SLOT_COUNT macro defines the number of available evaluated slots. -
-

Usage

-
- BOOST_PP_LIMIT_SLOT_COUNT -
-

Remarks

-
- This macro currently expands to 5. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_slot_sig.html b/docs.1/ref/limit_slot_sig.html deleted file mode 100644 index ebf1ca9..0000000 --- a/docs.1/ref/limit_slot_sig.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_SLOT_SIG - - - - -
- The BOOST_PP_LIMIT_SLOT_SIG macro defines the number of significant base-10 digits that can be evaluated by the slot mechanism. -
-

Usage

-
- BOOST_PP_LIMIT_SLOT_SIG -
-

Remarks

-
- This macro currently expands to 10. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_tuple.html b/docs.1/ref/limit_tuple.html deleted file mode 100644 index a935391..0000000 --- a/docs.1/ref/limit_tuple.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_TUPLE - - - - -
- The BOOST_PP_LIMIT_TUPLE macro defines the maximum tuple size supported by the library. -
-

Usage

-
- BOOST_PP_LIMIT_TUPLE -
-

Remarks

-
- This macro currently expands to 25. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/limit_while.html b/docs.1/ref/limit_while.html deleted file mode 100644 index 84eac8d..0000000 --- a/docs.1/ref/limit_while.html +++ /dev/null @@ -1,24 +0,0 @@ - - - BOOST_PP_LIMIT_WHILE - - - - -
- The BOOST_PP_LIMIT_WHILE macro defines the maximum number of BOOST_PP_WHILE iterations. -
-

Usage

-
- BOOST_PP_LIMIT_WHILE -
-

Remarks

-
- This macro currently expands to 256. -
-

Requirements

-
- Header:  <boost/preprocessor/config/limits.hpp> -
- - diff --git a/docs.1/ref/line.html b/docs.1/ref/line.html deleted file mode 100644 index 5a5127f..0000000 --- a/docs.1/ref/line.html +++ /dev/null @@ -1,103 +0,0 @@ - - - BOOST_PP_LINE - - - - -
- The BOOST_PP_LINE macro places notes encoded as line directives in the preprocessing output. -
-

Usage

-
- #line BOOST_PP_LINE(line, file) -
-

Arguments

-
-
line
-
- The new line number of the trailing line.  - The predefined macro __LINE__ is commonly used. -
-
file
-
- Typically the name of the current file.  - However, any informative text will work.  - This text is internally stringized, so quotation marks are unnecessary. -
-
-

Remarks

-
- If the macro BOOST_PP_CONFIG_EXTENDED_LINE_INFO is defined as 1 and a file-iteration - is in progress, this macro will automatically insert debugging information about the state of file-iteration.  - This information will show the all of the current iteration values with the inner most iteration last. -
-
- This information is useful when errors might be spanning multiple iterations of the same source text.  - Finding any errors is sometimes less than straightforward.  - Use of this macro can provide information to make this much easier.  - For example, instead of getting several errors like this: -
- "file.hpp", line 2: error: expected a ";"
- "file.hpp", line 4: error: improperly terminated macro invocation
-
- You might get something like this instead.... -
- "file.hpp [1]", line 2: error: expected a ";"
- "file.hpp [5]", line 4: error: improperly terminated macro invocation
-
- It is immediately evident that this error is spanning multiple iterations of the same source text.  - If it wasn't, the same errors would occur on each iteration. -
-
- It must be noted however, that some compilers don't like filenames that aren't actually files.  - Those compilers typically issues warnings about the bad filename.  - This makes it a good idea to only define BOOST_PP_CONFIG_EXTENDED_LINE_INFO to 1 only when debugging. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/debug/line.hpp> -
-

Sample Code

-
-// sample.cpp
-
-#if !defined(BOOST_PP_IS_ITERATING)
-
-   #define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 1
-
-   #include <boost/preprocessor/arithmetic/dec.hpp>
-   #include <boost/preprocessor/cat.hpp>
-   #include <boost/preprocessor/debug/line.hpp>
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-   namespace sample {
-
-   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 5, "sample.cpp"))
-   #include BOOST_PP_ITERATE()
-
-   } // sample
-
-   int main(void) {
-      return 0;
-   }
-
-#else
-
-   #line BOOST_PP_LINE(1, sample.cpp)
-
-   int BOOST_PP_CAT(x, BOOST_PP_ITERATION())); // extra parenthesis
-   
-   struct BOOST_PP_CAT(s, BOOST_PP_DEC(BOOST_PP_ITERATION()) {
-      // missing a parenthesis
-      // ...
-   };
-
-#endif
-
- - diff --git a/docs.1/ref/list_append.html b/docs.1/ref/list_append.html deleted file mode 100644 index 095a373..0000000 --- a/docs.1/ref/list_append.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_LIST_APPEND - - - - -
- The BOOST_PP_LIST_APPEND macro appends two lists. -
-

Usage

-
- BOOST_PP_LIST_APPEND(a, b) -
-

Arguments

-
-
a
-
- The first list. -
-
b
-
- The second list. -
-
-

Remarks

-
- This macro appends two lists.  - For example, if a is (1, (2, (3, BOOST_PP_NIL))) and b is (4, (5, BOOST_PP_NIL)), - this macro will expand to: -
- (1, (2, (3, (4, (5, BOOST_PP_NIL))))) -
-
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_APPEND_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/append.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/append.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (x, (y, (z, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_APPEND(L1, L2)
-   // expands to (a, (b, (c, (x, (y, (z, BOOST_PP_NIL))))))
-
- - diff --git a/docs.1/ref/list_append_d.html b/docs.1/ref/list_append_d.html deleted file mode 100644 index d0cf977..0000000 --- a/docs.1/ref/list_append_d.html +++ /dev/null @@ -1,86 +0,0 @@ - - - BOOST_PP_LIST_APPEND_D - - - - -
- The BOOST_PP_LIST_APPEND_D macro appends two lists.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_APPEND_D(d, a, b) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
a
-
- The first list. -
-
b
-
- The second list. -
-
-

Remarks

-
- This macro appends two lists.  - For example, if a is (1, (2, (3, BOOST_PP_NIL))) and b is (4, (5, BOOST_PP_NIL)), - this macro will expand to: -
- (1, (2, (3, (4, (5, BOOST_PP_NIL))))) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/append.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/list/append.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define LIST (1, (2, (3, BOOST_PP_NIL)))
-
-#define PRED(d, state) BOOST_PP_TUPLE_ELEM(3, 1, state)
-
-#define OP(d, state) /* .................. */ \
-   (                                          \
-      BOOST_PP_LIST_APPEND_D(                 \
-         d, BOOST_PP_TUPLE_ELEM(3, 0, state), \
-         BOOST_PP_TUPLE_ELEM(3, 2, state)     \
-      ),                                      \
-      BOOST_PP_DEC(                           \
-         BOOST_PP_TUPLE_ELEM(3, 1, state)     \
-      ),                                      \
-      BOOST_PP_TUPLE_ELEM(3, 2, state)        \
-   )                                          \
-   /**/
-
-#define LIST_MULTIPLY(c, list) /* ... */ \
-   BOOST_PP_TUPLE_ELEM(                  \
-      3, 0,                              \
-      BOOST_PP_WHILE(                    \
-         PRED, OP,                       \
-         (BOOST_PP_NIL, c, list)         \
-      )                                  \
-   )                                     \
-   /**/
-
-LIST_MULTIPLY(3, LIST)
-   // expands to (1, (2, (3, (1, (2, (3, (1, (2, (3, BOOST_PP_NIL)))))))))
-
- - diff --git a/docs.1/ref/list_at.html b/docs.1/ref/list_at.html deleted file mode 100644 index a1aea59..0000000 --- a/docs.1/ref/list_at.html +++ /dev/null @@ -1,51 +0,0 @@ - - - BOOST_PP_LIST_AT - - - - -
- The BOOST_PP_LIST_AT macro extracts an element in a list. -
-

Usage

-
- BOOST_PP_LIST_AT(list, index) -
-

Arguments

-
-
list
-
- The list from which a element is to be extracted.  - This list must have at least index + 1 elements. -
-
index
-
- The zero-based position in the list of the element to be extracted. -
-
-

Remarks

-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_AT_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/at.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/at.hpp>
-
-#define LIST (a, (b, (c, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_AT(LIST, 0) // expands to a
-BOOST_PP_LIST_AT(LIST, 2) // expands to c
-
- - diff --git a/docs.1/ref/list_at_d.html b/docs.1/ref/list_at_d.html deleted file mode 100644 index 72c1628..0000000 --- a/docs.1/ref/list_at_d.html +++ /dev/null @@ -1,53 +0,0 @@ - - - BOOST_PP_LIST_AT_D - - - - -
- The BOOST_PP_LIST_AT_D macro extracts an element in a list.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_AT_D(d, list, index) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
list
-
- The list from which a element is to be extracted.  - This list must have at least index + 1 elements. -
-
index
-
- The zero-based position in the list of the element to be extracted. -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/at.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/list/at.hpp>
-
-#define LIST (7, (2, (0, (1, BOOST_PP_NIL))))
-
-#define PRED(d, state) BOOST_PP_LIST_AT_D(d, state, 0)
-#define OP(d, state) BOOST_PP_LIST_REST(state)
-
-BOOST_PP_WHILE(PRED, OP, LIST) // expands to (0, (1, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/list_cat.html b/docs.1/ref/list_cat.html deleted file mode 100644 index 354e746..0000000 --- a/docs.1/ref/list_cat.html +++ /dev/null @@ -1,48 +0,0 @@ - - - BOOST_PP_LIST_CAT - - - - -
- The BOOST_PP_LIST_CAT macro concatenates all elements in a list. -
-

Usage

-
- BOOST_PP_LIST_CAT(list) -
-

Arguments

-
-
list
-
- The list whose elements are to be concatenated. -
-
-

Remarks

-
- Elements are concatenated left-to-right starting with index 0. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_CAT_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/cat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/cat.hpp>
-
-#define LIST (a, (b, (c, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_CAT(LIST) // expands to abc
-
- - diff --git a/docs.1/ref/list_cat_d.html b/docs.1/ref/list_cat_d.html deleted file mode 100644 index 829a947..0000000 --- a/docs.1/ref/list_cat_d.html +++ /dev/null @@ -1,57 +0,0 @@ - - - BOOST_PP_LIST_CAT_D - - - - -
- The BOOST_PP_LIST_CAT_D macro concatenates all elements in a list.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_CAT_D(d, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
list
-
- The list whose elements are to be concatenated. -
-
-

Remarks

-
- Elements are concatenated left-to-right starting with index 0. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/cat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/cat.hpp>
-#include <boost/preprocessor/list/fold_left.hpp>
-
-#define LISTS /* ............. */ \
-   ((a, (b, BOOST_PP_NIL)),       \
-      ((d, (e, BOOST_PP_NIL)),    \
-         ((e, (f, BOOST_PP_NIL)), \
-            BOOST_PP_NIL)))       \
-   /**/
-
-#define OP(d, state, x) BOOST_PP_CAT(state, BOOST_PP_LIST_CAT_D(d, x))
-
-BOOST_PP_LIST_FOLD_LEFT(OP, _, LISTS) // expands to _abcdef
-
- - diff --git a/docs.1/ref/list_cons.html b/docs.1/ref/list_cons.html deleted file mode 100644 index ed038d7..0000000 --- a/docs.1/ref/list_cons.html +++ /dev/null @@ -1,77 +0,0 @@ - - - BOOST_PP_LIST_CONS - - - - -
- The BOOST_PP_LIST_CONS macro is a list constructor. -
-

Usage

-
- BOOST_PP_LIST_CONS(head, tail) -
-

Arguments

-
-
head
-
- An element in a list. -
-
tail
-
- Either a list, BOOST_PP_LIST_NIL, or BOOST_PP_NIL. -
-
-

Remarks

-
- This macro appends a new head to an existing list or creates a list from BOOST_PP_LIST_NIL. -
-
- This macro is no longer necessary.  - For example... -
- BOOST_PP_LIST_CONS(a, BOOST_PP_LIST_CONS(b, BOOST_PP_LIST_NIL))) -
- ...is just an explicit way of writing the following: -
- (a, (b, BOOST_PP_NIL)) -
- Because of this, this macro is deprecated. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/adt.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-
-#define OLD /* ........... */ \
-   BOOST_PP_LIST_CONS(        \
-      a,                      \
-      BOOST_PP_LIST_CONS(     \
-         b,                   \
-         BOOST_PP_LIST_CONS(  \
-            c,                \
-            BOOST_PP_LIST_NIL \
-         )                    \
-      )                       \
-   )                          \
-   /**/
-
-#define NEW (a, (b, (c, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
-   // expands to a == a
-
-BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_REST(NEW)
-   // expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/list_enum.html b/docs.1/ref/list_enum.html deleted file mode 100644 index 55a8023..0000000 --- a/docs.1/ref/list_enum.html +++ /dev/null @@ -1,52 +0,0 @@ - - - BOOST_PP_LIST_ENUM - - - - -
- The BOOST_PP_LIST_ENUM macro converts a list to a comma-separated list. -
-

Usage

-
- BOOST_PP_LIST_ENUM(list) -
-

Arguments

-
-
list
-
- The list to be converted. -
-
-

Remarks

-
- If list is, for example, (a, (b, (c, BOOST_PP_NIL))), - this macro will produce: -
- a, b, c -
-
-
- Previously, this macro could not be used inside BOOST_PP_FOR.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_ENUM_R in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/enum.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/enum.hpp>
-
-#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
-
-BOOST_PP_LIST_ENUM(LIST) // expands to w, x, y, z
-
- - diff --git a/docs.1/ref/list_enum_r.html b/docs.1/ref/list_enum_r.html deleted file mode 100644 index 8fa768b..0000000 --- a/docs.1/ref/list_enum_r.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_LIST_ENUM_R - - - - -
- The BOOST_PP_LIST_ENUM_R macro converts a list to a comma-separated list.  - It reenters BOOST_PP_FOR with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_ENUM_R(r, list) -
-

Arguments

-
-
r
-
- The next available BOOST_PP_FOR repetition. -
-
list
-
- The list to be converted. -
-
-

Remarks

-
- If list is, for example, (a, (b, (c, BOOST_PP_NIL))), - this macro will produce: -
- a, b, c -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/enum.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-#include <boost/preprocessor/repetition/for.hpp>
-#include <boost/preprocessor/list/enum.hpp>
-
-#define LIST (x, (y, (z, BOOST_PP_NIL)))
-
-#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
-#define OP(r, state) BOOST_PP_LIST_REST(state)
-#define MACRO(r, state) [ BOOST_PP_LIST_ENUM_R(r, state) ]
-
-BOOST_PP_FOR(LIST, PRED, OP, MACRO)
-   // expands to [x, y, z] [y, z] [z]
-
- - diff --git a/docs.1/ref/list_filter.html b/docs.1/ref/list_filter.html deleted file mode 100644 index 2ce16df..0000000 --- a/docs.1/ref/list_filter.html +++ /dev/null @@ -1,65 +0,0 @@ - - - BOOST_PP_LIST_FILTER - - - - -
- The BOOST_PP_LIST_FILTER macro filters a list according to a supplied criterion. -
-

Usage

-
- BOOST_PP_LIST_FILTER(pred, data, list) -
-

Arguments

-
-
pred
-
- A ternary predicate of the form pred(d, data, elem).  - This predicate is expanded by BOOST_PP_LIST_FILTER for each element in list with the next available BOOST_PP_WHILE iteration, - the auxiliary data, and the current element in list.  - This macro must return a integral value in the range of 0 to BOOST_PP_LIMIT_MAG.  - If this predicate expands to non-zero for a certain element, that element is included in the resulting list. -
-
data
-
- Auxiliary data passed to pred. -
-
list
-
- The list to be filtered. -
-
-

Remarks

-
- This macro expands pred for each element in list.  - It builds a new list out of each element for which pred returns non-zero. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_FILTER_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/filter.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/less_equal.hpp>
-#include <boost/preprocessor/list/filter.hpp>
-
-#define LIST (1, (3, (2, (5, BOOST_PP_NIL))))
-
-#define PRED(d, data, elem) BOOST_PP_LESS_EQUAL(elem, data)
-
-BOOST_PP_LIST_FILTER(PRED, 3, LIST) // expands to (1, (3, (2, BOOST_PP_NIL)))
-
- - diff --git a/docs.1/ref/list_filter_d.html b/docs.1/ref/list_filter_d.html deleted file mode 100644 index de82dc0..0000000 --- a/docs.1/ref/list_filter_d.html +++ /dev/null @@ -1,76 +0,0 @@ - - - BOOST_PP_LIST_FILTER_D - - - - -
- The BOOST_PP_LIST_FILTER_D macro filters a list according to a supplied criterion.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FILTER_D(d, pred, data, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
pred
-
- A ternary predicate of the form pred(d, data, elem).  - This predicate is expanded by BOOST_PP_LIST_FILTER for each element in list with the next available BOOST_PP_WHILE iteration, - the auxiliary data, and the current element in list.  - This macro must return a integral value in the range of 0 to BOOST_PP_LIMIT_MAG.  - If this predicate expands to non-zero for a certain element, that element is included in the resulting list. -
-
data
-
- Auxiliary data passed to pred. -
-
list
-
- The list to be filtered. -
-
-

Remarks

-
- This macro expands pred for each element in list.  - It builds a new list out of each element for which pred returns non-zero. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/filter.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/less_equal.hpp>
-#include <boost/preprocessor/list/filter.hpp>
-#include <boost/preprocessor/list/fold_right.hpp>
-
-#define A (1, (2, (3, (4, BOOST_PP_NIL))))
-#define B (A, (A, (A, (A, BOOST_PP_NIL))))
-
-#define PRED(d, data, x) BOOST_PP_LESS_EQUAL(x, data)
-#define OP(d, state, x) (BOOST_PP_LIST_FILTER_D(d, PRED, 2, x), state)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, B)
-/*
-   expands to:
-   ((1, (2, BOOST_PP_NIL)), 
-   ((1, (2, BOOST_PP_NIL)), 
-   ((1, (2, BOOST_PP_NIL)), 
-   ((1, (2, BOOST_PP_NIL)), 
-      BOOST_PP_NIL))))
-*/
-
- - diff --git a/docs.1/ref/list_first.html b/docs.1/ref/list_first.html deleted file mode 100644 index 831eec0..0000000 --- a/docs.1/ref/list_first.html +++ /dev/null @@ -1,52 +0,0 @@ - - - BOOST_PP_LIST_FIRST - - - - -
- The BOOST_PP_LIST_FIRST macro expands to the head of a list. -
-

Usage

-
- BOOST_PP_LIST_FIRST(list) -
-

Arguments

-
-
list
-
- A non-nil list. -
-
-

Requirements

-
- Header:  <boost/preprocessor/list/adt.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-
-#define OLD /* ........... */ \
-   BOOST_PP_LIST_CONS(        \
-      a,                      \
-      BOOST_PP_LIST_CONS(     \
-         b,                   \
-         BOOST_PP_LIST_CONS(  \
-            c,                \
-            BOOST_PP_LIST_NIL \
-         )                    \
-      )                       \
-   )                          \
-   /**/
-
-#define NEW (a, (b, (c, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
-   // expands to a == a
-
-BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_REST(NEW)
-   // expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/list_first_n.html b/docs.1/ref/list_first_n.html deleted file mode 100644 index d843cfa..0000000 --- a/docs.1/ref/list_first_n.html +++ /dev/null @@ -1,52 +0,0 @@ - - - BOOST_PP_LIST_FIRST_N - - - - -
- The BOOST_PP_LIST_FIRST_N macro expands to a list of the first count elements of a list. -
-

Usage

-
- BOOST_PP_LIST_FIRST_N(count, list) -
-

Arguments

-
-
count
-
- The number of elements to extract. -
-
list
-
- The list from which the elements are extracted. -
-
-

Remarks

-
- This macro extracts count elements from the beginning of list and returns them as a list -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_FIRST_N_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/first_n.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/first_n.hpp>
-
-#define LIST (a, (b, (c, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_FIRST_N(2, LIST) // expands to (a, (b, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/list_first_n_d.html b/docs.1/ref/list_first_n_d.html deleted file mode 100644 index 9332c46..0000000 --- a/docs.1/ref/list_first_n_d.html +++ /dev/null @@ -1,61 +0,0 @@ - - - BOOST_PP_LIST_FIRST_N_D - - - - -
- The BOOST_PP_LIST_FIRST_N_D macro expands to a list of the first count elements of a list.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FIRST_N_D(d, count, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
count
-
- The number of elements to extract. -
-
list
-
- The list from which the elements are extracted. -
-
-

Remarks

-
- This macro extracts count elements from the beginning of list and returns them as a list -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/first_n.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/first_n.hpp>
-#include <boost/preprocessor/list/fold_right.hpp>
-
-#define L1 (a, (b, (c, (d, BOOST_PP_NIL))))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_FIRST_N_D(d, 2, x), state)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to...
-   ((a, (b, BOOST_PP_NIL)), ((a, (b, BOOST_PP_NIL)),
-   ((a, (b, BOOST_PP_NIL)) , BOOST_PP_NIL )))
-*/
-
- - diff --git a/docs.1/ref/list_fold_left.html b/docs.1/ref/list_fold_left.html deleted file mode 100644 index 8dcfcf9..0000000 --- a/docs.1/ref/list_fold_left.html +++ /dev/null @@ -1,65 +0,0 @@ - - - BOOST_PP_LIST_FOLD_LEFT - - - - -
- The BOOST_PP_LIST_FOLD_LEFT macro folds (or accumulates) the elements of a list left-to-right. -
-

Usage

-
- BOOST_PP_LIST_FOLD_LEFT(op, state, list) -
-

Arguments

-
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 0), 1), 2) -
-
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_FOLD_LEFT_d in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_left.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_left.hpp>
-
-#define LIST (a, (b, (c, BOOST_PP_NIL)))
-
-#define OP(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_LEFT(OP, _, LIST) // expands to _abc
-
- - diff --git a/docs.1/ref/list_fold_left_2nd.html b/docs.1/ref/list_fold_left_2nd.html deleted file mode 100644 index 9745d84..0000000 --- a/docs.1/ref/list_fold_left_2nd.html +++ /dev/null @@ -1,65 +0,0 @@ - - - BOOST_PP_LIST_FOLD_LEFT_2ND - - - - -
- The BOOST_PP_LIST_FOLD_LEFT_2ND macro folds (or accumulates) the elements of a list left-to-right. -
-

Usage

-
- BOOST_PP_LIST_FOLD_LEFT_2ND(op, state, list) -
-

Arguments

-
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 0), 1), 2) -
-
-
- This macro is deprecated.  - Use BOOST_PP_LIST_FOLD_LEFT_d instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_left.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_left.hpp>
-
-#define LIST (a, (b, (c, BOOST_PP_NIL)))
-
-#define OP(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_LEFT_2ND(OP, _, LIST) // expands to _abc
-
- - diff --git a/docs.1/ref/list_fold_left_2nd_d.html b/docs.1/ref/list_fold_left_2nd_d.html deleted file mode 100644 index c1b45ea..0000000 --- a/docs.1/ref/list_fold_left_2nd_d.html +++ /dev/null @@ -1,76 +0,0 @@ - - - BOOST_PP_LIST_FOLD_LEFT_2ND_D - - - - -
- The BOOST_PP_LIST_FOLD_LEFT_2ND_D macro folds (or accumulates) the elements of a list left-to-right.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOLD_LEFT_2ND_D(d, op, state, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 0), 1), 2) -
-
-
- This macro has been superceded by BOOST_PP_LIST_FOLD_LEFT_d and is deprecated.  - It only allows a single reentry into BOOST_PP_LIST_FOLD_LEFT. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_left.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_left.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_FOLD_LEFT_2ND_D(d, OP_2, _, x), state)
-#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_LEFT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to:
-   (_abc , (_abc , (_abc , BOOST_PP_NIL)))
-*/
-
- - diff --git a/docs.1/ref/list_fold_left_d.html b/docs.1/ref/list_fold_left_d.html deleted file mode 100644 index ddbc506..0000000 --- a/docs.1/ref/list_fold_left_d.html +++ /dev/null @@ -1,71 +0,0 @@ - - - BOOST_PP_LIST_FOLD_LEFT_d - - - - -
- The BOOST_PP_LIST_FOLD_LEFT_d macro folds (or accumulates) the elements of a list left-to-right.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOLD_LEFT_ ## d(op, state, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 0), 1), 2) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_left.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_left.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_FOLD_LEFT_ ## d(OP_2, _, x), state)
-#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_LEFT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to:
-   (_abc, (_abc, (_abc, BOOST_PP_NIL)))
-*/
-
- - diff --git a/docs.1/ref/list_fold_left_d_old.html b/docs.1/ref/list_fold_left_d_old.html deleted file mode 100644 index 577cccc..0000000 --- a/docs.1/ref/list_fold_left_d_old.html +++ /dev/null @@ -1,76 +0,0 @@ - - - BOOST_PP_LIST_FOLD_LEFT_D - - - - -
- The BOOST_PP_LIST_FOLD_LEFT_D macro folds (or accumulates) the elements of a list left-to-right.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOLD_LEFT_D(d, op, state, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 0), 1), 2) -
-
-
- This macro has been superceded by BOOST_PP_LIST_FOLD_LEFT_d and is deprecated.  - It only allows a single reentry into BOOST_PP_LIST_FOLD_LEFT. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_left.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_left.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_FOLD_LEFT_D(d, OP_2, _, x), state)
-#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_LEFT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to:
-   (_abc, (_abc, (_abc, BOOST_PP_NIL)))
-*/
-
- - diff --git a/docs.1/ref/list_fold_right.html b/docs.1/ref/list_fold_right.html deleted file mode 100644 index bbf726e..0000000 --- a/docs.1/ref/list_fold_right.html +++ /dev/null @@ -1,69 +0,0 @@ - - - BOOST_PP_LIST_FOLD_RIGHT - - - - -
- The BOOST_PP_LIST_FOLD_RIGHT macro folds (or accumulates) the elements of a list right-to-left. -
-

Usage

-
- BOOST_PP_LIST_FOLD_RIGHT(op, state, list) -
-

Arguments

-
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- This macro does not have the same signature as it previously did.  - The arguments have been swapped to provide a uniform interface with BOOST_PP_LIST_FOLD_LEFT. -
-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 2), 1), 0) -
-
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_FOLD_RIGHT_d in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_right.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_right.hpp>
-
-#define LIST (a, (b, (c, BOOST_PP_NIL)))
-
-#define OP(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, _, LIST) // expands to _cba
-
- - diff --git a/docs.1/ref/list_fold_right_2nd.html b/docs.1/ref/list_fold_right_2nd.html deleted file mode 100644 index 73e9862..0000000 --- a/docs.1/ref/list_fold_right_2nd.html +++ /dev/null @@ -1,69 +0,0 @@ - - - BOOST_PP_LIST_FOLD_RIGHT_2ND - - - - -
- The BOOST_PP_LIST_FOLD_RIGHT_2ND macro folds (or accumulates) the elements of a list right-to-left. -
-

Usage

-
- BOOST_PP_LIST_FOLD_RIGHT_2ND(op, state, list) -
-

Arguments

-
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- This macro does not have the same signature as it previously did.  - The arguments have been swapped to provide a uniform interface with BOOST_PP_LIST_FOLD_LEFT. -
-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 0), 1), 2) -
-
-
- This macro is deprecated.  - Use BOOST_PP_LIST_FOLD_RIGHT_d instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_right.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_right.hpp>
-
-#define LIST (a, (b, (c, BOOST_PP_NIL)))
-
-#define OP(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_RIGHT_2ND(OP, _, LIST) // expands to _cba
-
- - diff --git a/docs.1/ref/list_fold_right_2nd_d.html b/docs.1/ref/list_fold_right_2nd_d.html deleted file mode 100644 index a63b716..0000000 --- a/docs.1/ref/list_fold_right_2nd_d.html +++ /dev/null @@ -1,76 +0,0 @@ - - - BOOST_PP_LIST_FOLD_RIGHT_2ND_D - - - - -
- The BOOST_PP_LIST_FOLD_RIGHT_2ND_D macro folds (or accumulates) the elements of a list right-to-left.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOLD_RIGHT_2ND_D(d, op, state, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 0), 1), 2) -
-
-
- This macro has been superceded by BOOST_PP_LIST_FOLD_RIGHT_d and is deprecated.  - It only allows a single reentry into BOOST_PP_LIST_FOLD_RIGHT. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_right.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_right.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_FOLD_RIGHT_2ND_D(d, OP_2, _, x), state)
-#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to:
-   (_cba , (_cba , (_cba , BOOST_PP_NIL)))
-*/
-
- - diff --git a/docs.1/ref/list_fold_right_d.html b/docs.1/ref/list_fold_right_d.html deleted file mode 100644 index 19858c0..0000000 --- a/docs.1/ref/list_fold_right_d.html +++ /dev/null @@ -1,71 +0,0 @@ - - - BOOST_PP_LIST_FOLD_RIGHT_d - - - - -
- The BOOST_PP_LIST_FOLD_RIGHT_d macro folds (or accumulates) the elements of a list right-to-left.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOLD_RIGHT_ ## d(op, state, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 2), 1), 0) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_right.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_right.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_FOLD_RIGHT_ ## d(OP_2, _, x), state)
-#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to:
-   (_cba, (_cba, (_cba, BOOST_PP_NIL)))
-*/
-
- - diff --git a/docs.1/ref/list_fold_right_d_old.html b/docs.1/ref/list_fold_right_d_old.html deleted file mode 100644 index 30570c3..0000000 --- a/docs.1/ref/list_fold_right_d_old.html +++ /dev/null @@ -1,80 +0,0 @@ - - - BOOST_PP_LIST_FOLD_RIGHT_D - - - - -
- The BOOST_PP_LIST_FOLD_RIGHT_D macro folds (or accumulates) the elements of a list right-to-left.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOLD_RIGHT_D(d, op, state, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
op
-
- A ternary operation of the form op(d, state, elem).  - This macro is called for each element in list--each time returning a new state.  - This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, - the current state, and the current element. -
-
state
-
- The initial state of the fold. -
-
list
-
- The list to be folded. -
-
-

Remarks

-
- This macro does not have the same signature as it previously did.  - The arguments have been swapped to provide a uniform interface with BOOST_PP_LIST_FOLD_LEFT. -
-
- For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: -
- op(d, op(d, op(d, state, 2), 1), 0) -
-
-
- This macro has been superceded by BOOST_PP_LIST_FOLD_RIGHT_d and is deprecated.  - It only allows a single reentry into BOOST_PP_LIST_FOLD_RIGHT. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/fold_right.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/fold_right.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_FOLD_RIGHT_D(d, OP_2, _, x), state)
-#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to:
-   (_cba, (_cba, (_cba, BOOST_PP_NIL)))
-*/
-
- - diff --git a/docs.1/ref/list_for_each.html b/docs.1/ref/list_for_each.html deleted file mode 100644 index 446415d..0000000 --- a/docs.1/ref/list_for_each.html +++ /dev/null @@ -1,65 +0,0 @@ - - - BOOST_PP_LIST_FOR_EACH - - - - -
- The BOOST_PP_LIST_FOR_EACH macro repeats a macro for each element in a list. -
-

Usage

-
- BOOST_PP_LIST_FOR_EACH(macro, data, list) -
-

Arguments

-
-
macro
-
- A ternary macro of the form macro(r, data, elem).  - This macro is expanded by BOOST_PP_LIST_FOR_EACH with each element in list.  - It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, and the current element. -
-
data
-
- Auxiliary data passed to macro. -
-
list
-
- The list for which macro will be invoked on each element. -
-
-

Remarks

-
- This macro is a repetition construct.  - If list is (a, (b, (c, BOOST_PP_NIL))), it expands to the sequence: -
- macro(r, data, a) macro(r, data, b) macro(r, data, c) -
-
-
- Previously, this macro could not be used inside BOOST_PP_FOR.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_FOR_EACH_R in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/for_each.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/for_each.hpp>
-
-#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
-
-#define MACRO(r, data, elem) BOOST_PP_CAT(elem, data)
-
-BOOST_PP_LIST_FOR_EACH(MACRO, _, LIST) // expands to w_ x_ y_ z_
-
- - diff --git a/docs.1/ref/list_for_each_i.html b/docs.1/ref/list_for_each_i.html deleted file mode 100644 index a55474e..0000000 --- a/docs.1/ref/list_for_each_i.html +++ /dev/null @@ -1,65 +0,0 @@ - - - BOOST_PP_LIST_FOR_EACH_I - - - - -
- The BOOST_PP_LIST_FOR_EACH_I macro repeats a macro for each element in a list. -
-

Usage

-
- BOOST_PP_LIST_FOR_EACH_I(macro, data, list) -
-

Arguments

-
-
macro
-
- A macro of the form macro(r, data, i, elem).  - This macro is expanded by BOOST_PP_LIST_FOR_EACH with each element in list.  - It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, the index of the current element, and the current element. -
-
data
-
- Auxiliary data passed to macro. -
-
list
-
- The list for which macro will be invoked on each element. -
-
-

Remarks

-
- This macro is a repetition construct.  - If list is (a, (b, (c, BOOST_PP_NIL))), it expands to the sequence: -
- macro(r, data, 0, a) macro(r, data, 1, b) macro(r, data, 2, c) -
-
-
- Previously, this macro could not be used inside BOOST_PP_FOR.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_FOR_EACH_I_R in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/for_each_i.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/for_each_i.hpp>
-
-#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
-
-#define MACRO(r, data, i, elem) BOOST_PP_CAT(elem, BOOST_PP_CAT(data, i))
-
-BOOST_PP_LIST_FOR_EACH_I(MACRO, _, LIST) // expands to w_0 x_1 y_2 z_3
-
- - diff --git a/docs.1/ref/list_for_each_i_r.html b/docs.1/ref/list_for_each_i_r.html deleted file mode 100644 index b575d29..0000000 --- a/docs.1/ref/list_for_each_i_r.html +++ /dev/null @@ -1,72 +0,0 @@ - - - BOOST_PP_LIST_FOR_EACH_I_R - - - - -
- The BOOST_PP_LIST_FOR_EACH_I_R macro repeats a macro for each element in a list.  - It reenters BOOST_PP_FOR with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) -
-

Arguments

-
-
r
-
- The next available BOOST_PP_FOR repetition. -
-
macro
-
- A macro of the for macro(r, data, i, elem).  - This macro is expanded by BOOST_PP_LIST_FOR_EACH_I with each element in list.  - It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, the index of the current element, and the current element. -
-
data
-
- Auxiliary data passed to macro. -
-
list
-
- The list for which macro will be invoked on each element. -
-
-

Remarks

-
- This macro is a repetition construct.  - If list is (a, (b, (c, BOOST_PP_NIL))), it expands to the sequence: -
- macro(r, data, 0, a) macro(r, data, 1, b) macro(r, data, 2, c) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/for_each_i.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/list/adt.hpp>
-#include <boost/preprocessor/repetition/for.hpp>
-#include <boost/preprocessor/list/for_each_i.hpp>
-
-#define LIST (x, (y, (z, BOOST_PP_NIL)))
-
-#define MACRO_2(r, data, i, elem) BOOST_PP_CAT(elem, i)
-
-#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
-#define OP(r, state) BOOST_PP_LIST_REST(state)
-#define MACRO(r, state) [ BOOST_PP_LIST_FOR_EACH_I_R(r, MACRO_2, _, state) ]
-
-BOOST_PP_FOR(LIST, PRED, OP, MACRO)
-   // expands to [x0 y1 z2] [y0 z1] [z0]
-
- - diff --git a/docs.1/ref/list_for_each_product.html b/docs.1/ref/list_for_each_product.html deleted file mode 100644 index 6ccb695..0000000 --- a/docs.1/ref/list_for_each_product.html +++ /dev/null @@ -1,76 +0,0 @@ - - - BOOST_PP_LIST_FOR_EACH_PRODUCT - - - - -
- The BOOST_PP_LIST_FOR_EACH_PRODUCT macro repeats a macro for each cartesian product of several lists. -
-

Usage

-
- BOOST_PP_LIST_FOR_EACH_PRODUCT(macro, size, tuple) -
-

Arguments

-
-
macro
-
- The binary macro of the form macro(r, product).  - This macro is expanded by BOOST_PP_FOR_EACH_PRODUCT with each cartesian product in tuple.  - It is expanded with the next available BOOST_PP_FOR repetition and a tuple containing a cartesian product.  - This tuple will have size elements. -
-
size
-
- The size of tuple. -
-
tuple
-
- A tuple of lists from which cartesian products are obtained. -
-
-

Remarks

-
- This macro is a repetition construct.  - If two lists are (a, (b, (c, BOOST_PP_NIL))) and (x, (y, (z, BOOST_PP_NIL))), - this macro will produce the following sequence: -
- macro(r, (a, x)) - macro(r, (a, y)) - macro(r, (a, z))
- macro(r, (b, x)) - macro(r, (b, y)) - macro(r, (b, z))
- macro(r, (c, x)) - macro(r, (c, y)) - macro(r, (c, z)) -
-
-
- Previously, this macro could not be used inside BOOST_PP_FOR.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_FOR_EACH_PRODUCT_R in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/for_each_product.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/for_each_product.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (x, (y, (z, BOOST_PP_NIL)))
-
-#define MACRO(r, product) product
-
-BOOST_PP_LIST_FOR_EACH_PRODUCT(MACRO, 2, (L1, L2))
-   // expands to (a, x) (a, y) (a, z) (b, x) (b, y) (b, z) (c, x) (c, y) (c, z)
-
- - diff --git a/docs.1/ref/list_for_each_product_r.html b/docs.1/ref/list_for_each_product_r.html deleted file mode 100644 index e434db1..0000000 --- a/docs.1/ref/list_for_each_product_r.html +++ /dev/null @@ -1,108 +0,0 @@ - - - BOOST_PP_LIST_FOR_EACH_PRODUCT_R - - - - -
- The BOOST_PP_LIST_FOR_EACH_PRODUCT_R macro repeats a macro for each cartesian product of several lists.  - It reenters BOOST_PP_FOR with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOR_EACH_PRODUCT_R(r, macro, size, tuple) -
-

Arguments

-
-
r
-
- The next available BOOST_PP_FOR repetition. -
-
macro
-
- The binary macro of the form macro(r, product).  - This macro is expanded by BOOST_PP_FOR_EACH_PRODUCT with each cartesian product in tuple.  - It is expanded with the next available BOOST_PP_FOR repetition and a tuple containing a cartesian product.  - This tuple will have size elements. -
-
size
-
- The size of tuple. -
-
tuple
-
- A tuple of lists from which cartesian products are obtained. -
-
-

Remarks

-
- This macro is a repetition construct.  - If two lists are (a, (b, (c, BOOST_PP_NIL))) and (x, (y, (z, BOOST_PP_NIL))), - this macro will produce the following sequence: -
- macro(r, (a, x)) - macro(r, (a, y)) - macro(r, (a, z))
- macro(r, (b, x)) - macro(r, (b, y)) - macro(r, (b, z))
- macro(r, (c, x)) - macro(r, (c, y)) - macro(r, (c, z)) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/for_each_product.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/list/for_each_product.hpp>
-#include <boost/preprocessor/repetition/for.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define L1 (a, (b, BOOST_PP_NIL))
-#define L2 (x, (y, BOOST_PP_NIL))
-
-#define PRED(r, state) BOOST_PP_TUPLE_ELEM(2, 0, state)
-
-#define OP(r, state) /* .............. */ \
-   (                                      \
-      BOOST_PP_DEC(                       \
-         BOOST_PP_TUPLE_ELEM(2, 0, state) \
-      ),                                  \
-      BOOST_PP_TUPLE_ELEM(2, 1, state)    \
-   )                                      \
-   /**/
-
-#define MACRO(r, state) /* ......... */ \
-   MACRO_I(                             \
-      r,                                \
-      BOOST_PP_TUPLE_ELEM(2, 0, state), \
-      BOOST_PP_TUPLE_ELEM(2, 1, state)  \
-   )                                    \
-   /**/
-
-#define MACRO_I(r, c, t) /* ..................... */ \
-   BOOST_PP_LIST_FOR_EACH_PRODUCT_R(                 \
-      r, MACRO_P, 2,                                 \
-      (                                              \
-         BOOST_PP_TUPLE_ELEM(2, BOOST_PP_DEC(c), t), \
-         BOOST_PP_TUPLE_ELEM(2, BOOST_PP_DEC(c), t)  \
-      )                                              \
-   )                                                 \
-   /**/
-
-#define MACRO_P(r, product) product
-
-BOOST_PP_FOR((2, (L1, L2)), PRED, OP, MACRO)
-   // expands to (x, x) (x, y) (y, x) (y, y) (a, a) (a, b) (b, a) (b, b)
-
- - diff --git a/docs.1/ref/list_for_each_r.html b/docs.1/ref/list_for_each_r.html deleted file mode 100644 index 592996d..0000000 --- a/docs.1/ref/list_for_each_r.html +++ /dev/null @@ -1,71 +0,0 @@ - - - BOOST_PP_LIST_FOR_EACH_R - - - - -
- The BOOST_PP_LIST_FOR_EACH_R macro repeats a macro for each element in a list.  - It reenters BOOST_PP_FOR with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_FOR_EACH_R(r, macro, data, list) -
-

Arguments

-
-
r
-
- The next available BOOST_PP_FOR repetition. -
-
macro
-
- A ternary macro of the form macro(r, data, elem).  - This macro is expanded by BOOST_PP_LIST_FOR_EACH with each element in list.  - It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, and the current element. -
-
data
-
- Auxiliary data passed to macro. -
-
list
-
- The list for which macro will be invoked on each element. -
-
-

Remarks

-
- This macro is a repetition construct.  - If list is (a, (b, (c, BOOST_PP_NIL))), it expands to the sequence: -
- macro(r, data, a) macro(r, data, b) macro(r, data, c) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/for_each.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-#include <boost/preprocessor/repetition/for.hpp>
-#include <boost/preprocessor/list/for_each.hpp>
-
-#define LIST (x, (y, (z, BOOST_PP_NIL)))
-
-#define MACRO_2(r, data, elem) elem
-
-#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
-#define OP(r, state) BOOST_PP_LIST_REST(state)
-#define MACRO(r, state) [ BOOST_PP_LIST_FOR_EACH_R(r, MACRO_2, _, state) ]
-
-BOOST_PP_FOR(LIST, PRED, OP, MACRO)
-   // expands to [x y z] [y z] [z]
-
- - diff --git a/docs.1/ref/list_is_cons.html b/docs.1/ref/list_is_cons.html deleted file mode 100644 index 27627d5..0000000 --- a/docs.1/ref/list_is_cons.html +++ /dev/null @@ -1,41 +0,0 @@ - - - BOOST_PP_LIST_IS_CONS - - - - -
- The BOOST_PP_LIST_IS_CONS macro is a predicate that determines if a list not nil. -
-

Usage

-
- BOOST_PP_LIST_IS_CONS(list) -
-

Arguments

-
-
list
-
- A list. -
-
-

Remarks

-
- If list is non-nil, this macro expands to 1.  - Otherwise, it expands to 0. -
-

Requirements

-
- Header:  <boost/preprocessor/list/adt.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-
-#define LIST (a, BOOST_PP_NIL)
-
-BOOST_PP_LIST_IS_CONS(LIST) // expands to 1
-BOOST_PP_LIST_IS_CONS(BOOST_PP_LIST_REST(LIST)) // expands to 0
-
- - diff --git a/docs.1/ref/list_is_nil.html b/docs.1/ref/list_is_nil.html deleted file mode 100644 index 034f535..0000000 --- a/docs.1/ref/list_is_nil.html +++ /dev/null @@ -1,41 +0,0 @@ - - - BOOST_PP_LIST_IS_NIL - - - - -
- The BOOST_PP_LIST_IS_NIL macro is a predicate that determines if a list is nil. -
-

Usage

-
- BOOST_PP_LIST_IS_NIL(list) -
-

Arguments

-
-
list
-
- A list. -
-
-

Remarks

-
- If list is nil, this macro expands to 1.  - Otherwise, it expands to 0. -
-

Requirements

-
- Header:  <boost/preprocessor/list/adt.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-
-#define LIST (a, BOOST_PP_NIL)
-
-BOOST_PP_LIST_IS_NIL(LIST) // expands to 0
-BOOST_PP_LIST_IS_NIL(BOOST_PP_LIST_REST(LIST)) // expands to 1
-
- - diff --git a/docs.1/ref/list_nil.html b/docs.1/ref/list_nil.html deleted file mode 100644 index 168c9bb..0000000 --- a/docs.1/ref/list_nil.html +++ /dev/null @@ -1,58 +0,0 @@ - - - BOOST_PP_LIST_NIL - - - - -
- The BOOST_PP_LIST_NIL macro is a nil list constructor. -
-

Usage

-
- BOOST_PP_LIST_NIL -
-

Remarks

-
- This macro represents the end of a list. -
-
- This macro is no longer necessary.  - It simply expands to BOOST_PP_NIL.  - Because of this, this macro is deprecated. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/adt.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-
-#define OLD /* ........... */ \
-   BOOST_PP_LIST_CONS(        \
-      a,                      \
-      BOOST_PP_LIST_CONS(     \
-         b,                   \
-         BOOST_PP_LIST_CONS(  \
-            c,                \
-            BOOST_PP_LIST_NIL \
-         )                    \
-      )                       \
-   )                          \
-   /**/
-
-#define NEW (a, (b, (c, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
-   // expands to a == a
-
-BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_REST(NEW)
-   // expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/list_rest.html b/docs.1/ref/list_rest.html deleted file mode 100644 index 59afe5c..0000000 --- a/docs.1/ref/list_rest.html +++ /dev/null @@ -1,52 +0,0 @@ - - - BOOST_PP_LIST_REST - - - - -
- The BOOST_PP_LIST_REST macro expands to the tail of a list. -
-

Usage

-
- BOOST_PP_LIST_REST(list) -
-

Arguments

-
-
list
-
- A non-nil list. -
-
-

Requirements

-
- Header:  <boost/preprocessor/list/adt.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-
-#define OLD /* ........... */ \
-   BOOST_PP_LIST_CONS(        \
-      a,                      \
-      BOOST_PP_LIST_CONS(     \
-         b,                   \
-         BOOST_PP_LIST_CONS(  \
-            c,                \
-            BOOST_PP_LIST_NIL \
-         )                    \
-      )                       \
-   )                          \
-   /**/
-
-#define NEW (a, (b, (c, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
-   // expands to a == a
-
-BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_REST(NEW)
-   // expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/list_rest_n.html b/docs.1/ref/list_rest_n.html deleted file mode 100644 index 83db04c..0000000 --- a/docs.1/ref/list_rest_n.html +++ /dev/null @@ -1,52 +0,0 @@ - - - BOOST_PP_LIST_REST_N - - - - -
- The BOOST_PP_LIST_REST_N macro expands to a list of all but the first count elements of a list. -
-

Usage

-
- BOOST_PP_LIST_REST_N(count, list) -
-

Arguments

-
-
count
-
- The number of elements to remove from the beginning of list. -
-
list
-
- The list from which the elements are extracted. -
-
-

Remarks

-
- This macro removes count elements from the beginning of list and returns the remainder as a list -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_REST_N_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/rest_n.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/rest_n.hpp>
-
-#define LIST (a, (b, (c, (d, BOOST_PP_NIL))))
-
-BOOST_PP_LIST_REST_N(2, LIST) // expands to (c, (d, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/list_rest_n_d.html b/docs.1/ref/list_rest_n_d.html deleted file mode 100644 index 3d8f08a..0000000 --- a/docs.1/ref/list_rest_n_d.html +++ /dev/null @@ -1,61 +0,0 @@ - - - BOOST_PP_LIST_REST_N_D - - - - -
- The BOOST_PP_LIST_REST_N_D macro expands to a list of all but the first count elements of a list.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_REST_N_D(d, count, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
count
-
- The number of elements to remove from the beginning of list. -
-
list
-
- The list from which the elements are extracted. -
-
-

Remarks

-
- This macro removes count elements from the beginning of list and returns the remainder as a list -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/rest_n.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/fold_right.hpp>
-#include <boost/preprocessor/list/rest_n.hpp>
-
-#define L1 (a, (b, (c, (d, BOOST_PP_NIL))))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_REST_N_D(d, 2, x), state)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to...
-   ((c, (d, BOOST_PP_NIL)), ((c, (d, BOOST_PP_NIL)),
-   ((c, (d, BOOST_PP_NIL)), BOOST_PP_NIL)))
-*/
-
- - diff --git a/docs.1/ref/list_reverse.html b/docs.1/ref/list_reverse.html deleted file mode 100644 index e11fae0..0000000 --- a/docs.1/ref/list_reverse.html +++ /dev/null @@ -1,45 +0,0 @@ - - - BOOST_PP_LIST_REVERSE - - - - -
- The BOOST_PP_LIST_REVERSE macro expands to the reverse a list. -
-

Usage

-
- BOOST_PP_LIST_REVERSE(list) -
-

Arguments

-
-
list
-
- A list to be reversed. -
-
-

Remarks

-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_REVERSE_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/reverse.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/reverse.hpp>
-
-#define LIST (0, (1, (2, (3, BOOST_PP_NIL))))
-
-BOOST_PP_LIST_REVERSE(LIST) // expands to (3, (2, (1, (0, BOOST_PP_NIL))))
-
- - diff --git a/docs.1/ref/list_reverse_d.html b/docs.1/ref/list_reverse_d.html deleted file mode 100644 index 289fec5..0000000 --- a/docs.1/ref/list_reverse_d.html +++ /dev/null @@ -1,53 +0,0 @@ - - - BOOST_PP_LIST_REVERSE_D - - - - -
- The BOOST_PP_LIST_REVERSE_D macro expands to the reverse a list.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_REVERSE_D(d, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
list
-
- A list to be reversed. -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/reverse.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/fold_right.hpp>
-#include <boost/preprocessor/list/reverse.hpp>
-
-#define L1 (a, (b, (c, (d, BOOST_PP_NIL))))
-#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
-
-#define OP(d, state, x) (BOOST_PP_LIST_REVERSE_D(d, x), state)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
-/*
-   expands to...
-   ((d, (c, (b, (a, BOOST_PP_NIL)))), ((d, (c, (b, (a, BOOST_PP_NIL)))),
-   ((d, (c, (b, (a, BOOST_PP_NIL)))) , BOOST_PP_NIL)))
-*/
-
- - diff --git a/docs.1/ref/list_size.html b/docs.1/ref/list_size.html deleted file mode 100644 index f070376..0000000 --- a/docs.1/ref/list_size.html +++ /dev/null @@ -1,45 +0,0 @@ - - - BOOST_PP_LIST_SIZE - - - - -
- The BOOST_PP_LIST_SIZE macro expands to the size of a list. -
-

Usage

-
- BOOST_PP_LIST_SIZE(list) -
-

Arguments

-
-
list
-
- A list whose size is to be calculated. -
-
-

Remarks

-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_SIZE_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/size.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/size.hpp>
-
-#define LIST (0, (1, (2, (3, BOOST_PP_NIL))))
-
-BOOST_PP_LIST_SIZE(LIST) // expands to 4
-
- - diff --git a/docs.1/ref/list_size_d.html b/docs.1/ref/list_size_d.html deleted file mode 100644 index 1492f9b..0000000 --- a/docs.1/ref/list_size_d.html +++ /dev/null @@ -1,57 +0,0 @@ - - - BOOST_PP_LIST_SIZE_D - - - - -
- The BOOST_PP_LIST_SIZE_D macro expands to the size of a list.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_SIZE_D(d, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
list
-
- A list whose size is to be calculated. -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/size.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/add.hpp>
-#include <boost/preprocessor/list/fold_left.hpp>
-#include <boost/preprocessor/list/size.hpp>
-
-#define L1 (a, (b, (c, BOOST_PP_NIL)))
-#define L2 (x, (y, BOOST_PP_NIL))
-#define L3 (p, (q, BOOST_PP_NIL))
-
-#define LIST (L1, (L2, (L3, BOOST_PP_NIL)))
-
-#define OP(d, state, x) /* ... */ \
-   BOOST_PP_ADD_D(                \
-      d, state,                   \
-      BOOST_PP_LIST_SIZE_D(d, x)  \
-   )                              \
-   /**/
-
-BOOST_PP_LIST_FOLD_LEFT(OP, 0, LIST) // expands to 7
-
- - diff --git a/docs.1/ref/list_to_tuple.html b/docs.1/ref/list_to_tuple.html deleted file mode 100644 index 5f60410..0000000 --- a/docs.1/ref/list_to_tuple.html +++ /dev/null @@ -1,52 +0,0 @@ - - - BOOST_PP_LIST_TO_TUPLE - - - - -
- The BOOST_PP_LIST_TO_TUPLE macro converts a list to a tuple. -
-

Usage

-
- BOOST_PP_LIST_TO_TUPLE(list) -
-

Arguments

-
-
list
-
- The list to be converted. -
-
-

Remarks

-
- If list is, for example, (a, (b, (c, BOOST_PP_NIL))), - this macro will produce: -
- (a, b, c) -
-
-
- Previously, this macro could not be used inside BOOST_PP_FOR.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_TO_TUPLE_R in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/to_tuple.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/to_tuple.hpp>
-
-#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
-
-BOOST_PP_LIST_TO_TUPLE(LIST) // expands to (w, x, y, z)
-
- - diff --git a/docs.1/ref/list_to_tuple_r.html b/docs.1/ref/list_to_tuple_r.html deleted file mode 100644 index aa6bea8..0000000 --- a/docs.1/ref/list_to_tuple_r.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_LIST_TO_TUPLE_R - - - - -
- The BOOST_PP_LIST_TO_TUPLE_R macro converts a list to a tuple.  - It reenters BOOST_PP_FOR with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_TO_TUPLE_R(r, list) -
-

Arguments

-
-
r
-
- The next available BOOST_PP_FOR repetition. -
-
list
-
- The list to be converted. -
-
-

Remarks

-
- If list is, for example, (a, (b, (c, BOOST_PP_NIL))), - this macro will produce: -
- (a, b, c) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/to_tuple.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-#include <boost/preprocessor/repetition/for.hpp>
-#include <boost/preprocessor/list/to_tuple.hpp>
-
-#define LIST (x, (y, (z, BOOST_PP_NIL)))
-
-#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
-#define OP(r, state) BOOST_PP_LIST_REST(state)
-#define MACRO(r, state) BOOST_PP_LIST_TO_TUPLE_R(r, state)
-
-BOOST_PP_FOR(LIST, PRED, OP, MACRO)
-   // expands to (x, y, z) (y, z) (z)
-
- - diff --git a/docs.1/ref/list_transform.html b/docs.1/ref/list_transform.html deleted file mode 100644 index b566e8b..0000000 --- a/docs.1/ref/list_transform.html +++ /dev/null @@ -1,67 +0,0 @@ - - - BOOST_PP_LIST_TRANSFORM - - - - -
- The BOOST_PP_LIST_TRANSFORM macro transforms each element in a list according to a supplied transformation. -
-

Usage

-
- BOOST_PP_LIST_TRANSFORM(op, data, list) -
-

Arguments

-
-
op
-
- A ternary predicate of the form op(d, data, elem).  - This transformation is expanded by BOOST_PP_LIST_TRANSFORM for each element in list with the next available BOOST_PP_WHILE iteration, - the auxiliary data, and the current element in list.  -
-
data
-
- Auxiliary data passed to pred. -
-
list
-
- The list to be transformed. -
-
-

Remarks

-
- This macro expands op for each element in list.  - It builds a new list out of the results of each call.  - If, for example, list is (a, (b, (c, BOOST_PP_NIL))), - this macro expands to... -
- (op(d, data, a), (op(d, data, b), (op(d, data, c), BOOST_PP_NIL))) -
-
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_LIST_TRANSFORM_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/transform.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/list/transform.hpp>
-
-#define LIST (1, (3, (2, (5, BOOST_PP_NIL))))
-
-#define OP(d, data, elem) BOOST_PP_DEC(elem)
-
-BOOST_PP_LIST_TRANSFORM(OP, 3, LIST) // expands to(0, (2, (1, (4, BOOST_PP_NIL))))
-
- - diff --git a/docs.1/ref/list_transform_d.html b/docs.1/ref/list_transform_d.html deleted file mode 100644 index b520836..0000000 --- a/docs.1/ref/list_transform_d.html +++ /dev/null @@ -1,76 +0,0 @@ - - - BOOST_PP_LIST_TRANSFORM_D - - - - -
- The BOOST_PP_LIST_TRANSFORM_D macro transforms each element in a list according to a supplied transformation.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
op
-
- A ternary predicate of the form op(d, data, elem).  - This transformation is expanded by BOOST_PP_LIST_TRANSFORM for each element in list with the next available BOOST_PP_WHILE iteration, - the auxiliary data, and the current element in list.  -
-
data
-
- Auxiliary data passed to pred. -
-
list
-
- The list to be transformed. -
-
-

Remarks

-
- This macro expands op for each element in list.  - It builds a new list out of the results of each call.  - If, for example, list is (a, (b, (c, BOOST_PP_NIL))), - this macro expands to... -
- (op(d, data, a), (op(d, data, b), (op(d, data, c), BOOST_PP_NIL))) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/list/transform.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/list/fold_right.hpp>
-#include <boost/preprocessor/list/transform.hpp>
-
-#define A (1, (2, (3, (4, BOOST_PP_NIL))))
-#define B (A, (A, (A, (A, BOOST_PP_NIL))))
-
-#define OP_T(d, data, x) BOOST_PP_INC(x)
-#define OP(d, state, x) (BOOST_PP_LIST_TRANSFORM_D(d, OP_T, 2, x), state)
-
-BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, B)
-/*
-   expands to:
-   ((2, (3, (4, (5, BOOST_PP_NIL)))), ((2, (3, (4, (5, BOOST_PP_NIL)))),
-   ((2, (3, (4, (5, BOOST_PP_NIL)))), ((2, (3, (4, (5, BOOST_PP_NIL)))),
-   BOOST_PP_NIL))))
-*/
-
- - diff --git a/docs.1/ref/local_iterate.html b/docs.1/ref/local_iterate.html deleted file mode 100644 index 4b0369f..0000000 --- a/docs.1/ref/local_iterate.html +++ /dev/null @@ -1,53 +0,0 @@ - - - BOOST_PP_LOCAL_ITERATE - - - - -
- The BOOST_PP_LOCAL_ITERATE macro initiates a local-iteration. -
-

Usage

-
- #include BOOST_PP_LOCAL_ITERATE() -
-

Remarks

-
- This macro causes the user-defined macro BOOST_PP_LOCAL_MACRO to be expanded vertically with values in the range specified by BOOST_PP_LOCAL_LIMITS. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/iteration/local.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/iteration/local.hpp>
-
-template<int> struct sample;
-
-#define BOOST_PP_LOCAL_MACRO(n) /* ... */ \
-   template<> struct sample<n> {          \
-      enum { value = n };                 \
-   };                                     \
-   /**/
-
-#define BOOST_PP_LOCAL_LIMITS (1, 5)
-
-#include BOOST_PP_LOCAL_ITERATE()
-/* expands to...
-
-template<> struct sample<1> { enum { value = 1 }; };
-template<> struct sample<2> { enum { value = 2 }; };
-template<> struct sample<3> { enum { value = 3 }; };
-template<> struct sample<4> { enum { value = 4 }; };
-template<> struct sample<5> { enum { value = 5 }; };
-*/
-
- - diff --git a/docs.1/ref/local_limits.html b/docs.1/ref/local_limits.html deleted file mode 100644 index 03edbd9..0000000 --- a/docs.1/ref/local_limits.html +++ /dev/null @@ -1,71 +0,0 @@ - - - BOOST_PP_LOCAL_LIMITS - - - - -
- The BOOST_PP_LOCAL_LIMITS macro is a user-defined named external argument used by BOOST_PP_LOCAL_ITERATE. -
-

Usage

-
- #define BOOST_PP_LOCAL_LIMITS (start, finish) -
-

Arguments

-
-
start
-
- The lower bound (inclusive) of a local iteration.  - Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. -
-
finish
-
- The upper bound (inclusive) of a local iteration.  - Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. -
-
-

Remarks

-
- Note that there is a whitespace character after the macro identifier. -
-
- This macro must expand to a 2-element tuple.  - The elements of this tuple represent the lower and upper boundaries of a local iteration.  - Both start and finish are evaluated parameters.  - This implies that they can include simple arithmetic expressions (such as 1 + 3), etc.. -
-
- This macro is automatically undefined for reuse by a call to BOOST_PP_LOCAL_ITERATE. -
-

See Also

- -

Sample Code

-
-#include <boost/preprocessor/iteration/local.hpp>
-
-template<int> struct sample;
-
-#define BOOST_PP_LOCAL_MACRO(n) /* ... */ \
-   template<> struct sample<n> {          \
-      enum { value = n };                 \
-   };                                     \
-   /**/
-
-#define BOOST_PP_LOCAL_LIMITS (1, 5)
-
-#include BOOST_PP_LOCAL_ITERATE()
-/* expands to...
-
-template<> struct sample<1> { enum { value = 1 }; };
-template<> struct sample<2> { enum { value = 2 }; };
-template<> struct sample<3> { enum { value = 3 }; };
-template<> struct sample<4> { enum { value = 4 }; };
-template<> struct sample<5> { enum { value = 5 }; };
-*/
-
- - diff --git a/docs.1/ref/local_macro.html b/docs.1/ref/local_macro.html deleted file mode 100644 index 81d2def..0000000 --- a/docs.1/ref/local_macro.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_LOCAL_MACRO - - - - -
- The BOOST_PP_LOCAL_MACRO macro is a user-defined named external argument used by BOOST_PP_LOCAL_ITERATE. -
-

Usage

-
- #define BOOST_PP_LOCAL_MACRO(n) ... -
-

Arguments

-
-
n
-
- The current iteration value received from the local-iteration mechanism. -
-
-

Remarks

-
- This macro is automatically undefined for reuse by a call to BOOST_PP_LOCAL_ITERATE. -
-

See Also

- -

Sample Code

-
-#include <boost/preprocessor/iteration/local.hpp>
-
-template<int> struct sample;
-
-#define BOOST_PP_LOCAL_MACRO(n) /* ... */ \
-   template<> struct sample<n> {          \
-      enum { value = n };                 \
-   };                                     \
-   /**/
-
-#define BOOST_PP_LOCAL_LIMITS (1, 5)
-
-#include BOOST_PP_LOCAL_ITERATE()
-/* expands to...
-
-template<> struct sample<1> { enum { value = 1 }; };
-template<> struct sample<2> { enum { value = 2 }; };
-template<> struct sample<3> { enum { value = 3 }; };
-template<> struct sample<4> { enum { value = 4 }; };
-template<> struct sample<5> { enum { value = 5 }; };
-*/
-
- - diff --git a/docs.1/ref/lparen.html b/docs.1/ref/lparen.html deleted file mode 100644 index ce10974..0000000 --- a/docs.1/ref/lparen.html +++ /dev/null @@ -1,42 +0,0 @@ - - - BOOST_PP_LPAREN - - - - -
- The BOOST_PP_LPAREN macro expands to a left parenthesis. -
-

Usage

-
- BOOST_PP_LPAREN() -
-

Remarks

-
- The preprocessor interprets parentheses as delimiters in macro invocations.  - Because of this, parentheses require special handling. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/punctuation/paren.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/punctuation/paren.hpp>
-
-#define X(x) x
-#define MACRO(p, x) X p x )
-
-MACRO(BOOST_PP_LPAREN(), abc) // expands to abc
-
-#define Y(x)
-
-MACRO((10) Y BOOST_PP_LPAREN(), result) // expands to 10
-
- - diff --git a/docs.1/ref/lparen_if.html b/docs.1/ref/lparen_if.html deleted file mode 100644 index ef28c53..0000000 --- a/docs.1/ref/lparen_if.html +++ /dev/null @@ -1,51 +0,0 @@ - - - BOOST_PP_LPAREN_IF - - - - -
- The BOOST_PP_LPAREN_IF macro conditionally expands to a left parenthesis. -
-

Usage

-
- BOOST_PP_LPAREN_IF(cond) -
-

Arguments

-
-
cond
-
- The condition that determines if a the macro expands to a left parenthesis or nothing.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If cond expands to 0, this macro expands to nothing.  - Otherwise, it expands to a left parenthesis. -
-
- The preprocessor interprets parentheses as delimiters in macro invocations.  - Because of this, parentheses require special handling. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/punctuation/paren_if.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/punctuation/paren_if.hpp>
-
-#define MACRO(c, x) BOOST_PP_LPAREN_IF(c) x BOOST_PP_RPAREN_IF(c)
-
-MACRO(0, text) // expands to text
-MACRO(1, text) // expands to (text)
-
- - diff --git a/docs.1/ref/max.html b/docs.1/ref/max.html deleted file mode 100644 index f91bda5..0000000 --- a/docs.1/ref/max.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_MAX - - - - -
- The BOOST_PP_MAX macro expands to the greater of its two arguments. -
-

Usage

-
- BOOST_PP_MAX(x, y) -
-

Arguments

-
-
x
-
- The first operand.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The second operand.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- This macro returns the greater of its two arguments or the value of both arguments if they are equal. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_MAX_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/selection/max.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/selection/max.hpp>
-
-BOOST_PP_MAX(5, 7) // expands to 7
-BOOST_PP_MAX(3, 3) // expands to 3
-
- - diff --git a/docs.1/ref/max_d.html b/docs.1/ref/max_d.html deleted file mode 100644 index ad73c5d..0000000 --- a/docs.1/ref/max_d.html +++ /dev/null @@ -1,60 +0,0 @@ - - - BOOST_PP_MAX_D - - - - -
- The BOOST_PP_MAX_D macro expands to the greater of its second and third arguments.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_MAX_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The first operand.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The second operand.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- This macro returns the greater of its first and second arguments or the value of both arguments if they are equal. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/selection/max.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/fold_left.hpp>
-#include <boost/preprocessor/selection/max.hpp>
-
-#define LIST (1, (3, (5, (2, (4, BOOST_PP_NIL)))))
-
-#define OP(d, state, x) BOOST_PP_MAX_D(d, state, x)
-
-#define LIST_MAX(list) BOOST_PP_LIST_FOLD_LEFT(OP, 0, LIST)
-
-LIST_MAX(LIST) // expands to 5
-
- - diff --git a/docs.1/ref/min.html b/docs.1/ref/min.html deleted file mode 100644 index f6e30c9..0000000 --- a/docs.1/ref/min.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_MIN - - - - -
- The BOOST_PP_MIN macro expands to the lesser of its two arguments. -
-

Usage

-
- BOOST_PP_MIN(x, y) -
-

Arguments

-
-
x
-
- The first operand.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The second operand.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- This macro returns the lesser of its two arguments or the value of both arguments if they are equal. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_MIN_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/selection/min.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/selection/min.hpp>
-
-BOOST_PP_MIN(5, 7) // expands to 5
-BOOST_PP_MIN(3, 3) // expands to 3
-
- - diff --git a/docs.1/ref/min_d.html b/docs.1/ref/min_d.html deleted file mode 100644 index 3eb67e6..0000000 --- a/docs.1/ref/min_d.html +++ /dev/null @@ -1,60 +0,0 @@ - - - BOOST_PP_MIN_D - - - - -
- The BOOST_PP_MIN_D macro expands to the lesser of its second and third arguments.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_MIN_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The first operand.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The second operand.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- This macro returns the lesser of its first and second arguments or the value of both arguments if they are equal. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/selection/min.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/list/fold_left.hpp>
-#include <boost/preprocessor/selection/min.hpp>
-
-#define LIST (1, (3, (5, (2, (4, BOOST_PP_NIL)))))
-
-#define OP(d, state, x) BOOST_PP_MIN_D(d, state, x)
-
-#define LIST_MAX(list) BOOST_PP_LIST_FOLD_LEFT(OP, 20, LIST)
-
-LIST_MIN(LIST) // expands to 1
-
- - diff --git a/docs.1/ref/mod.html b/docs.1/ref/mod.html deleted file mode 100644 index d62ea17..0000000 --- a/docs.1/ref/mod.html +++ /dev/null @@ -1,53 +0,0 @@ - - - BOOST_PP_MOD - - - - -
- The BOOST_PP_MOD macro expands to the modulus of its arguments. -
-

Usage

-
- BOOST_PP_MOD(x, y) -
-

Arguments

-
-
x
-
- The dividend (numerator) of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The divisor (denominator) of the operation.  - Valid values range from 1 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_MOD_D in such a situation. -
-
- If y is 0, the result is undefined. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/mod.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/mod.hpp>
-
-BOOST_PP_MOD(11, 5) // expands to 1
-
- - diff --git a/docs.1/ref/mod_d.html b/docs.1/ref/mod_d.html deleted file mode 100644 index 6855b39..0000000 --- a/docs.1/ref/mod_d.html +++ /dev/null @@ -1,66 +0,0 @@ - - - BOOST_PP_MOD_D - - - - -
- The BOOST_PP_MOD_D macro expands to the modulus of its second and third arguments.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_MOD_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The dividend (numerator) of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The divisor (denominator) of the operation.  - Valid values range from 1 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If y is 0, the result is undefined. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/div.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/mod.hpp>
-#include <boost/preprocessor/list/filter.hpp>
-#include <boost/preprocessor/logical/not.hpp>
-
-#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
-
-#define EVEN_P(d, _, num) BOOST_PP_NOT(BOOST_PP_MOD_D(d, num, 2))
-#define EVEN(list) BOOST_PP_LIST_FILTER(EVEN_P, nil, list)
-
-EVEN(LIST) // expands to (2, (4, BOOST_PP_NIL))
-
-#define ODD_P(d, _, num) BOOST_PP_MOD_D(d, num, 2)
-#define ODD(list) BOOST_PP_LIST_FILTER(ODD_P, nil, list)
-
-ODD(LIST) // expands to (1, (3, (5, BOOST_PP_NIL)))
-
-
- - diff --git a/docs.1/ref/mul.html b/docs.1/ref/mul.html deleted file mode 100644 index e40419c..0000000 --- a/docs.1/ref/mul.html +++ /dev/null @@ -1,58 +0,0 @@ - - - BOOST_PP_MUL - - - - -
- The BOOST_PP_MUL macro expands to the product of its arguments. -
-

Usage

-
- BOOST_PP_MUL(x, y) -
-

Arguments

-
-
x
-
- The multiplicand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The multiplier of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If the product of x and y is greater than BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_MUL_D in such a situation. -
-
- This macro is the most efficient when x is less than or equal to y.  - However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.  - In other words, x should be the value that is most likely to be the largest of the two operands. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/mul.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/mul.hpp>
-
-BOOST_PP_MUL(4, 4) // expands to 16
-
- - diff --git a/docs.1/ref/mul_d.html b/docs.1/ref/mul_d.html deleted file mode 100644 index 7f976be..0000000 --- a/docs.1/ref/mul_d.html +++ /dev/null @@ -1,81 +0,0 @@ - - - BOOST_PP_MUL_D - - - - -
- The BOOST_PP_MUL_D macro expands to the product of its second and third arguments.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_MUL_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The multiplicand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The multiplier of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If the product of x and y is greater than BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. -
-
- This macro is the most efficient when x is less than or equal to y.  - However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.  - In other words, x should be the value that is most likely to be the largest of the two operands. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/mul.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/mul.hpp>
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define PRED(d, data) BOOST_PP_TUPLE_ELEM(3, 0, data)
-
-#define OP(d, data) /* ............... */ \
-   (                                      \
-      BOOST_PP_DEC(                       \
-         BOOST_PP_TUPLE_ELEM(3, 0, data)  \
-      ),                                  \
-      BOOST_PP_TUPLE_ELEM(3, 1, data),    \
-      BOOST_PP_MUL_D(                     \
-         d,                               \
-         BOOST_PP_TUPLE_ELEM(3, 2, data), \
-         BOOST_PP_TUPLE_ELEM(3, 1, data)  \
-      )                                   \
-   )                                      \
-   /**/
-
-// raise 'x' to the 'n'-th power
-#define EXP(x, n) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE(PRED, OP, (n, x, 1)))
-
-EXP(4, 2) // expands to 16
-EXP(2, 3) // expands to 8
-
- - diff --git a/docs.1/ref/nil.html b/docs.1/ref/nil.html deleted file mode 100644 index 656955f..0000000 --- a/docs.1/ref/nil.html +++ /dev/null @@ -1,31 +0,0 @@ - - - BOOST_PP_NIL - - - - -
- The BOOST_PP_NIL identifier is reserved by the library to indicate a non-macro. -
-

Usage

-
- BOOST_PP_NIL -
-

Remarks

-
- This identifier is not defined.  - Its purpose is to not be a macro.  - It is also used to terminate a list. -
-

Sample Code

-
-#include <boost/preprocessor/list/adt.hpp>
-
-#define LIST (x, (y, (z, BOOST_PP_NIL)))
-
-BOOST_PP_LIST_FIRST(x) // expands to x
-BOOST_PP_LIST_REST(x) // expands to (y, (z, BOOST_PP_NIL))
-
- - diff --git a/docs.1/ref/nor.html b/docs.1/ref/nor.html deleted file mode 100644 index 73c6b7c..0000000 --- a/docs.1/ref/nor.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_NOR - - - - -
- The BOOST_PP_NOR macro expands to the logical NOR of its operands. -
-

Usage

-
- BOOST_PP_NOR(p, q) -
-

Arguments

-
-
p
-
- The left operand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
q
-
- The right operand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If both p and q are both 0, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro performs a boolean conversion on each operand before performing the logical NOR operation.  - If that conversion is not necessary, use BOOST_PP_BITNOR instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/nor.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/nor.hpp>
-
-BOOST_PP_NOR(4, 0) // expands to 0
-BOOST_PP_NOR(0, 0) // expands to 1
-
- - diff --git a/docs.1/ref/not.html b/docs.1/ref/not.html deleted file mode 100644 index 6a650b1..0000000 --- a/docs.1/ref/not.html +++ /dev/null @@ -1,49 +0,0 @@ - - - BOOST_PP_NOT - - - - -
- The BOOST_PP_NOT macro performs a logical NOT on its operand. -
-

Usage

-
- BOOST_PP_NOT(x) -
-

Arguments

-
-
x
-
- The value to be converted.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is non-zero, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro performs a boolean conversion on its operand before performing the logical NOT operation.  - If that conversion is not necessary, use BOOST_PP_COMPL instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/not.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/not.hpp>
-
-BOOST_PP_NOT(55) // expands to 0
-BOOST_PP_NOT(0) // expands to 1
-
- - diff --git a/docs.1/ref/not_equal.html b/docs.1/ref/not_equal.html deleted file mode 100644 index e48b981..0000000 --- a/docs.1/ref/not_equal.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_NOT_EQUAL - - - - -
- The BOOST_PP_NOT_EQUAL macro compares two values for inequality. -
-

Usage

-
- BOOST_PP_NOT_EQUAL(x, y) -
-

Arguments

-
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is equal to y, this macro expands to 0.  - Otherwise, it expands to 1. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction because this macro no longer uses BOOST_PP_WHILE. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/not_equal.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/not_equal.hpp>
-
-BOOST_PP_NOT_EQUAL(4, 3) // expands to 1
-BOOST_PP_NOT_EQUAL(5, 5) // expands to 0
-
- - diff --git a/docs.1/ref/not_equal_d.html b/docs.1/ref/not_equal_d.html deleted file mode 100644 index bbda9c0..0000000 --- a/docs.1/ref/not_equal_d.html +++ /dev/null @@ -1,59 +0,0 @@ - - - BOOST_PP_NOT_EQUAL_D - - - - -
- The BOOST_PP_NOT_EQUAL_D macro compares two values for inequality. -
-

Usage

-
- BOOST_PP_NOT_EQUAL_D(d, x, y) -
-

Arguments

-
-
d
-
- This argument is ignored. -
-
x
-
- The left operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The right operand of the comparison.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If x is equal to y, this macro expands to 0.  - Otherwise, it expands to 1. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_NOT_EQUAL instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/comparison/not_equal.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/comparison/equal.hpp>
-
-BOOST_PP_NOT_EQUAL_D(1, 4, 3) // expands to 1
-BOOST_PP_NOT_EQUAL_D(1, 5, 5) // expands to 0
-
- - diff --git a/docs.1/ref/or.html b/docs.1/ref/or.html deleted file mode 100644 index b72399f..0000000 --- a/docs.1/ref/or.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_OR - - - - -
- The BOOST_PP_OR macro expands to the logical OR of its operands. -
-

Usage

-
- BOOST_PP_OR(p, q) -
-

Arguments

-
-
p
-
- The left operand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
q
-
- The right operand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If either p or q is non-zero, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro performs a boolean conversion on each operand before performing the logical OR operation.  - If that conversion is not necessary, use BOOST_PP_BITOR instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/or.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/or.hpp>
-
-BOOST_PP_OR(4, 3) // expands to 1
-BOOST_PP_OR(5, 0) // expands to 1
-
- - diff --git a/docs.1/ref/relative_finish.html b/docs.1/ref/relative_finish.html deleted file mode 100644 index 8ab5a24..0000000 --- a/docs.1/ref/relative_finish.html +++ /dev/null @@ -1,35 +0,0 @@ - - - BOOST_PP_RELATIVE_FINISH - - - - -
- The BOOST_PP_RELATIVE_FINISH macro expands to the upper bound of a file-iteration depth relative to the current depth. -
-

Usage

-
- BOOST_PP_RELATIVE_FINISH(i) -
-

Arguments

-
-
i
-
- The relative depth of the frame whose upper bound is to be retreived.  - Valid values range from 0 to BOOST_PP_ITERATION_DEPTH() - 1. -
-
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-
- The argument i is interpreted as the number of frames outward from the current frame. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
- - diff --git a/docs.1/ref/relative_flags.html b/docs.1/ref/relative_flags.html deleted file mode 100644 index bc8de33..0000000 --- a/docs.1/ref/relative_flags.html +++ /dev/null @@ -1,35 +0,0 @@ - - - BOOST_PP_RELATIVE_FLAGS - - - - -
- The BOOST_PP_RELATIVE_FLAGS macro expands to the flags associated with a file-iteration depth relative to the current depth. -
-

Usage

-
- BOOST_PP_RELATIVE_FLAGS(i) -
-

Arguments

-
-
i
-
- The relative depth of the frame whose flags are to be retreived.  - Valid values range from 0 to BOOST_PP_ITERATION_DEPTH() - 1. -
-
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-
- The argument i is interpreted as the number of frames outward from the current frame. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
- - diff --git a/docs.1/ref/relative_iteration.html b/docs.1/ref/relative_iteration.html deleted file mode 100644 index 3bc0350..0000000 --- a/docs.1/ref/relative_iteration.html +++ /dev/null @@ -1,91 +0,0 @@ - - - BOOST_PP_RELATIVE_ITERATION - - - - -
- The BOOST_PP_RELATIVE_ITERATION macro expands to the iteration value of a file-iteration depth relative to the current depth. -
-

Usage

-
- BOOST_PP_RELATIVE_ITERATION(i) -
-

Arguments

-
-
i
-
- The relative depth of the frame whose iteration value is to be retreived.  - Valid values range from 0 to BOOST_PP_ITERATION_DEPTH() - 1. -
-
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-
- The argument i is interpreted as the number of frames outward from the current frame.  - Therefore, BOOST_PP_RELATIVE_ITERATION(0) is equivalent to BOOST_PP_ITERATION(). -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
-

Sample Code

-
-// file.h
-#if !BOOST_PP_IS_ITERATING
-
-   #ifndef FILE_H_
-   #define FILE_H_
-
-   #include <boost/preprocessor/iteration/iterate.hpp>
-
-1st iteration:
-   #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, 3, "file.h", 0x0001))
-   #include BOOST_PP_ITERATE()
-
-2nd iteration:
-   #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 10, "file.h", 0x0002))
-   #include BOOST_PP_ITERATE()
-
-   #endif
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1 /* ... */ \
-   && BOOST_PP_ITERATION_FLAGS() == 0x0001      \
-   /**/
-
-   --
-   #define BOOST_PP_ITERATION_PARAMS_2 (3, (1, 10, "file.h"))
-   #include BOOST_PP_ITERATE()
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1 /* ... */ \
-   && BOOST_PP_ITERATION_FLAGS() == 0x0002      \
-   /**/
-
-   --
-   #define BOOST_PP_ITERATION_PARAMS_2 /* ... */ \
-      (3, (1, BOOST_PP_ITERATION(), "file.h"))   \
-      /**/
-   #include BOOST_PP_ITERATE()
-
-#elif BOOST_PP_ITERATION_DEPTH() == 2 /* ... */ \
-   && BOOST_PP_FRAME_FLAGS(1) == 0x0001         \
-   /**/
-
-   --
-   #define BOOST_PP_ITERATION_PARAMS_3 /* ... */ \
-      (3, (1, BOOST_PP_ITERATION(), "file.h"))   \
-      /**/
-   #include BOOST_PP_ITERATE()
-
-#else // used by both
-
-   previous: BOOST_PP_RELATIVE_ITERATION(1)
-   current: BOOST_PP_ITERATION()
-
-#endif
-
- - diff --git a/docs.1/ref/relative_start.html b/docs.1/ref/relative_start.html deleted file mode 100644 index eddfee6..0000000 --- a/docs.1/ref/relative_start.html +++ /dev/null @@ -1,35 +0,0 @@ - - - BOOST_PP_RELATIVE_START - - - - -
- The BOOST_PP_RELATIVE_START macro expands to the lower bound of a file-iteration depth relative to the current depth. -
-

Usage

-
- BOOST_PP_RELATIVE_START(i) -
-

Arguments

-
-
i
-
- The relative depth of the frame whose lower bound is to be retreived.  - Valid values range from 0 to BOOST_PP_ITERATION_DEPTH() - 1. -
-
-

Remarks

-
- This macro is only valid when a file-iteration is in progress. -
-
- The argument i is interpreted as the number of frames outward from the current frame. -
-

Requirements

-
- Header:  <boost/preprocessor/iteration/iterate.hpp> -
- - diff --git a/docs.1/ref/repeat.html b/docs.1/ref/repeat.html deleted file mode 100644 index 5efc866..0000000 --- a/docs.1/ref/repeat.html +++ /dev/null @@ -1,70 +0,0 @@ - - - BOOST_PP_REPEAT - - - - -
- The BOOST_PP_REPEAT macro represents a fast horizontal repetition construct. -
-

Usage

-
- BOOST_PP_REPEAT(count, macro, data) -
-

Arguments

-
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) -
-
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_z. -
-
- Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  - This limitation no longer exists, as the library can automatically detect the next available repetition depth. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-#define DECL(z, n, text) text ## n = n;
-
-BOOST_PP_REPEAT(5, DECL, int x)
-
- - diff --git a/docs.1/ref/repeat_1st.html b/docs.1/ref/repeat_1st.html deleted file mode 100644 index 546c615..0000000 --- a/docs.1/ref/repeat_1st.html +++ /dev/null @@ -1,72 +0,0 @@ - - - BOOST_PP_REPEAT_1ST - - - - -
- The BOOST_PP_REPEAT_1ST macro represents the first dimension of BOOST_PP_REPEAT. -
-

Usage

-
- BOOST_PP_REPEAT_1ST(count, macro, data) -
-

Arguments

-
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT_1ST with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) -
-
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_z. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_REPEAT instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-#define DECL(z, n, text) text ## n = n;
-
-BOOST_PP_REPEAT_1ST(5, DECL, int x)
-
- - diff --git a/docs.1/ref/repeat_2nd.html b/docs.1/ref/repeat_2nd.html deleted file mode 100644 index d7ed26a..0000000 --- a/docs.1/ref/repeat_2nd.html +++ /dev/null @@ -1,72 +0,0 @@ - - - BOOST_PP_REPEAT_2ND - - - - -
- The BOOST_PP_REPEAT_2ND macro represents the second dimension of BOOST_PP_REPEAT. -
-

Usage

-
- BOOST_PP_REPEAT_2ND(count, macro, data) -
-

Arguments

-
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT_2ND with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) -
-
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_z. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_REPEAT instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-#define DECL(z, n, text) text ## n = n;
-
-BOOST_PP_REPEAT_2ND(5, DECL, int x)
-
- - diff --git a/docs.1/ref/repeat_3rd.html b/docs.1/ref/repeat_3rd.html deleted file mode 100644 index 43ae84f..0000000 --- a/docs.1/ref/repeat_3rd.html +++ /dev/null @@ -1,72 +0,0 @@ - - - BOOST_PP_REPEAT_3RD - - - - -
- The BOOST_PP_REPEAT_3RD macro represents the third dimension of BOOST_PP_REPEAT. -
-

Usage

-
- BOOST_PP_REPEAT_3RD(count, macro, data) -
-

Arguments

-
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT_3RD with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) -
-
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_z. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_REPEAT instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-#define DECL(z, n, text) text ## n = n;
-
-BOOST_PP_REPEAT_3RD(5, DECL, int x)
-
- - diff --git a/docs.1/ref/repeat_from_to.html b/docs.1/ref/repeat_from_to.html deleted file mode 100644 index 6f5ccf2..0000000 --- a/docs.1/ref/repeat_from_to.html +++ /dev/null @@ -1,85 +0,0 @@ - - - BOOST_PP_REPEAT_FROM_TO - - - - -
- The BOOST_PP_REPEAT_FROM_TO macro represents a fast horizontal repetition construct. -
-

Usage

-
- BOOST_PP_REPEAT_FROM_TO(first, last, macro, data) -
-

Arguments

-
-
first
-
- The lower bound of the repetition.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
last
-
- The upper bound of the repetition. - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) -
-
-
- The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. -
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_z. -
-
- Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  - This limitation no longer exists, as the library can automatically detect the next available repetition depth. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat_from_to.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-
-#define DECL(z, n, text) BOOST_PP_CAT(text, n) = n;
-
-BOOST_PP_REPEAT_FROM_TO(5, 10, DECL, int x)
-   /*
-      expands to:
-      int x5 = 5; int x6 = 6; int x7 = 7;
-      int x8 = 8; int x9 = 9;
-   */
-
- - diff --git a/docs.1/ref/repeat_from_to_1st.html b/docs.1/ref/repeat_from_to_1st.html deleted file mode 100644 index 67c092f..0000000 --- a/docs.1/ref/repeat_from_to_1st.html +++ /dev/null @@ -1,81 +0,0 @@ - - - BOOST_PP_REPEAT_FROM_TO_1ST - - - - -
- The BOOST_PP_REPEAT_FROM_TO_1ST macro represents the first dimension of BOOST_PP_REPEAT_FROM_TO. -
-

Usage

-
- BOOST_PP_REPEAT_FROM_TO_1ST(first, last, macro, data) -
-

Arguments

-
-
first
-
- The lower bound of the repetition.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
last
-
- The upper bound of the repetition. - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT_FROM_TO_1ST with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) -
-
-
- The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. -
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_z. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_REPEAT_FROM_TO instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat_from_to.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-
-#define MACRO(z, n, data) (n)
-
-BOOST_PP_REPEAT_FROM_TO_1ST(1, 6, MACRO, nil)
-   // expands to (1) (2) (3) (4) (5)
-
- - diff --git a/docs.1/ref/repeat_from_to_2nd.html b/docs.1/ref/repeat_from_to_2nd.html deleted file mode 100644 index aa924f2..0000000 --- a/docs.1/ref/repeat_from_to_2nd.html +++ /dev/null @@ -1,81 +0,0 @@ - - - BOOST_PP_REPEAT_FROM_TO_2ND - - - - -
- The BOOST_PP_REPEAT_FROM_TO_2ND macro represents the second dimension of BOOST_PP_REPEAT_FROM_TO. -
-

Usage

-
- BOOST_PP_REPEAT_FROM_TO_2ND(first, last, macro, data) -
-

Arguments

-
-
first
-
- The lower bound of the repetition.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
last
-
- The upper bound of the repetition. - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT_FROM_TO_2ND with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) -
-
-
- The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. -
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_z. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_REPEAT_FROM_TO instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat_from_to.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-
-#define MACRO(z, n, data) (n)
-
-BOOST_PP_REPEAT_FROM_TO_2ND(1, 6, MACRO, nil)
-   // expands to (1) (2) (3) (4) (5)
-
- - diff --git a/docs.1/ref/repeat_from_to_3rd.html b/docs.1/ref/repeat_from_to_3rd.html deleted file mode 100644 index a597a2e..0000000 --- a/docs.1/ref/repeat_from_to_3rd.html +++ /dev/null @@ -1,81 +0,0 @@ - - - BOOST_PP_REPEAT_FROM_TO_3RD - - - - -
- The BOOST_PP_REPEAT_FROM_TO_3RD macro represents the third dimension of BOOST_PP_REPEAT_FROM_TO. -
-

Usage

-
- BOOST_PP_REPEAT_FROM_TO_3RD(first, last, macro, data) -
-

Arguments

-
-
first
-
- The lower bound of the repetition.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
last
-
- The upper bound of the repetition. - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT_FROM_TO_3RD with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) -
-
-
- The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. -
-
- The z value that is passed to macro represents the next available repetition dimension.  - Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  - Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. -
-
- To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_z. -
-
- This macro is deprecated.  - It only exists for backward compatibility.  - Use BOOST_PP_REPEAT_FROM_TO instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat_from_to.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-
-#define MACRO(z, n, data) (n)
-
-BOOST_PP_REPEAT_FROM_TO_3RD(1, 6, MACRO, nil)
-   // expands to (1) (2) (3) (4) (5)
-
- - diff --git a/docs.1/ref/repeat_from_to_z.html b/docs.1/ref/repeat_from_to_z.html deleted file mode 100644 index 6d816a8..0000000 --- a/docs.1/ref/repeat_from_to_z.html +++ /dev/null @@ -1,95 +0,0 @@ - - - BOOST_PP_REPEAT_FROM_TO_z - - - - -
- The BOOST_PP_REPEAT_FROM_TO_z macro represents a reentry into the BOOST_PP_REPEAT_FROM_TO repetition construct. -
-

Usage

-
- BOOST_PP_REPEAT_FROM_TO_ ## z(first, last, macro, data) -
-

Arguments

-
-
z
-
- The next available BOOST_PP_REPEAT dimension. -
-
first
-
- The lower bound of the repetition.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
last
-
- The upper bound of the repetition. - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) -
-
-
- The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. -
-
- At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  - This happens when the z value is a macro invocation itself.  - It needs a delay to allow it to expand.  - The syntax in such a scenario becomes: -
- BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, z)(count, macro, data). -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat_from_to.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-
-#define TEXT(z, n, data) n data
-
-#define MACRO(z, n, data) /* ... */ \
-  (                                 \
-     BOOST_PP_REPEAT_FROM_TO_ ## z( \
-        1, 4,                       \
-        TEXT, xyz                   \
-     )                              \
-  )                                 \
-  /**/
-
-BOOST_PP_REPEAT(3, MACRO, _)
-   /*
-      expands to:
-      (1 xyz 2 xyz 3 xyz)
-      (1 xyz 2 xyz 3 xyz)
-      (1 xyz 2 xyz 3 xyz)
-   */
-
- - diff --git a/docs.1/ref/repeat_z.html b/docs.1/ref/repeat_z.html deleted file mode 100644 index cd86e30..0000000 --- a/docs.1/ref/repeat_z.html +++ /dev/null @@ -1,90 +0,0 @@ - - - BOOST_PP_REPEAT_z - - - - -
- The BOOST_PP_REPEAT_z macro represents a reentry into the BOOST_PP_REPEAT repetition construct. -
-

Usage

-
- BOOST_PP_REPEAT_ ## z(count, macro, data) -
-

Arguments

-
-
z
-
- The next available BOOST_PP_REPEAT dimension. -
-
count
-
- The number of repetitious calls to macro.  - Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. -
-
macro
-
- A ternary operation of the form macro(z, n, data).  - This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, - the current repetition number, and the auxiliary data argument.  -
-
data
-
- Auxiliary data passed to macro. -
-
-

Remarks

-
- This macro expands to the sequence: -
- macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) -
-
-
- At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  - This happens when the z value is a macro invocation itself.  - It needs a delay to allow it to expand.  - The syntax in such a scenario becomes: -
- BOOST_PP_CAT(BOOST_PP_REPEAT_, z)(count, macro, data) -
-
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/repetition/repeat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-#define TEXT(z, n, text) BOOST_PP_COMMA_IF(n) text
-
-#define TEMPLATE(z, n, _) /* ... */ \
-   BOOST_PP_COMMA_IF(n)             \
-   template<                        \
-      BOOST_PP_REPEAT_ ## z(        \
-         BOOST_PP_INC(n),           \
-         TEXT, class                \
-      )                             \
-   > class T ## n                   \
-   /**/
-
-BOOST_PP_REPEAT(3, TEMPLATE, nil)
-   /*
-   expands to:
-      template<class> class T0,
-      template<class, class> class T1,
-      template<class, class, class> class T2
-   */
-
- - diff --git a/docs.1/ref/rparen.html b/docs.1/ref/rparen.html deleted file mode 100644 index 8c7ae6b..0000000 --- a/docs.1/ref/rparen.html +++ /dev/null @@ -1,43 +0,0 @@ - - - BOOST_PP_RPAREN - - - - -
- The BOOST_PP_RPAREN macro expands to a right parenthesis. -
-

Usage

-
- BOOST_PP_RPAREN() -
-

Remarks

-
- The preprocessor interprets parentheses as delimiters in macro invocations.  - Because of this, parentheses require special handling. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/punctuation/paren.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/punctuation/paren.hpp>
-
-#define X(x) x
-#define MACRO(x, p) X ( x p
-
-MACRO(abc, BOOST_PP_RPAREN()) // expands to abc
-
-#define Y(x)
-
-MACRO(BOOST_PP_EMPTY BOOST_PP_RPAREN()(), 10) // expands to 10
-
- - diff --git a/docs.1/ref/rparen_if.html b/docs.1/ref/rparen_if.html deleted file mode 100644 index 58f3cf3..0000000 --- a/docs.1/ref/rparen_if.html +++ /dev/null @@ -1,51 +0,0 @@ - - - BOOST_PP_RPAREN_IF - - - - -
- The BOOST_PP_RPAREN_IF macro conditionally expands to a right parenthesis. -
-

Usage

-
- BOOST_PP_RPAREN_IF(cond) -
-

Arguments

-
-
cond
-
- The condition that determines if a the macro expands to a right parenthesis or nothing.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If cond expands to 0, this macro expands to nothing.  - Otherwise, it expands to a right parenthesis. -
-
- The preprocessor interprets parentheses as delimiters in macro invocations.  - Because of this, parentheses require special handling. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/punctuation/paren_if.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/punctuation/paren_if.hpp>
-
-#define MACRO(c, x) BOOST_PP_LPAREN_IF(c) x BOOST_PP_RPAREN_IF(c)
-
-MACRO(0, text) // expands to text
-MACRO(1, text) // expands to (text)
-
- - diff --git a/docs.1/ref/slot.html b/docs.1/ref/slot.html deleted file mode 100644 index ed75d38..0000000 --- a/docs.1/ref/slot.html +++ /dev/null @@ -1,50 +0,0 @@ - - - BOOST_PP_SLOT - - - - -
- The BOOST_PP_SLOT macro retrieves a value previously evaluated by BOOST_PP_ASSIGN_SLOT. -
-

Usage

-
- #include BOOST_PP_SLOT(i) -
-

Arguments

-
-
i
-
- The slot index to be retrieved.  - This value must be in the range of 1 to BOOST_PP_LIMIT_SLOT_COUNT. -
-
-

Remarks

-
- Prior to use, the slot at index i must have been assigned with BOOST_PP_ASSIGN_SLOT. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/slot/slot.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/slot/slot.hpp>
-
-#define X() 4
-
-#define BOOST_PP_VALUE 1 + 2 + 3 + X()
-#include BOOST_PP_ASSIGN_SLOT(1)
-
-#undef X
-
-BOOST_PP_SLOT(1) // expands to 10
-
- - diff --git a/docs.1/ref/stringize.html b/docs.1/ref/stringize.html deleted file mode 100644 index 9e362bf..0000000 --- a/docs.1/ref/stringize.html +++ /dev/null @@ -1,40 +0,0 @@ - - - BOOST_PP_STRINGIZE - - - - -
- The BOOST_PP_STRINGIZE macro stringizes its argument after it has been expanded. -
-

Usage

-
- BOOST_PP_STRINGIZE(text) -
-

Arguments

-
-
text
-
- The text to be converted to a string literal. -
-
-

Remarks

-
- The preprocessor stringizing operator (#) prevents arguments from expanding.  - This macro allows its argument to expand before it is stringized. -
- -

Requirements

-
- Header:  <boost/preprocessor/stringize.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/stringize.hpp>
-
-BOOST_PP_STRINGIZE(BOOST_PP_CAT(a, b)) // expands to "ab"
-
- - diff --git a/docs.1/ref/sub.html b/docs.1/ref/sub.html deleted file mode 100644 index eb377ad..0000000 --- a/docs.1/ref/sub.html +++ /dev/null @@ -1,53 +0,0 @@ - - - BOOST_PP_SUB - - - - -
- The BOOST_PP_SUB macro expands to the difference between its arguments. -
-

Usage

-
- BOOST_PP_SUB(x, y) -
-

Arguments

-
-
x
-
- The minuend of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The subtrahend of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If the difference between x and y is less than 0, the result is saturated to 0. -
-
- Previously, this macro could not be used inside BOOST_PP_WHILE.  - There is no longer any such restriction.  - It is more efficient, however, to use BOOST_PP_SUB_D in such a situation. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/sub.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/sub.hpp>
-
-BOOST_PP_SUB(4, 3) // expands to 1
-
- - diff --git a/docs.1/ref/sub_d.html b/docs.1/ref/sub_d.html deleted file mode 100644 index 08152bf..0000000 --- a/docs.1/ref/sub_d.html +++ /dev/null @@ -1,75 +0,0 @@ - - - BOOST_PP_SUB_D - - - - -
- The BOOST_PP_SUB_D macro expands to the difference between its second and third arguments.  - It reenters BOOST_PP_WHILE with maximum efficiency. -
-

Usage

-
- BOOST_PP_SUB_D(d, x, y) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration.  -
-
x
-
- The minuend of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
y
-
- The subtrahend of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If the difference between x and y is less than 0, the result is saturated to 0. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/arithmetic/sub.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/sub.hpp>
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define PRED(d, data) BOOST_PP_TUPLE_ELEM(2, 0, data)
-
-#define OP(d, data) /* ............... */ \
-   (                                      \
-      BOOST_PP_DEC(                       \
-         BOOST_PP_TUPLE_ELEM(2, 0, data)  \
-      ),                                  \
-      BOOST_PP_SUB_D(                     \
-         d,                               \
-         BOOST_PP_TUPLE_ELEM(2, 1, data), \
-         2                                \
-      )                                   \
-   )                                      \
-   /**/
-
-// decrement 'x' by 2 'n' times
-#define STRIDE(x, n) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_WHILE(PRED, OP, (n, x)))
-
-STRIDE(10, 2) // expands to 6
-STRIDE(14, 6) // expands to 2
-
- - diff --git a/docs.1/ref/tuple_eat.html b/docs.1/ref/tuple_eat.html deleted file mode 100644 index 8738788..0000000 --- a/docs.1/ref/tuple_eat.html +++ /dev/null @@ -1,48 +0,0 @@ - - - BOOST_PP_TUPLE_EAT - - - - -
- The BOOST_PP_TUPLE_EAT macro expands to a macro that eats a tuple of the specified size. -
-

Usage

-
- BOOST_PP_TUPLE_EAT(size) -
-

Arguments

-
-
size
-
- The size of the tuple to be eaten.  - Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  -
-
-

Remarks

-
- The size argument must be the actual size of the tuple. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/tuple/eat.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/tuple/eat.hpp>
-
-#define OP(a, b) (a b)
-
-#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT(2))(1, 2)
-
-MACRO(0) // expands to nothing
-MACRO(1) // expands to (1, 2)
-
- - diff --git a/docs.1/ref/tuple_elem.html b/docs.1/ref/tuple_elem.html deleted file mode 100644 index 302f96e..0000000 --- a/docs.1/ref/tuple_elem.html +++ /dev/null @@ -1,55 +0,0 @@ - - - BOOST_PP_TUPLE_ELEM - - - - -
- The BOOST_PP_TUPLE_ELEM macro extracts an element from a tuple. -
-

Usage

-
- BOOST_PP_TUPLE_ELEM(size, i, tuple) -
-

Arguments

-
-
size
-
- The size of the tuple.  - Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  -
-
i
-
- The zero-based index into the tuple of the element to be extracted.  - Valid values range from 0 to size - 1. -
-
tuple
-
- The tuple from which an element is to be extracted. -
-
-

Remarks

-
- The size argument must be the actual size of the tuple, - and i must be less than the size of the tuple. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/tuple/elem.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define TUPLE (a, b, c, d)
-
-BOOST_PP_TUPLE_ELEM(4, 0, TUPLE) // expands to a
-BOOST_PP_TUPLE_ELEM(4, 3, TUPLE) // expands to d
-
- - diff --git a/docs.1/ref/tuple_rem.html b/docs.1/ref/tuple_rem.html deleted file mode 100644 index 293a32a..0000000 --- a/docs.1/ref/tuple_rem.html +++ /dev/null @@ -1,42 +0,0 @@ - - - BOOST_PP_TUPLE_REM - - - - -
- The BOOST_PP_TUPLE_REM macro expands to a macro that removes the parentheses from a tuple of the specified size. -
-

Usage

-
- BOOST_PP_TUPLE_REM(size) -
-

Arguments

-
-
size
-
- The size of the tuple from which the parentheses are to be removed.  - Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  -
-
-

Remarks

-
- The size argument must be the actual size of the tuple. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/tuple/rem.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/tuple/rem.hpp>
-
-BOOST_PP_TUPLE_REM(3)(x, y, z) // expands to x, y, z
-
- - diff --git a/docs.1/ref/tuple_reverse.html b/docs.1/ref/tuple_reverse.html deleted file mode 100644 index afc6743..0000000 --- a/docs.1/ref/tuple_reverse.html +++ /dev/null @@ -1,46 +0,0 @@ - - - BOOST_PP_TUPLE_REVERSE - - - - -
- The BOOST_PP_TUPLE_REVERSE macro reverses a tuple of the specified size. -
-

Usage

-
- BOOST_PP_TUPLE_REVERSE(size, tuple) -
-

Arguments

-
-
size
-
- The size of the tuple to be reversed.  - Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  -
-
tuple
-
- The tuple to be reversed. -
-
-

Remarks

-
- The size argument must be the actual size of the tuple. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/tuple/reverse.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/tuple/reverse.hpp>
-
-BOOST_PP_TUPLE_REVERSE(3, (x, y, z)) // expands to (z, y, x)
-
- - diff --git a/docs.1/ref/tuple_to_list.html b/docs.1/ref/tuple_to_list.html deleted file mode 100644 index 3d2c162..0000000 --- a/docs.1/ref/tuple_to_list.html +++ /dev/null @@ -1,47 +0,0 @@ - - - BOOST_PP_TUPLE_TO_LIST - - - - -
- The BOOST_PP_TUPLE_TO_LIST macro converts a tuple to a list. -
-

Usage

-
- BOOST_PP_TUPLE_TO_LIST(size, tuple) -
-

Arguments

-
-
size
-
- The size of the tuple to be converted.  - Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  -
-
tuple
-
- The tuple to be converted. -
-
-

Remarks

-
- The size argument must be the actual size of the tuple. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/tuple/to_list.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/tuple/to_list.hpp>
-
-BOOST_PP_TUPLE_TO_LIST(3, (x, y, z))
-   // expands to (x, (y, (z, BOOST_PP_NIL)))
-
- - diff --git a/docs.1/ref/value.html b/docs.1/ref/value.html deleted file mode 100644 index 8284c5e..0000000 --- a/docs.1/ref/value.html +++ /dev/null @@ -1,27 +0,0 @@ - - - BOOST_PP_VALUE - - - - -
- The BOOST_PP_VALUE macro is a user-defined named external argument to BOOST_PP_ASSIGN_SLOT. -
-

Usage

-
- #define BOOST_PP_VALUE value -
-

Arguments

-
-
value
-
- An intergral constant expression to be evaluated by BOOST_PP_ASSIGN_SLOT. -
-
-

See Also

- - - diff --git a/docs.1/ref/while.html b/docs.1/ref/while.html deleted file mode 100644 index 68dd8e2..0000000 --- a/docs.1/ref/while.html +++ /dev/null @@ -1,106 +0,0 @@ - - - BOOST_PP_WHILE - - - - -
- The BOOST_PP_WHILE macro represents a looping construct. -
-

Usage

-
- BOOST_PP_WHILE(pred, op, state) -
-

Arguments

-
-
pred
-
- A binary predicate of the form pred(d, state).  - This predicate is expanded by BOOST_PP_WHILE with the next available - iteration d and the current state.  - This predicate must expand to value in the range of 0 to BOOST_PP_LIMIT_MAG. - The construct continues to loop until this predicate returns 0.  - When this predicate returns 0, BOOST_PP_WHILE returns the current state. -
-
op
-
- A binary operation of the form op(d, state).  - This operation is expanded by BOOST_PP_WHILE with the next available - iteration d and the current state.  - This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. -
-
state
-
- The initial state.  - Often this argument is a tuple. -
-
-

Remarks

-
- This macro iterates op(d, state) while pred(d, state) is non-zero.  - In other words expands to: -
- op(d, ... op(d, op(d, state)) ... ). -
-
-
- The d value that is passed to both pred and op represents the next available iteration.  - Other macros that have _D suffix variants internally use BOOST_PP_WHILE--for example, BOOST_PP_ADD and BOOST_PP_ADD_D.  - Using these _D versions is not strictly necessary, but passing the d value (that passed to pred or op) to these macros allows them to reenter BOOST_PP_WHILE with maximum efficiency. -
-
- To directly use this d value, rather than simply passing it to another macro, see BOOST_PP_WHILE_d. -
-
- Previously, this macro could not be used recursively inside BOOST_PP_WHILE.  - This limitation no longer exists, as the library can automatically detect the next available iteration. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/control/while.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/add.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define PRED(n, state) BOOST_PP_TUPLE_ELEM(2, 1, state)
-
-#define OP(d, state) /* ............ */ \
-   OP_D(                                \
-      d,                                \
-      BOOST_PP_TUPLE_ELEM(2, 0, state), \
-      BOOST_PP_TUPLE_ELEM(2, 1, state)  \
-   )                                    \
-   /**/
-
-#define OP_D(d, res, c) /* ... */ \
-   (                              \
-      BOOST_PP_ADD_D(             \
-         d,                       \
-         res,                     \
-         BOOST_PP_DEC(c)          \
-      ),                          \
-      BOOST_PP_DEC(c)             \
-   )                              \
-   /**/
-
-#define SUMMATION(n) /* ........... */ \
-   BOOST_PP_TUPLE_ELEM(                \
-      2, 0,                            \
-      BOOST_PP_WHILE(PRED, OP, (n, n)) \
-   )                                   \
-   /**/
-
-SUMMATION(3) // expands to 6
-SUMMATION(4) // expands to 10
-
- - diff --git a/docs.1/ref/while_d.html b/docs.1/ref/while_d.html deleted file mode 100644 index 9778793..0000000 --- a/docs.1/ref/while_d.html +++ /dev/null @@ -1,119 +0,0 @@ - - - BOOST_PP_WHILE_d - - - - -
- The BOOST_PP_WHILE_d macro represents a reentry into the BOOST_PP_WHILE looping construct. -
-

Usage

-
- BOOST_PP_WHILE_ ## d(pred, op, state) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
pred
-
- A binary predicate of the form pred(d, state).  - This predicate is expanded by BOOST_PP_WHILE with the next available - iteration d and the current state.  - This predicate must expand to value in the range of 0 to BOOST_PP_LIMIT_MAG. - The construct continues to loop until this predicate returns 0.  - When this predicate returns 0, BOOST_PP_WHILE returns the current state. -
-
op
-
- A binary operation of the form op(d, state).  - This operation is expanded by BOOST_PP_WHILE with the next available - iteration d and the current state.  - This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. -
-
state
-
- The initial state.  - Often this argument is a tuple. -
-
-

Remarks

-
- This macro iterates op(d, state) while pred(d, state) is non-zero.  - In other words expands to: -
- op(d, ... op(d, op(d, state)) ... ). -
-
-
- At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  - This happens when the d value is a macro invocation itself.  - It needs a delay to allow it to expand.  - The syntax in such a scenario becomes: -
- BOOST_PP_CAT(BOOST_PP_WHILE_, d)(pred, op, state). -
-
-
- Previously, it was possible to concatenate d directly to BOOST_PP_WHILE (without the trailing underscore).  - This is no longer supported. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/control/while.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/arithmetic/add.hpp>
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/array/elem.hpp>
-#include <boost/preprocessor/array/size.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-#define PRED(d, data) BOOST_PP_TUPLE_ELEM(3, 1, data)
-
-#define OP(d, data) /* ............ */ \
-   OP_D(                               \
-      d,                               \
-      BOOST_PP_TUPLE_ELEM(3, 0, data), \
-      BOOST_PP_TUPLE_ELEM(3, 1, data), \
-      BOOST_PP_TUPLE_ELEM(3, 2, data)  \
-   )                                   \
-   /**/
-
-#define OP_D(d, res, i, array) /* ................. */ \
-   (                                                   \
-      BOOST_PP_ADD_D(                                  \
-         d, res,                                       \
-         BOOST_PP_ARRAY_ELEM(BOOST_PP_DEC(i), array)), \
-      BOOST_PP_DEC(i),                                 \
-      array                                            \
-   )                                                   \
-   /**/
-
-#define ACCUMULATE_D(d, array) /* .......... */ \
-   BOOST_PP_TUPLE_ELEM(                         \
-      3, 0,                                     \
-      BOOST_PP_WHILE_ ## d(                     \
-         PRED, OP,                              \
-         (0, BOOST_PP_ARRAY_SIZE(array), array) \
-      )                                         \
-   )                                            \
-   /**/
-
-#define ARRAY (4, (1, 2, 3, 4))
-
-ACCUMULATE_D(1, ARRAY)// expands to 10
-
- - diff --git a/docs.1/ref/xor.html b/docs.1/ref/xor.html deleted file mode 100644 index afe0db8..0000000 --- a/docs.1/ref/xor.html +++ /dev/null @@ -1,54 +0,0 @@ - - - BOOST_PP_XOR - - - - -
- The BOOST_PP_XOR macro expands to the logical XOR of its operands. -
-

Usage

-
- BOOST_PP_XOR(p, q) -
-

Arguments

-
-
p
-
- The left operand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
q
-
- The right operand of the operation.  - Valid values range from 0 to BOOST_PP_LIMIT_MAG. -
-
-

Remarks

-
- If either p or q is non-zero exclusively, this macro expands to 1.  - Otherwise, it expands to 0. -
-
- This macro performs a boolean conversion on each operand before performing the logical XOR operation.  - If that conversion is not necessary, use BOOST_PP_BITXOR instead. -
-

See Also

- -

Requirements

-
- Header:  <boost/preprocessor/logical/xor.hpp> -
-

Sample Code

-
-#include <boost/preprocessor/logical/xor.hpp>
-
-BOOST_PP_XOR(4, 3) // expands to 0
-BOOST_PP_XOR(5, 0) // expands to 1
-
- - diff --git a/docs.1/scripts.js b/docs.1/scripts.js deleted file mode 100644 index 0d26080..0000000 --- a/docs.1/scripts.js +++ /dev/null @@ -1,24 +0,0 @@ -function init(id) { - document.getElementById(id).style.display = "none"; - return; -} - -function toggle(id) { - var x = document.getElementById(id); - x.style.display = x.style.display == "none" ? "block" : "none"; - return; -} - -function change(obj) { - obj.style.textDecoration = "underline"; - obj.style.cursor = "hand"; - obj.style.cursor = "pointer"; - obj.style.color = "orange"; - return; -} - -function revert(obj) { - obj.style.textDecoration = "none"; - obj.style.color = "black"; - return; -} diff --git a/docs.1/styles.css b/docs.1/styles.css deleted file mode 100644 index fd9548b..0000000 --- a/docs.1/styles.css +++ /dev/null @@ -1,72 +0,0 @@ -a { - color: black; - font-weight: normal; -} -a.na:link, a.na:visited { - color: #dddddd; - text-decoration: line-through; -} -a:link, a:visited, a:active { - color: gray; - text-decoration: none; -} -a.local { - font-weight: bold; -} -a:hover, a.na:hover { - color: blue; -} -body { - color: black; background-color: white; -} -.code { - color: black; background-color: #dddddd; - letter-spacing: 1px; - border: 1px solid; border-color: black; - padding-left: 12px; padding-right: 12px; padding-top: 5px; padding-bottom: 5px; - margin-left: 20px; -} -dd { - padding-left: 40px; - margin-left: 0px; margin-bottom: 10px; -} -div { - margin-top: 10px; margin-bottom: 10px; margin-left: 20px; -} -dl { - margin-top: 0px; margin-bottom: 0px; -} -dt { - font-style: italic; - padding-left: 20px; - margin-top: 10px; -} -h4 { - margin-top: 10px; margin-bottom: 10px; -} -.incompatibility { - color: red; -} -.indent { - margin-top: 0px; margin-bottom: 0px; -} -pre { - letter-spacing: 1px; - padding: 0px; - margin: 0px; -} -s { - color: #dddddd; -} -.sig { - font-style: italic; - color: #aaaaaa; -} -span { - display: block; - margin: 0px; -} -ul { - margin-top: 10px; margin-bottom: 10px; margin-left: 20px; - padding-left: 17px; -} diff --git a/docs.1/syntax.html b/docs.1/syntax.html deleted file mode 100644 index 4fc1b71..0000000 --- a/docs.1/syntax.html +++ /dev/null @@ -1,199 +0,0 @@ - - - syntax.html - - - -

Identifiers for Syntax Highlighting

-
-BOOST_PP_ADD
-BOOST_PP_ADD_D
-BOOST_PP_AND
-BOOST_PP_APPLY
-BOOST_PP_ARRAY_DATA
-BOOST_PP_ARRAY_ELEM
-BOOST_PP_ARRAY_SIZE
-BOOST_PP_ASSERT
-BOOST_PP_ASSERT_MSG
-BOOST_PP_ASSIGN_SLOT
-BOOST_PP_BITAND
-BOOST_PP_BITNOR
-BOOST_PP_BITOR
-BOOST_PP_BITXOR
-BOOST_PP_BOOL
-BOOST_PP_CAT
-BOOST_PP_COMMA
-BOOST_PP_COMMA_IF
-BOOST_PP_COMPL
-BOOST_PP_CONFIG_ERRORS
-BOOST_PP_CONFIG_EXTENDED_LINE_INFO
-BOOST_PP_CONFIG_UNROLLED
-BOOST_PP_DEC
-BOOST_PP_DIV
-BOOST_PP_DIV_D
-BOOST_PP_EMPTY
-BOOST_PP_ENUM
-BOOST_PP_ENUM_BINARY_PARAMS
-BOOST_PP_ENUM_BINARY_PARAMS_Z
-BOOST_PP_ENUM_PARAMS
-BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT
-BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS
-BOOST_PP_ENUM_PARAMS_Z
-BOOST_PP_ENUM_SHIFTED
-BOOST_PP_ENUM_SHIFTED_PARAMS
-BOOST_PP_ENUM_SHIFTED_PARAMS_Z
-BOOST_PP_ENUM_SHIFTED_
-BOOST_PP_ENUM_
-BOOST_PP_EQUAL
-BOOST_PP_EQUAL_D
-BOOST_PP_EXPAND
-BOOST_PP_EXPR_IF
-BOOST_PP_EXPR_IIF
-BOOST_PP_FILENAME_1
-BOOST_PP_FILENAME_2
-BOOST_PP_FILENAME_3
-BOOST_PP_FILENAME_4
-BOOST_PP_FILENAME_5
-BOOST_PP_FOR
-BOOST_PP_FOR_
-BOOST_PP_FRAME_FINISH
-BOOST_PP_FRAME_FLAGS
-BOOST_PP_FRAME_ITERATION
-BOOST_PP_FRAME_START
-BOOST_PP_GREATER
-BOOST_PP_GREATER_D
-BOOST_PP_GREATER_EQUAL
-BOOST_PP_GREATER_EQUAL_D
-BOOST_PP_IDENTITY
-BOOST_PP_IF
-BOOST_PP_IIF
-BOOST_PP_INC
-BOOST_PP_INCLUDE_SELF
-BOOST_PP_INDIRECT_SELF
-BOOST_PP_INFINITY
-BOOST_PP_INTERCEPT
-BOOST_PP_IS_ITERATING
-BOOST_PP_IS_SELFISH
-BOOST_PP_ITERATE
-BOOST_PP_ITERATION
-BOOST_PP_ITERATION_DEPTH
-BOOST_PP_ITERATION_FINISH
-BOOST_PP_ITERATION_FLAGS
-BOOST_PP_ITERATION_LIMITS
-BOOST_PP_ITERATION_PARAMS_1
-BOOST_PP_ITERATION_PARAMS_2
-BOOST_PP_ITERATION_PARAMS_3
-BOOST_PP_ITERATION_PARAMS_4
-BOOST_PP_ITERATION_PARAMS_5
-BOOST_PP_ITERATION_START
-BOOST_PP_LESS
-BOOST_PP_LESS_D
-BOOST_PP_LESS_EQUAL
-BOOST_PP_LESS_EQUAL_D
-BOOST_PP_LIMIT_BOOL
-BOOST_PP_LIMIT_DIM
-BOOST_PP_LIMIT_FOR
-BOOST_PP_LIMIT_ITERATION
-BOOST_PP_LIMIT_ITERATION_DIM
-BOOST_PP_LIMIT_MAG
-BOOST_PP_LIMIT_REPEAT
-BOOST_PP_LIMIT_SLOT_COUNT
-BOOST_PP_LIMIT_SLOT_SIG
-BOOST_PP_LIMIT_TUPLE
-BOOST_PP_LIMIT_WHILE
-BOOST_PP_LIST_APPEND
-BOOST_PP_LIST_APPEND_D
-BOOST_PP_LIST_AT
-BOOST_PP_LIST_AT_D
-BOOST_PP_LIST_CAT
-BOOST_PP_LIST_CAT_D
-BOOST_PP_LIST_CONS
-BOOST_PP_LIST_ENUM
-BOOST_PP_LIST_ENUM_R
-BOOST_PP_LIST_FILTER
-BOOST_PP_LIST_FILTER_D
-BOOST_PP_LIST_FIRST
-BOOST_PP_LIST_FIRST_N
-BOOST_PP_LIST_FIRST_N_D
-BOOST_PP_LIST_FOLD_LEFT
-BOOST_PP_LIST_FOLD_LEFT_2ND
-BOOST_PP_LIST_FOLD_LEFT_2ND_D
-BOOST_PP_LIST_FOLD_LEFT_
-BOOST_PP_LIST_FOLD_LEFT_D
-BOOST_PP_LIST_FOLD_RIGHT
-BOOST_PP_LIST_FOLD_RIGHT_2ND
-BOOST_PP_LIST_FOLD_RIGHT_2ND_D
-BOOST_PP_LIST_FOLD_RIGHT_
-BOOST_PP_LIST_FOLD_RIGHT_D
-BOOST_PP_LIST_FOR_EACH
-BOOST_PP_LIST_FOR_EACH_I
-BOOST_PP_LIST_FOR_EACH_I_R
-BOOST_PP_LIST_FOR_EACH_PRODUCT
-BOOST_PP_LIST_FOR_EACH_PRODUCT_R
-BOOST_PP_LIST_FOR_EACH_R
-BOOST_PP_LIST_IS_CONS
-BOOST_PP_LIST_IS_NIL
-BOOST_PP_LIST_NIL
-BOOST_PP_LIST_REST
-BOOST_PP_LIST_REST_N
-BOOST_PP_LIST_REST_N_D
-BOOST_PP_LIST_REVERSE
-BOOST_PP_LIST_REVERSE_D
-BOOST_PP_LIST_SIZE
-BOOST_PP_LIST_SIZE_D
-BOOST_PP_LIST_TO_TUPLE
-BOOST_PP_LIST_TO_TUPLE_R
-BOOST_PP_LIST_TRANSFORM
-BOOST_PP_LIST_TRANSFORM_D
-BOOST_PP_LINE
-BOOST_PP_LOCAL_ITERATE
-BOOST_PP_LOCAL_LIMITS
-BOOST_PP_LOCAL_MACRO
-BOOST_PP_LPAREN
-BOOST_PP_LPAREN_IF
-BOOST_PP_MAX
-BOOST_PP_MAX_D
-BOOST_PP_MIN
-BOOST_PP_MIN_D
-BOOST_PP_MOD
-BOOST_PP_MOD_D
-BOOST_PP_MUL
-BOOST_PP_MUL_D
-BOOST_PP_NIL
-BOOST_PP_NOR
-BOOST_PP_NOT
-BOOST_PP_NOT_EQUAL
-BOOST_PP_NOT_EQUAL_D
-BOOST_PP_OR
-BOOST_PP_RELATIVE_FINISH
-BOOST_PP_RELATIVE_FLAGS
-BOOST_PP_RELATIVE_ITERATION
-BOOST_PP_RELATIVE_START
-BOOST_PP_REPEAT
-BOOST_PP_REPEAT_1ST
-BOOST_PP_REPEAT_2ND
-BOOST_PP_REPEAT_3RD
-BOOST_PP_REPEAT_
-BOOST_PP_REPEAT_FROM_TO
-BOOST_PP_REPEAT_FROM_TO_1ST
-BOOST_PP_REPEAT_FROM_TO_2ND
-BOOST_PP_REPEAT_FROM_TO_3RD
-BOOST_PP_REPEAT_FROM_TO_
-BOOST_PP_RPAREN
-BOOST_PP_RPAREN_IF
-BOOST_PP_SLOT
-BOOST_PP_STRINGIZE
-BOOST_PP_SUB
-BOOST_PP_SUB_D
-BOOST_PP_TUPLE_EAT
-BOOST_PP_TUPLE_ELEM
-BOOST_PP_TUPLE_REM
-BOOST_PP_TUPLE_REVERSE
-BOOST_PP_TUPLE_TO_LIST
-BOOST_PP_VALUE
-BOOST_PP_WHILE
-BOOST_PP_WHILE_
-BOOST_PP_XOR -
- - diff --git a/docs.1/top.html b/docs.1/top.html deleted file mode 100644 index fb3e1c3..0000000 --- a/docs.1/top.html +++ /dev/null @@ -1,27 +0,0 @@ - - - top.html - - - - - - - - -
- The Boost Library
- Preprocessor Subset for C/C++ -
- - From 7856c3b75945c72572d9fc42bc46c906b5e45a7a Mon Sep 17 00:00:00 2001 From: Paul Mensonides Date: Thu, 3 Oct 2002 21:55:27 +0000 Subject: [PATCH 2/5] new tests [SVN r15688] --- test/arithmetic.cpp | 63 +++++++++++++++++++++++++++++++++++++++++++++ test/array.cpp | 26 +++++++++++++++++++ test/comparison.cpp | 46 +++++++++++++++++++++++++++++++++ test/control.cpp | 41 +++++++++++++++++++++++++++++ test/debug.cpp | 22 ++++++++++++++++ test/facilities.cpp | 29 +++++++++++++++++++++ test/iteration.cpp | 34 ++++++++++++++++++++++++ test/list.cpp | 55 +++++++++++++++++++++++++++++++++++++++ test/logical.cpp | 37 ++++++++++++++++++++++++++ test/repetition.cpp | 51 ++++++++++++++++++++++++++++++++++++ test/selection.cpp | 22 ++++++++++++++++ test/slot.cpp | 28 ++++++++++++++++++++ test/tuple.cpp | 25 ++++++++++++++++++ 13 files changed, 479 insertions(+) create mode 100644 test/arithmetic.cpp create mode 100644 test/array.cpp create mode 100644 test/comparison.cpp create mode 100644 test/control.cpp create mode 100644 test/debug.cpp create mode 100644 test/facilities.cpp create mode 100644 test/iteration.cpp create mode 100644 test/list.cpp create mode 100644 test/logical.cpp create mode 100644 test/repetition.cpp create mode 100644 test/selection.cpp create mode 100644 test/slot.cpp create mode 100644 test/tuple.cpp diff --git a/test/arithmetic.cpp b/test/arithmetic.cpp new file mode 100644 index 0000000..6d3cf31 --- /dev/null +++ b/test/arithmetic.cpp @@ -0,0 +1,63 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include +# include + +// addition + +BEGIN BOOST_PP_ADD(2, 3) == 5 END + +BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), 2) == 6 END +BEGIN BOOST_PP_ADD(2, BOOST_PP_ADD(1, 4)) == 7 END +BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), BOOST_PP_ADD(2, 2)) == 8 END + +// subtraction + +BEGIN BOOST_PP_SUB(11, 0) == 11 END +BEGIN BOOST_PP_SUB(12, 1) == 11 END +BEGIN BOOST_PP_SUB(3, 4) == 0 END + +BEGIN BOOST_PP_SUB(5, BOOST_PP_SUB(3, 2)) == 4 END +BEGIN BOOST_PP_SUB(BOOST_PP_SUB(10, 5), 2) == 3 END +BEGIN BOOST_PP_SUB(BOOST_PP_SUB(7, 3), BOOST_PP_SUB(10, 8)) == 2 END + +// multiplication + +BEGIN BOOST_PP_MUL(0, 1) == 0 END +BEGIN BOOST_PP_MUL(1, 0) == 0 END +BEGIN BOOST_PP_MUL(1, 1) == 1 END +BEGIN BOOST_PP_MUL(4, 3) == 12 END + +BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), 2) == 8 END +BEGIN BOOST_PP_MUL(2, BOOST_PP_MUL(2, 2)) == 8 END +BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), BOOST_PP_MUL(2, 2)) == 16 END + +// division + +BEGIN BOOST_PP_DIV(2, 1) == 2 END +BEGIN BOOST_PP_DIV(0, 5) == 0 END +BEGIN BOOST_PP_DIV(7, 3) == 2 END + +BEGIN BOOST_PP_DIV(BOOST_PP_DIV(4, 2), 2) == 1 END +BEGIN BOOST_PP_DIV(10, BOOST_PP_DIV(10, 2)) == 2 END +BEGIN BOOST_PP_DIV(BOOST_PP_DIV(10, 2), BOOST_PP_DIV(4, 2)) == 2 END + +// modulus + +BEGIN BOOST_PP_MOD(5, 5) == 0 END +BEGIN BOOST_PP_MOD(9, 5) == 4 END +BEGIN BOOST_PP_MOD(7, 4) == 3 END + +BEGIN BOOST_PP_MOD(BOOST_PP_MOD(5, 3), 3) == 2 END +BEGIN BOOST_PP_MOD(5, BOOST_PP_MOD(4, 3)) == 0 END diff --git a/test/array.cpp b/test/array.cpp new file mode 100644 index 0000000..a093c76 --- /dev/null +++ b/test/array.cpp @@ -0,0 +1,26 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include + +# define ARRAY (3, (0, 1, 2)) + +// element access + +BEGIN BOOST_PP_ARRAY_ELEM(1, ARRAY) == 1 END +BEGIN BOOST_PP_ARRAY_ELEM(2, (5, (0, 1, 2, 3, 4))) == 2 END + +// size + +BEGIN BOOST_PP_ARRAY_SIZE(ARRAY) == 3 END +BEGIN BOOST_PP_ARRAY_SIZE((5, (0, 1, 2, 3, 4))) == 5 END diff --git a/test/comparison.cpp b/test/comparison.cpp new file mode 100644 index 0000000..a8cd002 --- /dev/null +++ b/test/comparison.cpp @@ -0,0 +1,46 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include + +// equality + +BEGIN BOOST_PP_EQUAL(2, 0) == 0 END +BEGIN BOOST_PP_EQUAL(2, 2) == 1 END + +// inequality + +BEGIN BOOST_PP_NOT_EQUAL(2, 0) == 1 END +BEGIN BOOST_PP_NOT_EQUAL(2, 2) == 0 END + +// less + +BEGIN BOOST_PP_LESS(2, 1) == 0 END +BEGIN BOOST_PP_LESS(1, 2) == 1 END + +// less_equal + +BEGIN BOOST_PP_LESS_EQUAL(2, 1) == 0 END +BEGIN BOOST_PP_LESS_EQUAL(1, 2) == 1 END +BEGIN BOOST_PP_LESS_EQUAL(2, 2) == 1 END + +// greater + +BEGIN BOOST_PP_GREATER(2, 1) == 1 END +BEGIN BOOST_PP_GREATER(1, 2) == 0 END + +// greater_equal + +BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END +BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END +BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END diff --git a/test/control.cpp b/test/control.cpp new file mode 100644 index 0000000..ffa54a8 --- /dev/null +++ b/test/control.cpp @@ -0,0 +1,41 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include +# include +# include + +# define TR(x) 1 + +BEGIN BOOST_PP_EXPR_IIF(0, TR)(0) == 0 END +BEGIN BOOST_PP_EXPR_IIF(1, TR)(0) == 1 END + +BEGIN BOOST_PP_EXPR_IF(3, TR)(0) == 1 END +BEGIN BOOST_PP_EXPR_IF(0, TR)(0) == 0 END + +BEGIN BOOST_PP_IIF(0, 1, 0) == 0 END +BEGIN BOOST_PP_IIF(1, 1, 0) == 1 END + +BEGIN BOOST_PP_IF(0, 1, 0) == 0 END +BEGIN BOOST_PP_IF(9, 1, 0) == 1 END + +# define PRED(d, state) state +# define OP_1(d, state) BOOST_PP_DEC(state) + +BEGIN BOOST_PP_WHILE(PRED, OP_1, 50) == 0 END + +# define OP_2(d, state) BOOST_PP_DEC(BOOST_PP_ADD(BOOST_PP_WHILE(PRED, OP_1, state), state)) +# define OP_3(d, state) BOOST_PP_DEC(BOOST_PP_ADD_D(d, BOOST_PP_WHILE_ ## d(PRED, OP_1, state), state)) + +BEGIN BOOST_PP_WHILE(PRED, OP_3, 10) == 0 END +BEGIN BOOST_PP_WHILE(PRED, OP_3, 10) == 0 END diff --git a/test/debug.cpp b/test/debug.cpp new file mode 100644 index 0000000..d4094bf --- /dev/null +++ b/test/debug.cpp @@ -0,0 +1,22 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include + +BEGIN sizeof(BOOST_PP_ASSERT_MSG(0, "text") "") / sizeof(char) != 1 END +BEGIN sizeof(BOOST_PP_ASSERT_MSG(1, "text") "") / sizeof(char) == 1 END + +BOOST_PP_ASSERT(10) + +# line BOOST_PP_LINE(100, __FILE__) +BEGIN __LINE__ == 100 END diff --git a/test/facilities.cpp b/test/facilities.cpp new file mode 100644 index 0000000..9a8f3e6 --- /dev/null +++ b/test/facilities.cpp @@ -0,0 +1,29 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include +# include + +BEGIN BOOST_PP_APPLY(BOOST_PP_NIL) 0 == 0 END +BEGIN BOOST_PP_APPLY((0)) == 0 END + +BEGIN BOOST_PP_APPLY((BOOST_PP_EMPTY))() 0 == 0 END + +# define MACRO(x, y, z) 1 +# define ARGS (1, 2, 3) + +BEGIN BOOST_PP_EXPAND(MACRO ARGS) == 1 END + +BEGIN BOOST_PP_IDENTITY(1)() == 1 END + +BEGIN BOOST_PP_CAT(BOOST_PP_INTERCEPT, 2) 1 == 1 END diff --git a/test/iteration.cpp b/test/iteration.cpp new file mode 100644 index 0000000..d7d7949 --- /dev/null +++ b/test/iteration.cpp @@ -0,0 +1,34 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if !BOOST_PP_IS_SELFISH +# +# include +# +# define TEST(n) BEGIN n == n END +# +# define BOOST_PP_LOCAL_MACRO(n) TEST(n) +# define BOOST_PP_LOCAL_LIMITS (1, 5) +# include BOOST_PP_LOCAL_ITERATE() +# +# define BOOST_PP_LOCAL_MACRO(n) TEST(n) +# define BOOST_PP_LOCAL_LIMITS (5, 1) +# include BOOST_PP_LOCAL_ITERATE() +# +# define BOOST_PP_INDIRECT_SELF +# include BOOST_PP_INCLUDE_SELF() +# +# else + +BEGIN BOOST_PP_IS_SELFISH == 1 END + +# endif diff --git a/test/list.cpp b/test/list.cpp new file mode 100644 index 0000000..7e84f5a --- /dev/null +++ b/test/list.cpp @@ -0,0 +1,55 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include +# include +# include +# include +# include + +# define LIST (4, (1, (5, (2, BOOST_PP_NIL)))) + +# define REVERSAL(d, x, y) BOOST_PP_SUB_D(d, y, x) + +BEGIN BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_SUB_D, 22, LIST) == 10 END +BEGIN BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_ADD_D, 0, LIST) == 12 END +BEGIN BOOST_PP_LIST_FOLD_RIGHT(REVERSAL, 0, LIST) == 4 END + +BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REVERSE(LIST)) == 2514 END + +BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REST_N(2, LIST)) == 52 END +BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FIRST_N(2, LIST)) == 41 END + +BEGIN BOOST_PP_LIST_AT(LIST, 2) == 5 END +BEGIN BOOST_PP_LIST_SIZE(LIST) == 4 END + +BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D, 2, LIST)) == 6374 END +BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(BOOST_PP_LIST_REST(LIST), LIST)) == 1524152 END + +# define F1(r, state, x) + x + state +BEGIN BOOST_PP_LIST_FOR_EACH(F1, 1, LIST) == 16 END + +BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_LIST_TO_TUPLE(LIST)) == 2 END + +BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FILTER(BOOST_PP_LESS_D, 3, LIST)) == 45 END + +# define F2(r, x) + BOOST_PP_TUPLE_ELEM(2, 0, x) + 2 - BOOST_PP_TUPLE_ELEM(2, 1, x) +BEGIN BOOST_PP_LIST_FOR_EACH_PRODUCT(F2, 2, ( (1, (0, BOOST_PP_NIL)), (2, (3, BOOST_PP_NIL)) )) == 0 END + +# define L1 (0, (x, BOOST_PP_NIL)) +# define L2 (a, (1, (b, (2, BOOST_PP_NIL)))) +# define L3 (c, (3, (d, BOOST_PP_NIL))) + +# define LL (L1, (L2, (L3, BOOST_PP_NIL))) + +BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_APPEND_D, BOOST_PP_NIL, LL)) == 0x0a1b2c3d END diff --git a/test/logical.cpp b/test/logical.cpp new file mode 100644 index 0000000..178aa1b --- /dev/null +++ b/test/logical.cpp @@ -0,0 +1,37 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include + +BEGIN BOOST_PP_NOT(0) == 1 END +BEGIN BOOST_PP_NOT(2) == 0 END + +BEGIN BOOST_PP_AND(0, 0) == 0 END +BEGIN BOOST_PP_AND(0, 3) == 0 END +BEGIN BOOST_PP_AND(4, 0) == 0 END +BEGIN BOOST_PP_AND(5, 6) == 1 END + +BEGIN BOOST_PP_OR(0, 0) == 0 END +BEGIN BOOST_PP_OR(0, 7) == 1 END +BEGIN BOOST_PP_OR(8, 0) == 1 END +BEGIN BOOST_PP_OR(9, 1) == 1 END + +BEGIN BOOST_PP_XOR(0, 0) == 0 END +BEGIN BOOST_PP_XOR(0, 2) == 1 END +BEGIN BOOST_PP_XOR(3, 0) == 1 END +BEGIN BOOST_PP_XOR(4, 5) == 0 END + +BEGIN BOOST_PP_NOR(0, 0) == 1 END +BEGIN BOOST_PP_NOR(0, 6) == 0 END +BEGIN BOOST_PP_NOR(7, 0) == 0 END +BEGIN BOOST_PP_NOR(8, 9) == 0 END diff --git a/test/repetition.cpp b/test/repetition.cpp new file mode 100644 index 0000000..cde9a4c --- /dev/null +++ b/test/repetition.cpp @@ -0,0 +1,51 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include +# include +# include +# include +# include +# include + +# define MAX 10 + +# define NTH(z, n, data) data ## n + +int add(BOOST_PP_ENUM_PARAMS(MAX, int x)) { + return BOOST_PP_REPEAT(MAX, NTH, + x); +} + +const int r = add(BOOST_PP_ENUM_PARAMS(MAX, 1 BOOST_PP_INTERCEPT)); + +# define CONSTANT(z, n, text) BOOST_PP_CAT(text, n) = n +const int BOOST_PP_ENUM(MAX, CONSTANT, default_param_); + +# define TEST(n) \ + void BOOST_PP_CAT(test_enum_params, n)(BOOST_PP_ENUM_PARAMS(n, int x)); \ + void BOOST_PP_CAT(test_enum_params_with_a_default, n)(BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(n, int x, 0)); \ + void BOOST_PP_CAT(test_enum_params_with_defaults, n)(BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(n, int x, default_param_)); + +TEST(0) +TEST(MAX) + +template struct no_rescan; + +# define F1(z, n, p) p n +BEGIN 1 + (4+5+6) BOOST_PP_REPEAT_FROM_TO(4, 7, F1, -) END + +# define PRED(r, state) BOOST_PP_NOT_EQUAL(state, BOOST_PP_INC(MAX)) +# define OP(r, state) BOOST_PP_INC(state) +# define MACRO(r, state) BOOST_PP_COMMA_IF(BOOST_PP_NOT_EQUAL(state, 1)) BOOST_PP_CAT(class T, state) + +template struct for_test; diff --git a/test/selection.cpp b/test/selection.cpp new file mode 100644 index 0000000..3491f72 --- /dev/null +++ b/test/selection.cpp @@ -0,0 +1,22 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include + +BEGIN BOOST_PP_MAX(2, 2) == 2 END +BEGIN BOOST_PP_MAX(2, 1) == 2 END +BEGIN BOOST_PP_MAX(1, 2) == 2 END + +BEGIN BOOST_PP_MIN(2, 2) == 2 END +BEGIN BOOST_PP_MIN(2, 1) == 1 END +BEGIN BOOST_PP_MIN(1, 2) == 1 END diff --git a/test/slot.cpp b/test/slot.cpp new file mode 100644 index 0000000..24047a0 --- /dev/null +++ b/test/slot.cpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include + +# define X() 4 + +# define BOOST_PP_VALUE 1 + 2 + 3 + X() +# include BOOST_PP_ASSIGN_SLOT(1) + +# undef X + +BEGIN BOOST_PP_SLOT(1) == 10 END + +# define BOOST_PP_VALUE BOOST_PP_SLOT(1) * BOOST_PP_SLOT(1) +# include BOOST_PP_ASSIGN_SLOT(1) + +BEGIN BOOST_PP_SLOT(1) == 100 END diff --git a/test/tuple.cpp b/test/tuple.cpp new file mode 100644 index 0000000..9e1dc8d --- /dev/null +++ b/test/tuple.cpp @@ -0,0 +1,25 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# include + +# define TUPLE (0, 1, 2, 3, 4, 5) + +BEGIN BOOST_PP_TUPLE_ELEM(6, 3, TUPLE) == 3 END +BEGIN BOOST_PP_TUPLE_ELEM(6, 5, TUPLE) == 5 END + +# define CALC(x) BOOST_PP_TUPLE_ELEM(3, 0, x) BOOST_PP_TUPLE_ELEM(3, 1, x) BOOST_PP_TUPLE_ELEM(3, 2, x) +# define T2 (+3, /2, +6) + +BEGIN CALC(T2) == 7 END +BEGIN CALC(BOOST_PP_TUPLE_REVERSE(3, T2)) == 6 END From ae584c68b226333aed88dc0e7e3dab947e8005ce Mon Sep 17 00:00:00 2001 From: Paul Mensonides Date: Thu, 3 Oct 2002 22:04:13 +0000 Subject: [PATCH 3/5] lib cleanup [SVN r15689] --- doc/acknowledgements.htm | 43 -- doc/bibliography.htm | 48 -- doc/examples.htm | 91 ---- doc/examples/array_arithmetic.c | 197 ++++++++ doc/examples/catch_builtin.cpp | 52 ++ doc/examples/delay.c | 96 ++++ doc/examples/duffs_device.c | 62 +++ doc/examples/is_integral.cpp | 50 ++ doc/examples/linear_fib.c | 92 ++++ doc/examples/out.cpp | 16 + doc/examples_preprocessed.htm | 326 ------------- doc/index.htm | 48 -- doc/keywords.txt | 99 ---- doc/known_problems_with_cpp.htm | 125 ----- doc/problems_with_compilers.htm | 138 ------ doc/reference/arithmetic.htm | 41 -- doc/reference/arithmetic_add.htm | 59 --- doc/reference/arithmetic_div.htm | 59 --- doc/reference/arithmetic_mod.htm | 59 --- doc/reference/arithmetic_mul.htm | 59 --- doc/reference/arithmetic_sub.htm | 59 --- doc/reference/assert_msg.htm | 49 -- doc/reference/cat.htm | 57 --- doc/reference/comma.htm | 60 --- doc/reference/comma_if.htm | 49 -- doc/reference/comparison.htm | 41 -- doc/reference/comparison_equal.htm | 59 --- doc/reference/comparison_greater.htm | 59 --- doc/reference/comparison_greater_equal.htm | 59 --- doc/reference/comparison_less.htm | 59 --- doc/reference/comparison_less_equal.htm | 59 --- doc/reference/comparison_not_equal.htm | 59 --- doc/reference/dec.htm | 52 -- doc/reference/empty.htm | 62 --- doc/reference/enum.htm | 81 ---- doc/reference/enum_params.htm | 72 --- doc/reference/enum_params_with_a_default.htm | 75 --- doc/reference/enum_params_with_defaults.htm | 75 --- doc/reference/enum_shifted.htm | 69 --- doc/reference/enum_shifted_params.htm | 77 --- doc/reference/expand.htm | 43 -- doc/reference/expr_if.htm | 53 -- doc/reference/for.htm | 114 ----- doc/reference/identity.htm | 64 --- doc/reference/if.htm | 59 --- doc/reference/inc.htm | 53 -- doc/reference/index.htm | 225 --------- doc/reference/limits.htm | 71 --- doc/reference/list.htm | 53 -- doc/reference/list_adt.htm | 135 ------ doc/reference/list_append.htm | 68 --- doc/reference/list_at.htm | 62 --- doc/reference/list_cat.htm | 65 --- doc/reference/list_enum.htm | 65 --- doc/reference/list_filter.htm | 66 --- doc/reference/list_first_n.htm | 71 --- doc/reference/list_fold_left.htm | 103 ---- doc/reference/list_fold_left_2nd.htm | 46 -- doc/reference/list_fold_right.htm | 106 ---- doc/reference/list_fold_right_2nd.htm | 46 -- doc/reference/list_for_each.htm | 81 ---- doc/reference/list_for_each_i.htm | 71 --- doc/reference/list_for_each_product.htm | 82 ---- doc/reference/list_rest_n.htm | 71 --- doc/reference/list_reverse.htm | 65 --- doc/reference/list_size.htm | 61 --- doc/reference/list_to_tuple.htm | 67 --- doc/reference/list_transform.htm | 76 --- doc/reference/logical.htm | 41 -- doc/reference/logical_and.htm | 54 --- doc/reference/logical_bool.htm | 48 -- doc/reference/logical_nor.htm | 54 --- doc/reference/logical_not.htm | 53 -- doc/reference/logical_or.htm | 54 --- doc/reference/logical_xor.htm | 54 --- doc/reference/max.htm | 59 --- doc/reference/min.htm | 59 --- doc/reference/repeat.htm | 95 ---- doc/reference/repeat_2nd.htm | 46 -- doc/reference/repeat_3rd.htm | 46 -- doc/reference/repeat_from_to.htm | 89 ---- doc/reference/repeat_from_to_2nd.htm | 46 -- doc/reference/repeat_from_to_3rd.htm | 46 -- doc/reference/stringize.htm | 56 --- doc/reference/tuple.htm | 58 --- doc/reference/tuple_eat.htm | 55 --- doc/reference/tuple_elem.htm | 57 --- doc/reference/tuple_reverse.htm | 52 -- doc/reference/tuple_to_list.htm | 64 --- doc/reference/while.htm | 107 ----- doc/tutorial.htm | 478 ------------------- example/array_arithmetic.c | 145 ------ example/catch_builtin.cpp | 50 -- example/count_down.c | 30 -- example/delay.c | 92 ---- example/duffs_device.c | 63 --- example/is_integral.cpp | 38 -- example/linear_fib.c | 91 ---- example/note.c | 22 - example/repeat_2d.c | 69 --- example/static_assert.c | 29 -- example/subscript_layer.cpp | 30 -- regression/arithmetic.cpp | 63 --- regression/array.cpp | 26 - regression/comparison.cpp | 46 -- regression/control.cpp | 41 -- regression/debug.cpp | 22 - regression/facilities.cpp | 29 -- regression/iteration.cpp | 34 -- regression/iteration.h | 61 --- regression/list.cpp | 55 --- regression/logical.cpp | 37 -- regression/repetition.cpp | 51 -- regression/selection.cpp | 22 - regression/slot.cpp | 28 -- regression/test.h | 33 -- regression/tuple.cpp | 25 - test/arithmetic_test.cpp | 69 --- test/for_test.cpp | 28 -- test/list_test.cpp | 57 --- test/logical_test.cpp | 40 -- test/preprocessor_test.cpp | 57 --- test/repeat_2nd_test.cpp | 62 --- test/repeat_test.cpp | 56 --- test/test.hpp | 28 -- test/trivial_test.cpp | 12 - 126 files changed, 565 insertions(+), 7981 deletions(-) delete mode 100644 doc/acknowledgements.htm delete mode 100644 doc/bibliography.htm delete mode 100644 doc/examples.htm create mode 100644 doc/examples/array_arithmetic.c create mode 100644 doc/examples/catch_builtin.cpp create mode 100644 doc/examples/delay.c create mode 100644 doc/examples/duffs_device.c create mode 100644 doc/examples/is_integral.cpp create mode 100644 doc/examples/linear_fib.c create mode 100644 doc/examples/out.cpp delete mode 100644 doc/examples_preprocessed.htm delete mode 100644 doc/index.htm delete mode 100644 doc/keywords.txt delete mode 100644 doc/known_problems_with_cpp.htm delete mode 100644 doc/problems_with_compilers.htm delete mode 100644 doc/reference/arithmetic.htm delete mode 100644 doc/reference/arithmetic_add.htm delete mode 100644 doc/reference/arithmetic_div.htm delete mode 100644 doc/reference/arithmetic_mod.htm delete mode 100644 doc/reference/arithmetic_mul.htm delete mode 100644 doc/reference/arithmetic_sub.htm delete mode 100644 doc/reference/assert_msg.htm delete mode 100644 doc/reference/cat.htm delete mode 100644 doc/reference/comma.htm delete mode 100644 doc/reference/comma_if.htm delete mode 100644 doc/reference/comparison.htm delete mode 100644 doc/reference/comparison_equal.htm delete mode 100644 doc/reference/comparison_greater.htm delete mode 100644 doc/reference/comparison_greater_equal.htm delete mode 100644 doc/reference/comparison_less.htm delete mode 100644 doc/reference/comparison_less_equal.htm delete mode 100644 doc/reference/comparison_not_equal.htm delete mode 100644 doc/reference/dec.htm delete mode 100644 doc/reference/empty.htm delete mode 100644 doc/reference/enum.htm delete mode 100644 doc/reference/enum_params.htm delete mode 100644 doc/reference/enum_params_with_a_default.htm delete mode 100644 doc/reference/enum_params_with_defaults.htm delete mode 100644 doc/reference/enum_shifted.htm delete mode 100644 doc/reference/enum_shifted_params.htm delete mode 100644 doc/reference/expand.htm delete mode 100644 doc/reference/expr_if.htm delete mode 100644 doc/reference/for.htm delete mode 100644 doc/reference/identity.htm delete mode 100644 doc/reference/if.htm delete mode 100644 doc/reference/inc.htm delete mode 100644 doc/reference/index.htm delete mode 100644 doc/reference/limits.htm delete mode 100644 doc/reference/list.htm delete mode 100644 doc/reference/list_adt.htm delete mode 100644 doc/reference/list_append.htm delete mode 100644 doc/reference/list_at.htm delete mode 100644 doc/reference/list_cat.htm delete mode 100644 doc/reference/list_enum.htm delete mode 100644 doc/reference/list_filter.htm delete mode 100644 doc/reference/list_first_n.htm delete mode 100644 doc/reference/list_fold_left.htm delete mode 100644 doc/reference/list_fold_left_2nd.htm delete mode 100644 doc/reference/list_fold_right.htm delete mode 100644 doc/reference/list_fold_right_2nd.htm delete mode 100644 doc/reference/list_for_each.htm delete mode 100644 doc/reference/list_for_each_i.htm delete mode 100644 doc/reference/list_for_each_product.htm delete mode 100644 doc/reference/list_rest_n.htm delete mode 100644 doc/reference/list_reverse.htm delete mode 100644 doc/reference/list_size.htm delete mode 100644 doc/reference/list_to_tuple.htm delete mode 100644 doc/reference/list_transform.htm delete mode 100644 doc/reference/logical.htm delete mode 100644 doc/reference/logical_and.htm delete mode 100644 doc/reference/logical_bool.htm delete mode 100644 doc/reference/logical_nor.htm delete mode 100644 doc/reference/logical_not.htm delete mode 100644 doc/reference/logical_or.htm delete mode 100644 doc/reference/logical_xor.htm delete mode 100644 doc/reference/max.htm delete mode 100644 doc/reference/min.htm delete mode 100644 doc/reference/repeat.htm delete mode 100644 doc/reference/repeat_2nd.htm delete mode 100644 doc/reference/repeat_3rd.htm delete mode 100644 doc/reference/repeat_from_to.htm delete mode 100644 doc/reference/repeat_from_to_2nd.htm delete mode 100644 doc/reference/repeat_from_to_3rd.htm delete mode 100644 doc/reference/stringize.htm delete mode 100644 doc/reference/tuple.htm delete mode 100644 doc/reference/tuple_eat.htm delete mode 100644 doc/reference/tuple_elem.htm delete mode 100644 doc/reference/tuple_reverse.htm delete mode 100644 doc/reference/tuple_to_list.htm delete mode 100644 doc/reference/while.htm delete mode 100644 doc/tutorial.htm delete mode 100644 example/array_arithmetic.c delete mode 100644 example/catch_builtin.cpp delete mode 100644 example/count_down.c delete mode 100644 example/delay.c delete mode 100644 example/duffs_device.c delete mode 100644 example/is_integral.cpp delete mode 100644 example/linear_fib.c delete mode 100644 example/note.c delete mode 100644 example/repeat_2d.c delete mode 100644 example/static_assert.c delete mode 100644 example/subscript_layer.cpp delete mode 100644 regression/arithmetic.cpp delete mode 100644 regression/array.cpp delete mode 100644 regression/comparison.cpp delete mode 100644 regression/control.cpp delete mode 100644 regression/debug.cpp delete mode 100644 regression/facilities.cpp delete mode 100644 regression/iteration.cpp delete mode 100644 regression/iteration.h delete mode 100644 regression/list.cpp delete mode 100644 regression/logical.cpp delete mode 100644 regression/repetition.cpp delete mode 100644 regression/selection.cpp delete mode 100644 regression/slot.cpp delete mode 100644 regression/test.h delete mode 100644 regression/tuple.cpp delete mode 100644 test/arithmetic_test.cpp delete mode 100644 test/for_test.cpp delete mode 100644 test/list_test.cpp delete mode 100644 test/logical_test.cpp delete mode 100644 test/preprocessor_test.cpp delete mode 100644 test/repeat_2nd_test.cpp delete mode 100644 test/repeat_test.cpp delete mode 100644 test/test.hpp delete mode 100644 test/trivial_test.cpp diff --git a/doc/acknowledgements.htm b/doc/acknowledgements.htm deleted file mode 100644 index 38c8977..0000000 --- a/doc/acknowledgements.htm +++ /dev/null @@ -1,43 +0,0 @@ - - - - -Boost.Preprocessor - Acknowledgements - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Acknowledgements

-
-
-

The original idea of passing two extra parameters to REPEAT, which makes it - possible to create preprocessor code on top of it, was due to Aleksey Gurtovoy. - The invokeable IDENTITY macro was also invented by him. He also suggested the - name for the library. Many thanks to Aleksey for his insights!

-

Thanks to everyone who participated in the review: David Abrahams, Beman Dawes, - Ronald Garcia, Douglas Gregor, Aleksey Gurtovoy, Jeremy Siek, and Daryle Walker.

-

Thanks to Chris Little and Mat Marcus for providing help with MWCW.

-

The original automatic recursion technique, which makes many of the library -primitives easier to use, was invented by Paul Mensonides.

-

The PREPROCESSOR library has been developed by Vesa Karvonen.

-
-

Revised - - -

-

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/bibliography.htm b/doc/bibliography.htm deleted file mode 100644 index 44082e5..0000000 --- a/doc/bibliography.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -Boost.Preprocessor - Bibliography - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Bibliography

-
- -
- - - - - - - - - - - -
[Stroustrup]Stroustrup: The Design and Evolution of C++, ISBN 0201543303
[Czarnecki]Czarnecki, Eisenecker: Generative Programming, ISBN 0201309777
[Barton]Barton, Nackman: Scientific and Engineering C++, ISBN 0201533936
[McConnell]McConnell: Code Complete, ISBN 1556154844
[Std]ISO/IEC 14882:1998 Programming languages - C++
[Thompson]Thompson: Haskell: The Craft of Functional Programming, ISBN 0201342758
[Okasaki]Okasaki: Purely Functional Data Structures, ISBN 0521663504
[Cousineau]Cousineau, Mauny: The Functional Approach to Programming, ISBN 0521576814
[Abelson]Abelson, Sussman, Sussman: Structure and Interpretation of Computer Programs, ISBN 0262011530
- -
- -

Revised - - -

-

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/examples.htm b/doc/examples.htm deleted file mode 100644 index a4e93a7..0000000 --- a/doc/examples.htm +++ /dev/null @@ -1,91 +0,0 @@ - - - - -Boost.Preprocessor - Bibliography - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Examples

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
array_arithmetic.cImplements over 2200 functions for 1-dimensional arithmetic -array manipulation in C. The idea is to use preprocessor data structures, -lists and tuples, for storing metainformation to be used for generating -the actual C code.
catch_builtin.cppDemonstrates the usage of lists and BOOST_PP_LIST_FOR_EACH().
count_down.c Trivial example of using BOOST_PP_WHILE() that simply counts - down from N to 0 ultimately expanding to a 0.
delay.cImplements a macro whose expansion takes exponential amount - of time.
duffs_device.cUses the preprocessor library to implement a generalized - macro for implementing a Duff's Device.
is_integral.cppDemonstrates the usage of preprocessor lists for generating - C++ code.
linear_fib.cShows how BOOST_PP_WHILE() can be used for implementing macros.
note.cShows how BOOST_PP_STRINGIZE() can be used to allow macro - expansion before stringization.
repeat_2d.cImplements a generalized macro for 2D repetition using the - simple repetition primitives of the preprocessor library.
static_assert.cShows how BOOST_PP_CAT() can be used to allow macro expansion - before token concatenation.
subscript_layer.cppShows how BOOST_PP_EMPTY can be used as an unused or empty - parameter.
- -
- -

Revised - - -

-

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/examples/array_arithmetic.c b/doc/examples/array_arithmetic.c new file mode 100644 index 0000000..91c6717 --- /dev/null +++ b/doc/examples/array_arithmetic.c @@ -0,0 +1,197 @@ +# /* Copyright (C) 2002 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Permission to copy, use, modify, sell and distribute this software is +# * granted provided this copyright notice appears in all copies. This +# * software is provided "as is" without express or implied warranty, and +# * with no claim as to its suitability for any purpose. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# /* This example implements over 2200 functions for 1-dimensional arithmetic +# * array manipulation in C. The idea is to use preprocessor data structures, +# * lists, and tuples for storing metainformation to be used for generating +# * the actual C code. +# * +# * Who needs templates anyway? :) +# * +# * Compile with any C compiler with a standards conforming preprocessor. +# */ +# +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* Information about C operators */ +# +# /* Accessors for the operator datatype. */ +# define OP_SYMBOL(O) BOOST_PP_TUPLE_ELEM(5, 0, O) +# define OP_NAME(O) BOOST_PP_TUPLE_ELEM(5, 1, O) +# define OP_IS_FLOATING(O) BOOST_PP_TUPLE_ELEM(5, 2, O) +# define OP_IS_LOGICAL(O) BOOST_PP_TUPLE_ELEM(5, 3, O) +# define OP_IS_SHIFT(O) BOOST_PP_TUPLE_ELEM(5, 4, O) +# +# /* List of applicative unary operators. */ +# define APPLICATIVE_UNARY_OPS \ + BOOST_PP_TUPLE_TO_LIST( \ + 3, \ + ( \ + ( ! , logical_not, 1, 1, 0), \ + ( ~ , bitwise_not, 0, 0, 0), \ + ( - , neg, 1, 0, 0) \ + ) \ + ) \ + /**/ +# +# /* List of applicative binary operators. */ +# define APPLICATIVE_BINARY_OPS \ + BOOST_PP_TUPLE_TO_LIST( \ + 18, \ + ( \ + ( * , mul ,1 ,0 ,0), \ + ( / , div ,1 ,0 ,0), \ + ( % , mod ,0 ,0 ,0), \ + ( + , add ,1 ,0 ,0), \ + ( - , sub ,1 ,0 ,0), \ + ( << , shift_left ,0 ,0 ,1), \ + ( >> , shift_right ,0 ,0 ,1), \ + ( < , less ,1 ,1 ,0), \ + ( <= , less_equal ,1 ,1 ,0), \ + ( >= , greater_equal ,1 ,1 ,0), \ + ( > , greater ,1 ,1 ,0), \ + ( == , equal ,1 ,1 ,0), \ + ( != , not_equal ,1 ,1 ,0), \ + ( & , bitwise_and ,0 ,0 ,0), \ + ( | , bitwise_or ,0 ,0 ,0), \ + ( ^ , bitwise_xor ,0 ,0 ,0), \ + ( && , logical_and ,1 ,1 ,0), \ + ( || , logical_or ,1 ,1 ,0) \ + ) \ + ) \ + /**/ +# +# /* Information about C built-in types. */ +# +# /* Accessors for the type datatype. */ +# define TYPE_NAME(T) BOOST_PP_TUPLE_ELEM(4, 0, T) +# define TYPE_ABBREVIATION(T) BOOST_PP_TUPLE_ELEM(4, 1, T) +# define TYPE_IS_FLOATING(T) BOOST_PP_TUPLE_ELEM(4, 2, T) +# define TYPE_RANK(T) BOOST_PP_TUPLE_ELEM(4, 3, T) +# +# /* List of C built-in types. */ +# define BUILTIN_TYPES \ + BOOST_PP_TUPLE_TO_LIST( \ + 12, \ + ( \ + ( signed char ,sc, 0, 1), \ + ( char ,ch, 0, 1), \ + ( unsigned char ,uc, 0, 1), \ + ( short ,ss, 0, 2), \ + ( unsigned short ,us, 0, 2), \ + TYPE_INT, \ + ( unsigned ,ui, 0, 4), \ + ( long ,sl, 0, 5), \ + ( unsigned long ,ul, 0, 6), \ + ( float ,fl, 1, 7), \ + ( double ,db, 1, 8), \ + ( long double ,ld, 1, 9) \ + ) \ + ) \ + /**/ +# +# /* Type int is needed in some type computations. */ +# define TYPE_INT (int, si, 0, 3) +# +# /* Type computation macros. */ +# define TYPE_OF_INTEGER_PROMOTION(T) \ + BOOST_PP_IF( \ + BOOST_PP_LESS(TYPE_RANK(T), TYPE_RANK(TYPE_INT)), \ + TYPE_INT, T \ + ) \ + /**/ +# define TYPE_OF_USUAL_ARITHMETIC_CONVERSION(L, R) \ + TYPE_OF_INTEGER_PROMOTION( \ + BOOST_PP_IF( \ + BOOST_PP_LESS(TYPE_RANK(L), TYPE_RANK(R)), \ + R, L \ + ) \ + ) \ + /**/ +# define TYPE_OF_UNARY_OP(O, T) \ + BOOST_PP_IF( \ + OP_IS_LOGICAL(O), \ + TYPE_INT, TYPE_OF_INTEGER_PROMOTION(T) \ + ) \ + /**/ +# define TYPE_OF_BINARY_OP(O, L, R) \ + BOOST_PP_IF( \ + OP_IS_LOGICAL(O), TYPE_INT, \ + BOOST_PP_IF( \ + OP_IS_SHIFT(O), \ + TYPE_OF_INTEGER_PROMOTION(L), \ + TYPE_OF_USUAL_ARITHMETIC_CONVERSION(L,R) \ + ) \ + ) \ + /**/ +# define IS_VALID_UNARY_OP_AND_TYPE_COMBINATION(O, T) \ + BOOST_PP_IF( \ + TYPE_IS_FLOATING(T), \ + OP_IS_FLOATING(O), 1 \ + ) \ + /**/ +# define IS_VALID_BINARY_OP_AND_TYPE_COMBINATION(O, L, R) \ + BOOST_PP_IF( \ + BOOST_PP_OR(TYPE_IS_FLOATING(L), TYPE_IS_FLOATING(R)), \ + OP_IS_FLOATING(O), 1 \ + ) \ + /**/ +# +# /* Generates code for all unary operators and integral types. */ +# define UNARY_ARRAY_OP(_, OT) \ + BOOST_PP_IF( \ + IS_VALID_UNARY_OP_AND_TYPE_COMBINATION OT, \ + UNARY_ARRAY_OP_CODE, BOOST_PP_TUPLE_EAT(2) \ + ) OT \ + /**/ +# define UNARY_ARRAY_OP_CODE(O, T) \ + void BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(4, (array_, OP_NAME(O), _, TYPE_ABBREVIATION(T)))) \ + (const TYPE_NAME(T)* in, TYPE_NAME(TYPE_OF_UNARY_OP(O, T))* out, unsigned n) { \ + do { \ + *out++ = OP_SYMBOL(O) *in++; \ + } while (--n); \ + } \ + /**/ + +BOOST_PP_LIST_FOR_EACH_PRODUCT(UNARY_ARRAY_OP, 2, (APPLICATIVE_UNARY_OPS, BUILTIN_TYPES)) + +# /* Generates code for all binary operators and integral type pairs. */ +# define BINARY_ARRAY_OP(_, OLR) \ + BOOST_PP_IF( \ + IS_VALID_BINARY_OP_AND_TYPE_COMBINATION OLR, \ + BINARY_ARRAY_OP_CODE, BOOST_PP_TUPLE_EAT(3) \ + ) OLR \ + /**/ +# define BINARY_ARRAY_OP_CODE(O, L, R) \ + void BOOST_PP_LIST_CAT( \ + BOOST_PP_TUPLE_TO_LIST( \ + 6, (array_, OP_NAME(O), _, TYPE_ABBREVIATION(L), _, TYPE_ABBREVIATION(R)) \ + ) \ + )(const TYPE_NAME(L)* lhs_in, const TYPE_NAME(R)* rhs_in, TYPE_NAME(TYPE_OF_BINARY_OP(O, L, R))* out, unsigned n) { \ + do { \ + *out++ = *lhs_in OP_SYMBOL(O) *rhs_in; \ + ++lhs_in; \ + ++rhs_in; \ + } while (--n); \ + } \ + /**/ + +BOOST_PP_LIST_FOR_EACH_PRODUCT(BINARY_ARRAY_OP, 3, (APPLICATIVE_BINARY_OPS, BUILTIN_TYPES, BUILTIN_TYPES)) diff --git a/doc/examples/catch_builtin.cpp b/doc/examples/catch_builtin.cpp new file mode 100644 index 0000000..7143699 --- /dev/null +++ b/doc/examples/catch_builtin.cpp @@ -0,0 +1,52 @@ +# /* Copyright (C) 2002 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Permission to copy, use, modify, sell and distribute this software is +# * granted provided this copyright notice appears in all copies. This +# * software is provided "as is" without express or implied warranty, and +# * with no claim as to its suitability for any purpose. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# /* This example demonstrates the usage of lists and BOOST_PP_LIST_FOR_EACH(). */ +# +# include +# include +# +# include +# include +# +# /* List of built-in types. (Strictly speaking wchar_t should be on the list.) */ +# +# define BUILTIN_TYPES \ + BOOST_PP_TUPLE_TO_LIST( \ + 13, \ + ( \ + bool, \ + char, signed char, unsigned char, \ + unsigned short, short, \ + int, unsigned, \ + long, unsigned long, \ + float, \ + double, long double \ + ) \ + ) \ + /**/ +# +# define CATCH(R, _, T) \ + catch (T t) { \ + std::cerr << "Caught an " << typeid(t).name() << " = " << t; \ + } \ + /**/ + +int main() { + try { + throw 10; + } + BOOST_PP_LIST_FOR_EACH(CATCH, _, BUILTIN_TYPES) + return 0; +} diff --git a/doc/examples/delay.c b/doc/examples/delay.c new file mode 100644 index 0000000..54a9d40 --- /dev/null +++ b/doc/examples/delay.c @@ -0,0 +1,96 @@ +# /* Copyright (C) 2002 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Permission to copy, use, modify, sell and distribute this software is +# * granted provided this copyright notice appears in all copies. This +# * software is provided "as is" without express or implied warranty, and +# * with no claim as to its suitability for any purpose. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# /* The time complexity of DELAY(N) is O(2^N). +# * +# * Handy when recompiles are too fast to take a coffee break. :) +# * +# * Template metaprogramming can be used for implementing similar +# * delays. Unfortunately template instantiation consumes memory, +# * therefore compilers usually fail to fully compile long template +# * based delays, because they run out of memory. +# * +# * On many compilers (e.g. g++, MSVC++), this macro takes only a +# * small amount of memory to preprocess. On some compilers (e.g. +# * MWCW), however, this macro seems to consume huge amounts of +# * memory. +# */ +# +# include +# include +# include +# include +# include +# +# ifndef DELAY_MAX +# define DELAY_MAX 14 +# endif +# +# define DELAY(N) BOOST_PP_TUPLE_ELEM(2, 0, (BOOST_PP_EMPTY, BOOST_PP_WHILE(DELAY_C, BOOST_PP_CAT(DELAY_F, N), BOOST_PP_DEC(N))))() +# +# define DELAY_C(D, N) N +# +# define DELAY_F0(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F1(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F2(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F3(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F4(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F5(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F6(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F7(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F8(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F9(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F10(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F11(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F12(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F13(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F14(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F15(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F16(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F17(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F18(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F19(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F20(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F21(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F22(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F23(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F24(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F25(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F26(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F27(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F28(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F29(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F30(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F31(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F32(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F33(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F34(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F35(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F36(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F37(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F38(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F39(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F40(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F41(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F42(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F43(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F44(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F45(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F46(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F47(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F48(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F49(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) +# define DELAY_F50(D, N) BOOST_PP_IF(1, BOOST_PP_DEC(N), BOOST_PP_WHILE_ ## D(DELAY_C, DELAY_F ## N, BOOST_PP_DEC(N))) + +DELAY(DELAY_MAX) diff --git a/doc/examples/duffs_device.c b/doc/examples/duffs_device.c new file mode 100644 index 0000000..a5e168f --- /dev/null +++ b/doc/examples/duffs_device.c @@ -0,0 +1,62 @@ +# /* Copyright (C) 2002 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Permission to copy, use, modify, sell and distribute this software is +# * granted provided this copyright notice appears in all copies. This +# * software is provided "as is" without express or implied warranty, and +# * with no claim as to its suitability for any purpose. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# /* This example uses the preprocessor library to implement a generalized +# * macro for implementing Duff's Device. +# * +# * This example was inspired by an original generalized macro for +# * for implementing Duff's Device written by Joerg Walter. +# */ +# +# include +# +# include +# include +# +# /* Expands to a Duff's Device. */ +# define DUFFS_DEVICE(UNROLLING_FACTOR, COUNTER_TYPE, N, STATEMENT) \ + do { \ + COUNTER_TYPE duffs_device_initial_cnt = (N); \ + if (duffs_device_initial_cnt > 0) { \ + COUNTER_TYPE duffs_device_running_cnt = (duffs_device_initial_cnt + (UNROLLING_FACTOR - 1)) / UNROLLING_FACTOR; \ + switch (duffs_device_initial_cnt % UNROLLING_FACTOR) { \ + do { \ + BOOST_PP_REPEAT(UNROLLING_FACTOR, DUFFS_DEVICE_C, (UNROLLING_FACTOR, { STATEMENT })) \ + } while (--duffs_device_running_cnt); \ + } \ + } \ + } while (0) \ + /**/ +# +# define DUFFS_DEVICE_C(Z, I, UNROLLING_FACTOR_STATEMENT) \ + case (I ? BOOST_PP_TUPLE_ELEM(2, 0, UNROLLING_FACTOR_STATEMENT) - I : 0): \ + BOOST_PP_TUPLE_ELEM(2, 1, UNROLLING_FACTOR_STATEMENT); \ + /**/ +# +# ifndef UNROLLING_FACTOR +# define UNROLLING_FACTOR 16 +# endif +# +# ifndef N +# define N 1000 +# endif + +int main(void) { + int i = 0; + DUFFS_DEVICE(UNROLLING_FACTOR, int, 0, ++i;); + assert(i == 0); + DUFFS_DEVICE(UNROLLING_FACTOR, int, N, ++i;); + assert(i == N); + return 0; +} diff --git a/doc/examples/is_integral.cpp b/doc/examples/is_integral.cpp new file mode 100644 index 0000000..6a7f054 --- /dev/null +++ b/doc/examples/is_integral.cpp @@ -0,0 +1,50 @@ +# /* Copyright (C) 2002 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Permission to copy, use, modify, sell and distribute this software is +# * granted provided this copyright notice appears in all copies. This +# * software is provided "as is" without express or implied warranty, and +# * with no claim as to its suitability for any purpose. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# /* This example demonstrates the usage of preprocessor lists for generating C++ code. */ +# +# include +# include +# include +# include +# include +# +# /* List of integral types. (Strictly speaking, wchar_t should be on the list.) */ +# define INTEGRAL_TYPES \ + BOOST_PP_TUPLE_TO_LIST( \ + 9, (char, signed char, unsigned char, short, unsigned short, int, unsigned, long, unsigned long) \ + ) \ + /**/ +# +# /* List of invokeable cv-qualifiers */ +# define CV_QUALIFIERS \ + BOOST_PP_TUPLE_TO_LIST( \ + 4, (BOOST_PP_EMPTY, const BOOST_PP_EMPTY, volatile BOOST_PP_EMPTY, const volatile BOOST_PP_EMPTY) \ + ) \ + /**/ +# +# /* Template for testing whether a type is an integral type. */ + +template struct is_integral { + enum { value = false }; +}; + +# /* Macro for defining a specialization of is_integral<> template. */ +# define IS_INTEGRAL_SPECIALIZATION(R, L) \ + template<> struct is_integral { \ + enum { value = true }; \ + }; \ + /**/ + +BOOST_PP_LIST_FOR_EACH_PRODUCT(IS_INTEGRAL_SPECIALIZATION, 2, (CV_QUALIFIERS, INTEGRAL_TYPES)) diff --git a/doc/examples/linear_fib.c b/doc/examples/linear_fib.c new file mode 100644 index 0000000..940e343 --- /dev/null +++ b/doc/examples/linear_fib.c @@ -0,0 +1,92 @@ +# /* Copyright (C) 2002 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Permission to copy, use, modify, sell and distribute this software is +# * granted provided this copyright notice appears in all copies. This +# * software is provided "as is" without express or implied warranty, and +# * with no claim as to its suitability for any purpose. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# /* This example shows how BOOST_PP_WHILE() can be used for implementing macros. */ +# +# include +# +# include +# include +# include +# include +# include +# include +# +# /* First consider the following C implementation of Fibonacci. */ + +typedef struct linear_fib_state { + int a0, a1, n; +} linear_fib_state; + +static int linear_fib_c(linear_fib_state p) { + return p.n; +} + +static linear_fib_state linear_fib_f(linear_fib_state p) { + linear_fib_state r = { p.a1, p.a0 + p.a1, p.n - 1 }; + return r; +} + +static int linear_fib(int n) { + linear_fib_state p = { 0, 1, n }; + while (linear_fib_c(p)) { + p = linear_fib_f(p); + } + return p.a0; +} + +# /* Then consider the following preprocessor implementation of Fibonacci. */ +# +# define LINEAR_FIB(n) LINEAR_FIB_D(1, n) +# /* Since the macro is implemented using BOOST_PP_WHILE, the actual +# * implementation takes a depth as a parameters so that it can be called +# * inside a BOOST_PP_WHILE. The above easy-to-use version simply uses 1 +# * as the depth and cannot be called inside a BOOST_PP_WHILE. +# */ +# +# define LINEAR_FIB_D(d, n) \ + BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE_ ## d(LINEAR_FIB_C, LINEAR_FIB_F, (0, 1, n))) +# /* ^^^^ ^^^^^ ^^ ^^ ^^^^^^^ +# * #1 #2 #3 #3 #4 +# * +# * 1) The state is a 3-element tuple. After the iteration is finished, the first +# * element of the tuple is the result. +# * +# * 2) The WHILE primitive is "invoked" directly. BOOST_PP_WHILE(D, ...) +# * can't be used because it would not be expanded by the preprocessor. +# * +# * 3) ???_C is the condition and ???_F is the iteration macro. +# */ +# +# define LINEAR_FIB_C(d, p) \ + /* p.n */ BOOST_PP_TUPLE_ELEM(3, 2, p) \ + /**/ +# +# define LINEAR_FIB_F(d, p) \ + ( \ + /* p.a1 */ BOOST_PP_TUPLE_ELEM(3, 1, p), \ + /* p.a0 + p.a1 */ BOOST_PP_ADD_D(d, BOOST_PP_TUPLE_ELEM(3, 0, p), BOOST_PP_TUPLE_ELEM(3, 1, p)), \ + /* ^^ ^ \ + * BOOST_PP_ADD() uses BOOST_PP_WHILE(). Therefore we \ + * pass the recursion depth explicitly to BOOST_PP_ADD_D(). \ + */ \ + /* p.n - 1 */ BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(3, 2, p)) \ + ) \ + /**/ + +int main() { + printf("linear_fib(10) = %d\n", linear_fib(10)); + printf("LINEAR_FIB(10) = %d\n", LINEAR_FIB(10)); + return 0; +} diff --git a/doc/examples/out.cpp b/doc/examples/out.cpp new file mode 100644 index 0000000..4fe5bc1 --- /dev/null +++ b/doc/examples/out.cpp @@ -0,0 +1,16 @@ + + +extern "C" { + + void _assert(const char*, const char*, unsigned); + +} + +int main(void) { + int i = 0; + do { int duffs_device_initial_cnt = (0); if (duffs_device_initial_cnt > 0) { int duffs_device_running_cnt = (duffs_device_initial_cnt + (16 - 1)) / 16; switch (duffs_device_initial_cnt % 16) { do { case (0 ? 16 - 0 : 0): { ++i; }; case (1 ? 16 - 1 : 0): { ++i; }; case (2 ? 16 - 2 : 0): { ++i; }; case (3 ? 16 - 3 : 0): { ++i; }; case (4 ? 16 - 4 : 0): { ++i; }; case (5 ? 16 - 5 : 0): { ++i; }; case (6 ? 16 - 6 : 0): { ++i; }; case (7 ? 16 - 7 : 0): { ++i; }; case (8 ? 16 - 8 : 0): { ++i; }; case (9 ? 16 - 9 : 0): { ++i; }; case (10 ? 16 - 10 : 0): { ++i; }; case (11 ? 16 - 11 : 0): { ++i; }; case (12 ? 16 - 12 : 0): { ++i; }; case (13 ? 16 - 13 : 0): { ++i; }; case (14 ? 16 - 14 : 0): { ++i; }; case (15 ? 16 - 15 : 0): { ++i; }; } while (--duffs_device_running_cnt); } } } while (0); + (void)( (i == 0) || (_assert("i == 0", "duffs_device.c", 58), 0) ); + do { int duffs_device_initial_cnt = (1000); if (duffs_device_initial_cnt > 0) { int duffs_device_running_cnt = (duffs_device_initial_cnt + (16 - 1)) / 16; switch (duffs_device_initial_cnt % 16) { do { case (0 ? 16 - 0 : 0): { ++i; }; case (1 ? 16 - 1 : 0): { ++i; }; case (2 ? 16 - 2 : 0): { ++i; }; case (3 ? 16 - 3 : 0): { ++i; }; case (4 ? 16 - 4 : 0): { ++i; }; case (5 ? 16 - 5 : 0): { ++i; }; case (6 ? 16 - 6 : 0): { ++i; }; case (7 ? 16 - 7 : 0): { ++i; }; case (8 ? 16 - 8 : 0): { ++i; }; case (9 ? 16 - 9 : 0): { ++i; }; case (10 ? 16 - 10 : 0): { ++i; }; case (11 ? 16 - 11 : 0): { ++i; }; case (12 ? 16 - 12 : 0): { ++i; }; case (13 ? 16 - 13 : 0): { ++i; }; case (14 ? 16 - 14 : 0): { ++i; }; case (15 ? 16 - 15 : 0): { ++i; }; } while (--duffs_device_running_cnt); } } } while (0); + (void)( (i == 1000) || (_assert("i == N", "duffs_device.c", 60), 0) ); + return 0; +} diff --git a/doc/examples_preprocessed.htm b/doc/examples_preprocessed.htm deleted file mode 100644 index 6f0deb7..0000000 --- a/doc/examples_preprocessed.htm +++ /dev/null @@ -1,326 +0,0 @@ - - - - -Boost.Preprocessor - Tutorial examples preprocessed - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Tutorial examples preprocessed

-
-
- -

The following code snippets were produced by actually preprocessing the code - snippets of the tutorial. After preprocessing the code was reformatted manually.

- -
-

EXAMPLE: - Use a Local Macro to avoid small scale repetition

- -
template<class T, int n>
-vec<T,n>&
-  operator +=
-  ( vec<T,n>&
-      lhs
-  , const vec<T,n>&
-      rhs
-  )
-{ for (int i=0; i<n; ++i)
-    lhs(i) += rhs(i);
-  return lhs;
-}
-
-template<class T, int n>
-vec<T,n>&
-  operator -=
-  ( vec<T,n>&
-      lhs
-  , const vec<T,n>&
-      rhs
-  )
-{ for (int i=0; i<n; ++i)
-    lhs(i) -= rhs(i);
-  return lhs;
-}
-
-template<class T, int n>
-vec<T,n>&
-  operator *=
-  ( vec<T,n>&
-      lhs
-  , const vec<T,n>&
-      rhs
-  )
-{ for (int i=0; i<n; ++i)
-    lhs(i) *= rhs(i);
-  return lhs;
-}
-
-template<class T, int n>
-vec<T,n>&
-  operator /=
-  ( vec<T,n>&
-      lhs
-  , const vec<T,n>&
-      rhs
-  )
-{ for (int i=0; i<n; ++i)
-    lhs(i) /= rhs(i);
-  return lhs;
-}
-
- -
-

EXAMPLE: - Use BOOST_PP_EMPTY() as an unused parameter in Local Macro instantiations

- -
template<class base>
-typename implement_subscript_using_begin_subscript<base>::value_type&
-  implement_subscript_using_begin_subscript<base>::operator[]
-  ( index_type
-      i
-  )
-{ return base::begin()[i];
-}
-
-template<class base>
-const typename implement_subscript_using_begin_subscript<base>::value_type&
-  implement_subscript_using_begin_subscript<base>::operator[]
-  ( index_type
-      i
-  ) const
-{ return base::begin()[i];
-}
-
- -
-

EXAMPLE: Use BOOST_PP_CAT instead of ## when necessary

- -
enum
-{ static_check_152 = (sizeof(int) <= sizeof(long)) ? 1 : -1
-};
-typedef char
-  static_assert_152
-  [ static_check_152
-  ];
-
-
-

EXAMPLE: Use BOOST_PP_STRINGIZE instead of # whenever necessary

-
#pragma message("examples.cpp" "(" "20" ") : " "TBD!")
-
-

EXAMPLE: - Use:

-
    -
  • BOOST_PP_ENUM_PARAMS,
  • -
  • BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT,
  • -
  • BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS,
  • -
  • BOOST_PP_ENUM_SHIFTED_PARAMS, or
  • -
  • BOOST_PP_REPEAT, and
  • -
  • BOOST_PP_COMMA_IF
  • -
-

to avoid O(N) repetition on lists in general

-
struct make_type_list_end;
-
-template
-< class T0=make_type_list_end
-, class T1=make_type_list_end
-, class T2=make_type_list_end
-, class T3=make_type_list_end
-, class T4=make_type_list_end
-, class T5=make_type_list_end
-, class T6=make_type_list_end
-, class T7=make_type_list_end
->
-struct make_type_list
-{
-private:
-  enum
-  { end = is_same<T0,make_type_list_end>::value
-  };
-public:
-  typedef typename
-    type_if
-    < end
-    , type_cons_empty
-    , type_cons
-      < T0
-      , typename
-        type_inner_if
-        < end
-        , type_identity<end>
-        , make_type_list
-          < T1
-          , T2
-          , T3
-          , T4
-          , T5
-          , T6
-          , T7
-          >
-        >::type
-      >
-    >::type type;
-};
-
- -
-

EXAMPLE: - Use BOOST_PP_REPEAT and a Token Look-Up Function to eliminate categorical - repetition

- -
catch (bool t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (char t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (signed char t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (unsigned char t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (short t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (unsigned short t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (int t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (unsigned int t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (long t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (unsigned long t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (float t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (double t)
-{ report_typeid(t);
-  report_value(t);
-}
-catch (long double t)
-{ report_typeid(t);
-  report_value(t);
-}
-
- -
-

EXAMPLE: - Use BOOST_PP_REPEAT_2ND to avoid O(N*N) repetition

- -
vec()
-{
-}
-vec(T a0)
-{ (*this)[0] = a0;
-}
-vec(T a0, T a1)
-{ (*this)[0] = a0;
-  (*this)[1] = a1;
-}
-vec(T a0, T a1, T a2)
-{ (*this)[0] = a0;
-  (*this)[1] = a1;
-  (*this)[2] = a2;
-}
-vec(T a0, T a1, T a2, T a3)
-{ (*this)[0] = a0;
-  (*this)[1] = a1;
-  (*this)[2] = a2;
-  (*this)[3] = a3;
-}
-vec(T a0, T a1, T a2, T a3, T a4)
-{ (*this)[0] = a0;
-  (*this)[1] = a1;
-  (*this)[2] = a2;
-  (*this)[3] = a3;
-  (*this)[4] = a4;
-}
-vec(T a0, T a1, T a2, T a3, T a4, T a5)
-{ (*this)[0] = a0;
-  (*this)[1] = a1;
-  (*this)[2] = a2;
-  (*this)[3] = a3;
-  (*this)[4] = a4;
-  (*this)[5] = a5;
-}
-vec(T a0, T a1, T a2, T a3, T a4, T a5, T a6)
-{ (*this)[0] = a0;
-  (*this)[1] = a1;
-  (*this)[2] = a2;
-  (*this)[3] = a3;
-  (*this)[4] = a4;
-  (*this)[5] = a5;
-  (*this)[6] = a6;
-}
-vec(T a0, T a1, T a2, T a3, T a4, T a5, T a6, T a7)
-{ (*this)[0] = a0;
-  (*this)[1] = a1;
-  (*this)[2] = a2;
-  (*this)[3] = a3;
-  (*this)[4] = a4;
-  (*this)[5] = a5;
-  (*this)[6] = a6;
-  (*this)[7] = a7;
-}
-
- -

-


-

EXAMPLE: - Use BOOST_PP_IF to implement special case for the first element

- -
false == false;
-true == true;
-
- -

-


- -

EXAMPLE: Use arithmetic, logical and comparison operations when necessary

- -
S, E0, E1
-E0, S, E1
-E0, E1, S
-BAD PARAMS FOR SPECIAL_NUMBERED_LIST! E0, E1, E2, S
- -
-

Revised - - -

-

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/index.htm b/doc/index.htm deleted file mode 100644 index 41eb4e2..0000000 --- a/doc/index.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -Boost.Preprocessor - Index - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Index

-
- -
- -

Contents

-
-
Tutorial
-
Examples
-
Reference
-
Widely known problems with the C preprocessor
-
Keywords for syntax highlighting
-
Known problems with specific compilers
-
Bibliography
-
Acknowledgements
-
- -
- -

Revised - -

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/keywords.txt b/doc/keywords.txt deleted file mode 100644 index 47568fd..0000000 --- a/doc/keywords.txt +++ /dev/null @@ -1,99 +0,0 @@ -BOOST_PP_ADD -BOOST_PP_ADD_D -BOOST_PP_AND -BOOST_PP_ASSERT_MSG -BOOST_PP_BOOL -BOOST_PP_CAT -BOOST_PP_COMMA -BOOST_PP_COMMA_IF -BOOST_PP_DEC -BOOST_PP_DIV -BOOST_PP_DIV_D -BOOST_PP_EMPTY -BOOST_PP_ENUM -BOOST_PP_ENUM_PARAMS -BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT -BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS -BOOST_PP_ENUM_SHIFTED -BOOST_PP_ENUM_SHIFTED_PARAMS -BOOST_PP_EQUAL -BOOST_PP_EQUAL_D -BOOST_PP_EXPAND -BOOST_PP_EXPR_IF -BOOST_PP_FOR -BOOST_PP_GREATER -BOOST_PP_GREATER_D -BOOST_PP_GREATER_EQUAL -BOOST_PP_GREATER_EQUAL_D -BOOST_PP_IDENTITY -BOOST_PP_IF -BOOST_PP_INC -BOOST_PP_LESS -BOOST_PP_LESS_D -BOOST_PP_LESS_EQUAL -BOOST_PP_LESS_EQUAL_D -BOOST_PP_LIMIT_DIM -BOOST_PP_LIMIT_MAG -BOOST_PP_LIMIT_TUPLE -BOOST_PP_LIST_APPEND -BOOST_PP_LIST_APPEND_D -BOOST_PP_LIST_AT -BOOST_PP_LIST_AT_D -BOOST_PP_LIST_CAT -BOOST_PP_LIST_CAT_D -BOOST_PP_LIST_CONS -BOOST_PP_LIST_ENUM -BOOST_PP_LIST_ENUM_R -BOOST_PP_LIST_FILTER -BOOST_PP_LIST_FILTER_D -BOOST_PP_LIST_FIRST -BOOST_PP_LIST_FIRST_N -BOOST_PP_LIST_FIRST_N_D -BOOST_PP_LIST_FOLD_LEFT -BOOST_PP_LIST_FOLD_LEFT_D -BOOST_PP_LIST_FOLD_RIGHT -BOOST_PP_LIST_FOLD_RIGHT_D -BOOST_PP_LIST_FOR_EACH -BOOST_PP_LIST_FOR_EACH_I -BOOST_PP_LIST_FOR_EACH_I_R -BOOST_PP_LIST_FOR_EACH_R -BOOST_PP_LIST_FOR_EACH_PRODUCT -BOOST_PP_LIST_FOR_EACH_PRODUCT_R -BOOST_PP_LIST_IS_CONS -BOOST_PP_LIST_IS_NIL -BOOST_PP_LIST_NIL -BOOST_PP_LIST_REST -BOOST_PP_LIST_REST_N -BOOST_PP_LIST_REST_N_D -BOOST_PP_LIST_REVERSE -BOOST_PP_LIST_REVERSE_D -BOOST_PP_LIST_SIZE -BOOST_PP_LIST_SIZE_D -BOOST_PP_LIST_TO_TUPLE -BOOST_PP_LIST_TO_TUPLE_R -BOOST_PP_LIST_TRANSFORM -BOOST_PP_LIST_TRANSFORM_D -BOOST_PP_MAX -BOOST_PP_MAX_D -BOOST_PP_MIN -BOOST_PP_MIN_D -BOOST_PP_MOD -BOOST_PP_MOD_D -BOOST_PP_MUL -BOOST_PP_MUL_D -BOOST_PP_NOR -BOOST_PP_NOT -BOOST_PP_NOT_EQUAL -BOOST_PP_NOT_EQUAL_D -BOOST_PP_OR -BOOST_PP_REPEAT -BOOST_PP_REPEAT_FROM_TO -BOOST_PP_STRINGIZE -BOOST_PP_SUB -BOOST_PP_SUB_D -BOOST_PP_TUPLE_EAT -BOOST_PP_TUPLE_ELEM -BOOST_PP_TUPLE_REVERSE -BOOST_PP_TUPLE_TO_LIST -BOOST_PP_WHILE -BOOST_PP_XOR diff --git a/doc/known_problems_with_cpp.htm b/doc/known_problems_with_cpp.htm deleted file mode 100644 index c1d13e7..0000000 --- a/doc/known_problems_with_cpp.htm +++ /dev/null @@ -1,125 +0,0 @@ - - - - -Boost.Preprocessor - Widely known problems with the C preprocessor - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Widely known problems with the C preprocessor

-
- -
- -

Preprocessor metaprogramming is subject to heated discussions. Part of this is caused by -bad experiences with dangerous techniques, such as defining inline functions using macros. As a rule -of thumb, if you can find a clean and -manageable way to do something without using the preprocessor, then -you should do it that way.

- -

Let's survey some of the widely known problems with the preprocessor in a problem/solution - format.

-
- -

PROBLEM: Preprocessor does not -respect scope, therefore macros can accidentally and sometimes silently replace -code.

- -

SOLUTION A: Use all caps identifiers -for macros and only macros. This practically eliminates the possibility that a -macro might replace other kind of code accidentally.

- -

SOLUTION B: Use the Local Macro -idiom:

- -
#define MACRO ...
-// Use MACRO
-#undef MACRO
-
- -

This makes sure that a macro can not accidentally -replace code outside of the scope of the local macro.

-

A problem with this solution is that the #undef can not be automated and may be -forgotten. Experienced programmers generally write the #undef either immediately -before (in time) or immediately after writing the macro definition.

-

SOLUTION C: Use the Unique Macro Prefix idiom:

- -
#define UMP_MACRO
-// Use UMP_MACRO
-
- - -

This makes accidental substitution and collisions highly -unlikely. Problems with this solution:

-
    -
  • - There can still be naming collisions inside a large project. -
  • - Macros still pollute the global namespace.
-

By combining all solutions, whenever -possible, the scope problem can be largely avoided.

-
- -

PROBLEM:  Preprocessor code is difficult to read. -It requires understanding the basic process of how -the preprocessor recursively expands macros, finding the macro definition and mentally -substituting the parameters of the macro.

-

SOLUTION: Any kind of programming requires basic understanding - of how the code is executed. Any parameterization technique, including simple - functions and templates requires finding the definition and mentally substituting - parameters.

-

However, it is good to know a few techniques:

-
    -
  • - By using as many Local Macros as reasonable, the bulk of the searching - process can be eliminated. -
  • - Code browsers and text search tools make it easier to find the - definitions. -
  • - The compiler can be used for generating the preprocessed source code in - order to look for bugs. -
  • - Before turning something into a preprocessor metaprogram, first - implement a small scale version of it without preprocessor. Then work - bottom->up replacing hand written constructs by using preprocessor. This - way you can test the code incrementally. Experienced programmers often skip - many stages, but if something proves too complex to write directly, it is - always possible to fall back to incremental methods. -
  • - If you insert a special symbol into the preprocessor code in places where - there should be a line break, you can make code readable after preprocessing - simply by using a search and replace tool.
-

An especially important thing to remember is to limit the use of preprocessor - to the structured, well understood and safe methods. Structure helps to understand - complex systems [McConnell].

-
- -

PROBLEM: "I'd -like to see Cpp abolished." - Bjarne Stroustrup in [Stroustrup]

-

SOLUTION: The C preprocessor will be here for a -long time.

-

In practice, preprocessor metaprogramming is far simpler and more portable - than template metaprogramming [Czarnecki].

-
-

Revised - - -

-

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/problems_with_compilers.htm b/doc/problems_with_compilers.htm deleted file mode 100644 index 03bc664..0000000 --- a/doc/problems_with_compilers.htm +++ /dev/null @@ -1,138 +0,0 @@ - - - - -Boost.Preprocessor - Known problems with specific compilers - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Known problems with specific compilers

-
- -
- -

Some compilers have buggy or limited preprocessors. This page explains known - problems with specific compilers.

-
-

Contents

- -
- -

Metrowerks Codewarrior 7.0

-

Metrowerks Codewarrior 7.0 has a bug in preprocessor (to be more - concrete, in function-like macro replacement mechanism) that restricts usage - of the library to only very simple cases, at least if you don't write code that - specifically address this issue; for example, the above NUMBERED_EXPRESSION - example doesn't compile on CW 7.0. Below is a simple test case that reproduces - the bug:

- -
#define IDENTITY_MACRO(x) IDENTITY_MACRO_BODY(x)
-#define IDENTITY_MACRO_BODY(x) x
-#define COMMA_TOKEN() ,
-int a IDENTITY_MACRO(COMMA_TOKEN)() b; // this works
-int c IDENTITY_MACRO(IDENTITY_MACRO(COMMA_TOKEN))() d; // this doesn't
-
- -

Basically, what's happening here is that function-like COMMA_TOKEN macro gets - expanded _inside_ of the nested IDENTITY_MACRO call - even although it's NOT - followed by a '(' as the next preprocessing token - which is a clearly an incorrect - behavior (see 16.3 [cpp.replace] para 9 for the detailed description of the - function-like macro replacement process). I've submitted a bug report, but they - haven't confirmed it yet.

-

So, this is not a problem of the library, but probably something that needs - to be mentioned in the documentation, may be with some examples of how to workaround - the issue. Just to show one possible way around the problem, here is a NUMBERED_EXPRESSION - macro that does work on MWCW:

-
#define NUMBERED_EXPRESSION(n, x) \
-    BOOST_PP_CAT(BOOST_, \
-    BOOST_PP_IF( \
-      n \
-    , PREPROCESSOR_IDENTITY(x##n) \
-    , PREPROCESSOR_EMPTY \
-    ))() \
-/**/
-
-

Reported by Aleksey Gurtovoy

- -

Comeau C/C++ 4.2.45.2 for Windows

-

It appears that their algorithm of macro call invocation is quite far - from ideal, because for the following code fragment (which is a part of - preprocessor_test.cpp), the - linear increasing of IS_FUNCTION_HELPER_TEST_MAX value leads to not even - quadratic, but something like exponential increasing of compilation time! - (see the timing data below). This behavior may or may not be problematic - for you, depending on how intense is your usage of the library. - -

#ifndef IS_FUNCTION_HELPER_TEST_MAX
-#define IS_FUNCTION_HELPER_TEST_MAX 40
-#endif
-
-typedef char yes_type;
-
-#define IS_FUNCTION_HELPER(I,A)\
-  template\
-  <BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(I),class P)>\
-  yes_type is_function_helper(\
-    P0 (*)(BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(I),P)));
-
-BOOST_PP_REPEAT_2ND(BOOST_PP_INC(IS_FUNCTION_HELPER_TEST_MAX),IS_FUNCTION_HELPER,A)
-
-#undef IS_FUNCTION_HELPER
-
- -

Timing data:

- - - - - - - - - - - - - - - - - - - - - - - - - - -
 Comeau C/C++ 4.2.45.2Microsoft Visual C++ 6.0 SP5
10 parameters< 1 sec< 1 sec
20 parameters~ 2 sec< 1 sec
30 parameters~ 15 sec< 1 sec
40 parameters~ 50 sec< 1 sec
- -

Reported by Aleksey Gurtovoy

- -
-

Revised - - -

-

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/arithmetic.htm b/doc/reference/arithmetic.htm deleted file mode 100644 index 448f451..0000000 --- a/doc/reference/arithmetic.htm +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/arithmetic.hpp>

-
- -
- -Prev Next Macros Headers -
- -

Includes all arithmetic headers.

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/arithmetic_add.htm b/doc/reference/arithmetic_add.htm deleted file mode 100644 index 126a817..0000000 --- a/doc/reference/arithmetic_add.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/arithmetic/add.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_ADD(X,Y)

-

Expands to the sum of X and Y.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_ADD(4,3) expands to 7 (a -single token).

- -

Test

- - -
- -

#define BOOST_PP_ADD_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/arithmetic_div.htm b/doc/reference/arithmetic_div.htm deleted file mode 100644 index 120eba5..0000000 --- a/doc/reference/arithmetic_div.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/arithmetic/div.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_DIV(X,Y)

-

Expands to the quotient of X and Y.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_DIV(4,3) expands to 1 (a -single token).

- -

Test

- - -
- -

#define BOOST_PP_DIV_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/arithmetic_mod.htm b/doc/reference/arithmetic_mod.htm deleted file mode 100644 index 68c6a3a..0000000 --- a/doc/reference/arithmetic_mod.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/arithmetic/mod.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_MOD(X,Y)

-

Expands to the remainder of X and Y.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_MOD(4,3) expands to 1 (a -single token).

- -

Test

- - -
- -

#define BOOST_PP_MOD_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/arithmetic_mul.htm b/doc/reference/arithmetic_mul.htm deleted file mode 100644 index 4799c0d..0000000 --- a/doc/reference/arithmetic_mul.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/arithmetic/mul.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_MUL(X,Y)

-

Expands to the product of X and Y.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_MUL(4,3) expands to 12 (a -single token).

- -

Test

- - -
- -

#define BOOST_PP_MUL_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/arithmetic_sub.htm b/doc/reference/arithmetic_sub.htm deleted file mode 100644 index 9ff9b41..0000000 --- a/doc/reference/arithmetic_sub.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/arithmetic/sub.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_SUB(X,Y)

-

Expands to the difference of X and Y.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_SUB(4,3) expands to 1 (a -single token).

- -

Test

- - -
- -

#define BOOST_PP_SUB_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/assert_msg.htm b/doc/reference/assert_msg.htm deleted file mode 100644 index 4eade5f..0000000 --- a/doc/reference/assert_msg.htm +++ /dev/null @@ -1,49 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/assert_msg.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_ASSERT_MSG(COND,MSG)

-

Expands to nothing if COND != 0 and to MSG if -COND == 0.

- -

COND must expand to an integer literal in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_ASSERT_MSG(1,A BUG!) expands to A BUG!.

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/cat.htm b/doc/reference/cat.htm deleted file mode 100644 index 65c794c..0000000 --- a/doc/reference/cat.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/cat.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_CAT(X,Y)

-

Concatenates X and Y after they are macro -expanded.

- -

For example, BOOST_PP_CAT(A,BOOST_PP_CAT(_,B)) expands to A_B.

- -

Example

- - -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comma.htm b/doc/reference/comma.htm deleted file mode 100644 index 305d98d..0000000 --- a/doc/reference/comma.htm +++ /dev/null @@ -1,60 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comma.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_COMMA()

-

Expands to a comma.

- -

Commas need special handling in preprocessor code, because commas are used -for separating macro parameters.

- -

For example,

- -
-BOOST_PP_IF(1,BOOST_PP_COMMA,BOOST_PP_EMPTY)()
-
- -

expands to a comma.

- -

See

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comma_if.htm b/doc/reference/comma_if.htm deleted file mode 100644 index 4f6e587..0000000 --- a/doc/reference/comma_if.htm +++ /dev/null @@ -1,49 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comma_if.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_COMMA_IF(COND)

-

Expands to a comma if COND != 0 and nothing if -COND == 0.

- -

COND must expand to an integer literal in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_COMMA_IF(0) expands to nothing.

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comparison.htm b/doc/reference/comparison.htm deleted file mode 100644 index 6978b7b..0000000 --- a/doc/reference/comparison.htm +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comparison.hpp>

-
- -
- -Prev Next Macros Headers -
- -

Includes all comparison headers.

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comparison_equal.htm b/doc/reference/comparison_equal.htm deleted file mode 100644 index abb12c1..0000000 --- a/doc/reference/comparison_equal.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comparison/equal.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_EQUAL(X,Y)

-

Expands to 1 if X == Y and 0 -otherwise.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_EQUAL(4,4) expands to 1.

- -

Test

- - -
- -

#define BOOST_PP_EQUAL_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comparison_greater.htm b/doc/reference/comparison_greater.htm deleted file mode 100644 index 7cfa4c2..0000000 --- a/doc/reference/comparison_greater.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comparison/greater.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_GREATER(X,Y)

-

Expands to 1 if X > Y and 0 -otherwise.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_GREATER(4,3) expands to 1.

- -

Test

- - -
- -

#define BOOST_PP_GREATER_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comparison_greater_equal.htm b/doc/reference/comparison_greater_equal.htm deleted file mode 100644 index 084d356..0000000 --- a/doc/reference/comparison_greater_equal.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comparison/greater_equal.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_GREATER_EQUAL(X,Y)

-

Expands to 1 if X >= Y and 0 -otherwise.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_GREATER_EQUAL(1,3) expands to 0.

- -

Test

- - -
- -

#define BOOST_PP_GREATER_EQUAL_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comparison_less.htm b/doc/reference/comparison_less.htm deleted file mode 100644 index fab9f37..0000000 --- a/doc/reference/comparison_less.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comparison/less.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LESS(X,Y)

-

Expands to 1 if X < Y and 0 -otherwise.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_LESS(2,6) expands to 1.

- -

Test

- - -
- -

#define BOOST_PP_LESS_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comparison_less_equal.htm b/doc/reference/comparison_less_equal.htm deleted file mode 100644 index 6267779..0000000 --- a/doc/reference/comparison_less_equal.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comparison/less_equal.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LESS_EQUAL(X,Y)

-

Expands to 1 if X <= Y and 0 -otherwise.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_LESS_EQUAL(7,5) expands to 0.

- -

Test

- - -
- -

#define BOOST_PP_LESS_EQUAL_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/comparison_not_equal.htm b/doc/reference/comparison_not_equal.htm deleted file mode 100644 index 3ab7d6b..0000000 --- a/doc/reference/comparison_not_equal.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/comparison/not_equal.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_NOT_EQUAL(X,Y)

-

Expands to 1 if X != Y and 0 -otherwise.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_NOT_EQUAL(4,4) expands to 0.

- -

Test

- - -
- -

#define BOOST_PP_NOT_EQUAL_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/dec.htm b/doc/reference/dec.htm deleted file mode 100644 index d8e309a..0000000 --- a/doc/reference/dec.htm +++ /dev/null @@ -1,52 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/dec.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_DEC(X)

-

Decrements X expanding to a single token.

- -

For example, BOOST_PP_DEC(3) expands to 2 (a -single token).

- -

BOOST_PP_DEC() uses saturation arithmetic. Decrementing 0 yeilds a 0.

- -

Only decimal integer literals in the range [0,BOOST_PP_LIMIT_MAG] are -supported.

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/empty.htm b/doc/reference/empty.htm deleted file mode 100644 index fc14256..0000000 --- a/doc/reference/empty.htm +++ /dev/null @@ -1,62 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/empty.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_EMPTY()

-

Expands to nothing.

- -

For example,

- -
-BOOST_PP_IF(0,BOOST_PP_COMMA,BOOST_PP_EMPTY)()
-
- -

expands to nothing.

- -

Example

- - -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/enum.htm b/doc/reference/enum.htm deleted file mode 100644 index e89bcb6..0000000 --- a/doc/reference/enum.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/enum.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_ENUM(COUNT,MACRO,DATA)

-

Generates a comma separated list.

- -

In other words, expands to the sequence:

- -
-MACRO(0,DATA), MACRO(1,DATA), ..., MACRO(BOOST_PP_DEC(COUNT),DATA)
-
- -

For example,

- -
-#define TYPED_PARAM(INDEX,DATA)\
-  BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,0,DATA),INDEX) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,1,DATA),INDEX)
-BOOST_PP_ENUM(3,TYPED_PARAM,(X,x))
-
- -

expands to:

- -
-X0 x0, X1 x1, X2 x2
-
- -

2D and 3D repetition

- -

BOOST_PP_ENUM() implements automatic recursion. 2D and 3D repetition -are directly supported.

- -

See

- - -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/enum_params.htm b/doc/reference/enum_params.htm deleted file mode 100644 index a257eba..0000000 --- a/doc/reference/enum_params.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/enum_params.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_ENUM_PARAMS(COUNT,PARAM)

-

Generates a comma separated list of parameters.

- -

In other words, expands to the sequence:

- -
-BOOST_PP_CAT(PARAM,0), BOOST_PP_CAT(PARAM,1), ..., BOOST_PP_CAT(PARAM,BOOST_PP_DEC(COUNT))
-
- -

For example,

- -
-BOOST_PP_ENUM_PARAMS(3,x)
-
- -

expands to:

- -
-x0, x1, x2
-
- -

Uses

- - -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/enum_params_with_a_default.htm b/doc/reference/enum_params_with_a_default.htm deleted file mode 100644 index 8d10a14..0000000 --- a/doc/reference/enum_params_with_a_default.htm +++ /dev/null @@ -1,75 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/enum_params_with_a_default.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(COUNT,PARAM,DEFAULT)

-

Generates a comma separated list of parameters with a default.

- -

In other words, expands to the sequence:

- -
-BOOST_PP_CAT(PARAM,0) = DEFAULT,
-BOOST_PP_CAT(PARAM,1) = DEFAULT,
-...,
-BOOST_PP_CAT(PARAM,BOOST_PP_DEC(COUNT)) = DEFAULT
-
- -

For example,

- -
-BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(3,x,y)
-
- -

expands to:

- -
-x0 = y, x1 = y, x2 = y
-
- -

Uses

- - -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/enum_params_with_defaults.htm b/doc/reference/enum_params_with_defaults.htm deleted file mode 100644 index a635190..0000000 --- a/doc/reference/enum_params_with_defaults.htm +++ /dev/null @@ -1,75 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/enum_params_with_defaults.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(COUNT,PARAM,DEFAULT)

-

Generates a comma separated list of parameters with defaults.

- -

In other words, expands to the sequence:

- -
-BOOST_PP_CAT(PARAM,0) = BOOST_PP_CAT(DEFAULT,0),
-BOOST_PP_CAT(PARAM,1) = BOOST_PP_CAT(DEFAULT,1),
-...,
-BOOST_PP_CAT(PARAM,BOOST_PP_DEC(COUNT)) = BOOST_PP_CAT(DEFAULT,BOOST_PP_DEC(COUNT))
-
- -

For example,

- -
-BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(3,x,y)
-
- -

expands to:

- -
-x0 = y0, x1 = y1, x2 = y2
-
- -

Uses

- - -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/enum_shifted.htm b/doc/reference/enum_shifted.htm deleted file mode 100644 index 61b51a0..0000000 --- a/doc/reference/enum_shifted.htm +++ /dev/null @@ -1,69 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/enum_shifted.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_ENUM_SHIFTED(COUNT,MACRO,DATA)

-

Generates a comma separated shifted list.

- -

In other words, expands to the sequence:

- -
-MACRO(1,DATA), MACRO(2,DATA), ..., MACRO(BOOST_PP_DEC(COUNT),DATA)
-
- -

For example,

- -
-#define TYPED_PARAM(INDEX,DATA)\
-  BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,0,DATA),INDEX) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,1,DATA),INDEX)
-BOOST_PP_ENUM_SHIFTED(3,TYPED_PARAM,(X,x))
-
- -

expands to:

- -
-X1 x1, X2 x2
-
- -

Uses

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/enum_shifted_params.htm b/doc/reference/enum_shifted_params.htm deleted file mode 100644 index 33679ff..0000000 --- a/doc/reference/enum_shifted_params.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/enum_shifted_params.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_ENUM_SHIFTED_PARAMS(COUNT,PARAM)

-

Generates a comma separated list of shifted actual parameters.

- -

In other words, expands to the sequence:

- -
-BOOST_PP_CAT(PARAM,1), BOOST_PP_CAT(PARAM,2), ..., BOOST_PP_CAT(PARAM,BOOST_PP_DEC(COUNT))
-
-

For example,

- -
-BOOST_PP_ENUM_SHIFTED_PARAMS(3,x)
-
- -

expands to:

- -
-x1, x2
-
- -

Uses

- - -

Rationale

-
    -
  • This macro facilitates a typical usage of the library. Shifted parameter - lists are common in template metaprograms.
  • -
- -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/expand.htm b/doc/reference/expand.htm deleted file mode 100644 index 306f2da..0000000 --- a/doc/reference/expand.htm +++ /dev/null @@ -1,43 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/expand.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_EXPAND(X)

-

Essentially macro expands the parameter X twice.

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/expr_if.htm b/doc/reference/expr_if.htm deleted file mode 100644 index 541f234..0000000 --- a/doc/reference/expr_if.htm +++ /dev/null @@ -1,53 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/expr_if.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_EXPR_IF(COND,EXPR)

-

Expands to EXPR if COND != 0 and to nothing if COND == 0.

- -

COND must expand to an integer literal in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_EXPR_IF(1,^) expands to ^.

- -

See

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/for.htm b/doc/reference/for.htm deleted file mode 100644 index 84bd48d..0000000 --- a/doc/reference/for.htm +++ /dev/null @@ -1,114 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/for.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_FOR(STATE,PRED,OP,MACRO)

-

Repeats MACRO(R,STATE) and iterates OP(R,STATE) while -PRED(R,STATE) is true.

- -

In other words, expands to the sequence:

- -
-MACRO(R,STATE)
-MACRO(R,OP(R,STATE))
-MACRO(R,OP(R,OP(R,STATE)))
-...
-MACRO(R,OP(R,OP(...OP(R,STATE)...)))
-
- -

The length of the sequence is determined by PRED(R,STATE).

- -

For example,

- -
-#define PRED(R,STATE) BOOST_PP_LESS(BOOST_PP_TUPLE_ELEM(2,0,STATE),BOOST_PP_TUPLE_ELEM(2,1,STATE))
-#define OP(R,STATE) (BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2,0,STATE)),BOOST_PP_TUPLE_ELEM(2,1,STATE))
-#define MACRO(R,STATE) BOOST_PP_TUPLE_ELEM(2,0,STATE)
-BOOST_PP_FOR((0,3),PRED,OP,MACRO)
-
- -

expands to:

- -
-0 1 2
-
- -

Legend

-
    -
  • STATE is the current state of iteration. The state is usually a tuple.
  • -
  • PRED is the condition for iteration. It must expand to a decimal - integer literal.
  • -
  • OP is the iterated macro. Note that if the state is a tuple, then - OP(R,STATE) usually expands to a tuple of the same number of elements.
  • -
  • MACRO is the state instantiation macro.
  • -
  • R is the recursion depth and should only be used as a parameter to - other macros using BOOST_PP_FOR() or for invoking BOOST_PP_FOR##R() - directly. For each macro using BOOST_PP_FOR(), e.g. BOOST_PP_LIST_FOR_EACH(), - there is a version of the macro, e.g. BOOST_PP_LIST_FOR_EACH_R(), distinguished - by the R suffix, that accepts an additional recursion depth as the first - parameter. This technique is necessary to avoid recursively expanding the same - macro again, which is not permitted by the C++ preprocessor.
  • -
- -

BOOST_PP_REPEAT() vs BOOST_PP_FOR()

- -

BOOST_PP_FOR() is a generalization of BOOST_PP_REPEAT(). This means that -BOOST_PP_REPEAT() can be implemented using BOOST_PP_FOR(). However, -BOOST_PP_REPEAT() was introduced earlier, is generally easier to use, and is -still quite useful on its own.

- -

2D and 3D repetition

- -

BOOST_PP_FOR() can be used for multidimensional repetition simply by -invoking BOOST_PP_FOR##R() directly.

- -

Automatic recursion?

- -

BOOST_PP_FOR() currently does not implement automatic recursion. The reason -for this is that it would lead to very poor performance. The automatic recursion -technique takes O(N) steps just to find out that the Nth recursion should be used. -This would dramatically effect the time complexity of macros using automatic -recursion.

- -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/identity.htm b/doc/reference/identity.htm deleted file mode 100644 index 32a28a0..0000000 --- a/doc/reference/identity.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/identity.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_IDENTITY(X)

-

Expands to X once invoked.

- -

Designed to be used with BOOST_PP_IF(), when one of the clauses need to be -invoked.

- -

For example,

- -
-BOOST_PP_IF(1,BOOST_PP_IDENTITY(X),BOOST_PP_EMPTY)()
-
- -

expands to:

- -
-X
-
- -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/if.htm b/doc/reference/if.htm deleted file mode 100644 index b2ceb31..0000000 --- a/doc/reference/if.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/if.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_IF(COND,THEN,ELSE)

-

Expands to THEN if COND != 0 and ELSE if -COND == 0.

- -

COND must expand to an integer literal in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_IF(0,1,2) expands to 2.

- -

See

- - -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/inc.htm b/doc/reference/inc.htm deleted file mode 100644 index 90b2e4b..0000000 --- a/doc/reference/inc.htm +++ /dev/null @@ -1,53 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/inc.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_INC(X)

-

Increments X expanding to a single token.

- -

For example, BOOST_PP_INC(3) expands to 4 (a -single token).

- -

BOOST_PP_INC() uses saturation arithmetic. Incrementing a -BOOST_PP_LIMIT_MAG yields a BOOST_PP_LIMIT_MAG.

- -

Only decimal integer literals in the range [0,BOOST_PP_LIMIT_MAG] are -supported.

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/index.htm b/doc/reference/index.htm deleted file mode 100644 index 599ae7e..0000000 --- a/doc/reference/index.htm +++ /dev/null @@ -1,225 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Reference

-
-
- -

Macros (Headers)

- -
-
BOOST_PP_ADD
-
BOOST_PP_ADD_D
-
BOOST_PP_AND
-
BOOST_PP_ASSERT_MSG
-
BOOST_PP_BOOL
-
BOOST_PP_CAT
-
BOOST_PP_COMMA
-
BOOST_PP_COMMA_IF
-
BOOST_PP_DEC
-
BOOST_PP_DIV
-
BOOST_PP_DIV_D
-
BOOST_PP_EMPTY
-
BOOST_PP_ENUM
-
BOOST_PP_ENUM_PARAMS
-
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT
-
BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS
-
BOOST_PP_ENUM_SHIFTED
-
BOOST_PP_ENUM_SHIFTED_PARAMS
-
BOOST_PP_EQUAL
-
BOOST_PP_EQUAL_D
-
BOOST_PP_EXPAND
-
BOOST_PP_EXPR_IF
-
BOOST_PP_FOR
-
BOOST_PP_GREATER
-
BOOST_PP_GREATER_D
-
BOOST_PP_GREATER_EQUAL
-
BOOST_PP_GREATER_EQUAL_D
-
BOOST_PP_IDENTITY
-
BOOST_PP_IF
-
BOOST_PP_INC
-
BOOST_PP_LESS
-
BOOST_PP_LESS_D
-
BOOST_PP_LESS_EQUAL
-
BOOST_PP_LESS_EQUAL_D
-
BOOST_PP_LIMIT_DIM
-
BOOST_PP_LIMIT_MAG
-
BOOST_PP_LIMIT_TUPLE
-
BOOST_PP_LIST_APPEND
-
BOOST_PP_LIST_APPEND_D
-
BOOST_PP_LIST_AT
-
BOOST_PP_LIST_AT_D
-
BOOST_PP_LIST_CAT
-
BOOST_PP_LIST_CAT_D
-
BOOST_PP_LIST_CONS
-
BOOST_PP_LIST_ENUM
-
BOOST_PP_LIST_ENUM_R
-
BOOST_PP_LIST_FILTER
-
BOOST_PP_LIST_FILTER_D
-
BOOST_PP_LIST_FIRST
-
BOOST_PP_LIST_FIRST_N
-
BOOST_PP_LIST_FIRST_N_D
-
BOOST_PP_LIST_FOLD_LEFT
-
BOOST_PP_LIST_FOLD_LEFT_2ND
-
BOOST_PP_LIST_FOLD_LEFT_2ND_D
-
BOOST_PP_LIST_FOLD_LEFT_D
-
BOOST_PP_LIST_FOLD_RIGHT
-
BOOST_PP_LIST_FOLD_RIGHT_2ND
-
BOOST_PP_LIST_FOLD_RIGHT_2ND_D
-
BOOST_PP_LIST_FOLD_RIGHT_D
-
BOOST_PP_LIST_FOR_EACH
-
BOOST_PP_LIST_FOR_EACH_I
-
BOOST_PP_LIST_FOR_EACH_I_R
-
BOOST_PP_LIST_FOR_EACH_PRODUCT
-
BOOST_PP_LIST_FOR_EACH_PRODUCT_R
-
BOOST_PP_LIST_FOR_EACH_R
-
BOOST_PP_LIST_IS_CONS
-
BOOST_PP_LIST_IS_NIL
-
BOOST_PP_LIST_NIL
-
BOOST_PP_LIST_REST
-
BOOST_PP_LIST_REST_N
-
BOOST_PP_LIST_REST_N_D
-
BOOST_PP_LIST_REVERSE
-
BOOST_PP_LIST_REVERSE_D
-
BOOST_PP_LIST_SIZE
-
BOOST_PP_LIST_SIZE_D
-
BOOST_PP_LIST_TO_TUPLE
-
BOOST_PP_LIST_TO_TUPLE_R
-
BOOST_PP_LIST_TRANSFORM
-
BOOST_PP_LIST_TRANSFORM_D
-
BOOST_PP_MAX
-
BOOST_PP_MAX_D
-
BOOST_PP_MIN
-
BOOST_PP_MIN_D
-
BOOST_PP_MOD
-
BOOST_PP_MOD_D
-
BOOST_PP_MUL
-
BOOST_PP_MUL_D
-
BOOST_PP_NOR
-
BOOST_PP_NOT
-
BOOST_PP_NOT_EQUAL
-
BOOST_PP_NOT_EQUAL_D
-
BOOST_PP_OR
-
BOOST_PP_REPEAT
-
BOOST_PP_REPEAT_2ND
-
BOOST_PP_REPEAT_3RD
-
BOOST_PP_REPEAT_FROM_TO
-
BOOST_PP_REPEAT_FROM_TO_2ND
-
BOOST_PP_REPEAT_FROM_TO_3RD
-
BOOST_PP_STRINGIZE
-
BOOST_PP_SUB
-
BOOST_PP_SUB_D
-
BOOST_PP_TUPLE_EAT
-
BOOST_PP_TUPLE_ELEM
-
BOOST_PP_TUPLE_REVERSE
-
BOOST_PP_TUPLE_TO_LIST
-
BOOST_PP_WHILE
-
BOOST_PP_XOR
-
-
- -

Headers (Macros)

- -
-
#include <boost/preprocessor/arithmetic.hpp>
-
#include <boost/preprocessor/arithmetic/add.hpp>
-
#include <boost/preprocessor/arithmetic/div.hpp>
-
#include <boost/preprocessor/arithmetic/mod.hpp>
-
#include <boost/preprocessor/arithmetic/mul.hpp>
-
#include <boost/preprocessor/arithmetic/sub.hpp>
-
#include <boost/preprocessor/assert_msg.hpp>
-
#include <boost/preprocessor/cat.hpp>
-
#include <boost/preprocessor/comma.hpp>
-
#include <boost/preprocessor/comma_if.hpp>
-
#include <boost/preprocessor/comparison.hpp>
-
#include <boost/preprocessor/comparison/equal.hpp>
-
#include <boost/preprocessor/comparison/greater.hpp>
-
#include <boost/preprocessor/comparison/greater_equal.hpp>
-
#include <boost/preprocessor/comparison/less.hpp>
-
#include <boost/preprocessor/comparison/less_equal.hpp>
-
#include <boost/preprocessor/comparison/not_equal.hpp>
-
#include <boost/preprocessor/dec.hpp>
-
#include <boost/preprocessor/empty.hpp>
-
#include <boost/preprocessor/enum.hpp>
-
#include <boost/preprocessor/enum_params.hpp>
-
#include <boost/preprocessor/enum_params_with_a_default.hpp>
-
#include <boost/preprocessor/enum_params_with_defaults.hpp>
-
#include <boost/preprocessor/enum_shifted.hpp>
-
#include <boost/preprocessor/enum_shifted_params.hpp>
-
#include <boost/preprocessor/expand.hpp>
-
#include <boost/preprocessor/expr_if.hpp>
-
#include <boost/preprocessor/for.hpp>
-
#include <boost/preprocessor/identity.hpp>
-
#include <boost/preprocessor/if.hpp>
-
#include <boost/preprocessor/inc.hpp>
-
#include <boost/preprocessor/limits.hpp>
-
#include <boost/preprocessor/list.hpp>
-
#include <boost/preprocessor/list/adt.hpp>
-
#include <boost/preprocessor/list/append.hpp>
-
#include <boost/preprocessor/list/at.hpp>
-
#include <boost/preprocessor/list/cat.hpp>
-
#include <boost/preprocessor/list/enum.hpp>
-
#include <boost/preprocessor/list/filter.hpp>
-
#include <boost/preprocessor/list/first_n.hpp>
-
#include <boost/preprocessor/list/fold_left.hpp>
-
#include <boost/preprocessor/list/fold_left_2nd.hpp>
-
#include <boost/preprocessor/list/fold_right.hpp>
-
#include <boost/preprocessor/list/fold_right_2nd.hpp>
-
#include <boost/preprocessor/list/for_each.hpp>
-
#include <boost/preprocessor/list/for_each_i.hpp>
-
#include <boost/preprocessor/list/for_each_product.hpp>
-
#include <boost/preprocessor/list/rest_n.hpp>
-
#include <boost/preprocessor/list/reverse.hpp>
-
#include <boost/preprocessor/list/size.hpp>
-
#include <boost/preprocessor/list/to_tuple.hpp>
-
#include <boost/preprocessor/list/transform.hpp>
-
#include <boost/preprocessor/logical.hpp>
-
#include <boost/preprocessor/logical/and.hpp>
-
#include <boost/preprocessor/logical/bool.hpp>
-
#include <boost/preprocessor/logical/nor.hpp>
-
#include <boost/preprocessor/logical/not.hpp>
-
#include <boost/preprocessor/logical/or.hpp>
-
#include <boost/preprocessor/logical/xor.hpp>
-
#include <boost/preprocessor/max.hpp>
-
#include <boost/preprocessor/min.hpp>
-
#include <boost/preprocessor/repeat.hpp>
-
#include <boost/preprocessor/repeat_2nd.hpp>
-
#include <boost/preprocessor/repeat_3rd.hpp>
-
#include <boost/preprocessor/repeat_from_to.hpp>
-
#include <boost/preprocessor/repeat_from_to_2nd.hpp>
-
#include <boost/preprocessor/repeat_from_to_3rd.hpp>
-
#include <boost/preprocessor/stringize.hpp>
-
#include <boost/preprocessor/tuple.hpp>
-
#include <boost/preprocessor/tuple/eat.hpp>
-
#include <boost/preprocessor/tuple/elem.hpp>
-
#include <boost/preprocessor/tuple/reverse.hpp>
-
#include <boost/preprocessor/tuple/to_list.hpp>
-
#include <boost/preprocessor/while.hpp>
-
- -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/limits.htm b/doc/reference/limits.htm deleted file mode 100644 index c07528c..0000000 --- a/doc/reference/limits.htm +++ /dev/null @@ -1,71 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/limits.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIMIT_DIM

-

Expands to the number of dimensions of repeat supported by the -library.

- -

This concerns the repetition primitives (BOOST_PP_ENUM(), -BOOST_PP_REPEAT() and BOOST_PP_REPEAT_FROM_TO()).

- -
- -

#define BOOST_PP_LIMIT_MAG

-

Expands to the maximum straight numeric literal supported by the -library.

- -

This is also the limit of the repetition primitives (BOOST_PP_ENUM(), -BOOST_PP_REPEAT() and BOOST_PP_REPEAT_FROM_TO()).

- -

Note

- - -
- -

#define BOOST_PP_LIMIT_TUPLE

-

Expands to the maximum tuple size supported by the library.

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list.htm b/doc/reference/list.htm deleted file mode 100644 index 3e93239..0000000 --- a/doc/reference/list.htm +++ /dev/null @@ -1,53 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list.hpp>

-
- -
- -Prev Next Macros Headers -
- -

Includes all list headers.

- -

A list is an arbitrary size collection of elements.

- -

In the preprocessor library, the internal representation of lists -uses parts that are like macro parameter lists. Thus an element of a list -can be any sequence of tokens that constitutes a single macro parameter.

- -

Lists are manipulated using both list ADT macros and higher-order macros. For an introduction to manipulation of lists in functional programming, see -[Thompson], -[Abelson] or -[Cousineau].

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_adt.htm b/doc/reference/list_adt.htm deleted file mode 100644 index fa3e37f..0000000 --- a/doc/reference/list_adt.htm +++ /dev/null @@ -1,135 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/adt.hpp>

-
- -
- -Prev Next Macros Headers -
- -

This header defines the fundamental list operations.

- -

Note

-
    -
  • The internal representation of lists is hidden. Although there aren't - compelling reasons to change the representation, you should avoid - writing code that depends on the internal representation details.
  • -
- -
- -

#define BOOST_PP_LIST_CONS(FIRST,REST)

-

List constructor.

- -

Lists are build using list constructors BOOST_PP_LIST_NIL and -BOOST_PP_LIST_CONS(). For example,

- -
-BOOST_PP_LIST_CONS(1,
-BOOST_PP_LIST_CONS(2,
-BOOST_PP_LIST_CONS(3,
-BOOST_PP_LIST_CONS(4,
-BOOST_PP_LIST_CONS(5,
-BOOST_PP_LIST_NIL)))))
-
- -

Short lists can also be build from tuples:

- -
-BOOST_PP_TUPLE_TO_LIST(5,(1,2,3,4,5))
-
- -

Both of the above lists contain 5 elements: 1, 2, 3, 4 and 5.

- -

Longer lists can be built from short lists with BOOST_PP_LIST_APPEND_D() -and BOOST_PP_LIST_FOLD_RIGHT():

- -
-BOOST_PP_LIST_FOLD_RIGHT
-( BOOST_PP_LIST_APPEND_D
-, BOOST_PP_TUPLE_TO_LIST
-  ( N
-  , BOOST_PP_TUPLE_TO_LIST(M, (E11, E12, ..., E1M) )
-  , BOOST_PP_TUPLE_TO_LIST(M, (E21, E22, ..., E2M) )
-  , ...
-  , BOOST_PP_TUPLE_TO_LIST(M, (EN1, EN2, ..., ENM) )
-  )
-, BOOST_PP_LIST_NIL
-)
-
- -
- -

#define BOOST_PP_LIST_NIL

-

List nil constructor.

-
- -

#define BOOST_PP_LIST_IS_CONS(LIST)

-

Expands to 1 if the list is not nil and 0 otherwise.

-
- -

#define BOOST_PP_LIST_IS_NIL(LIST)

-

Expands to 1 if the list is nil and 0 otherwise.

-
- -

#define BOOST_PP_LIST_FIRST(LIST)

-

Expands to the first element of the list. The list must not be nil.

- -

For example,

- -
-BOOST_PP_LIST_FIRST(BOOST_PP_TUPLE_TO_LIST(5,(1,2,3,4,5)))
-
- -

expands to 1.

- -
- -

#define BOOST_PP_LIST_REST(LIST)

-

Expands to a list of all but the first element of the list.

- -

The list must not be nil.

- -

For example,

- -
-BOOST_PP_LIST_REST(BOOST_PP_TUPLE_TO_LIST(5,(1,2,3,4,5)))
-
- -

expands to the same as:

- -
-BOOST_PP_TUPLE_TO_LIST(4,(2,3,4,5))
-
- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_append.htm b/doc/reference/list_append.htm deleted file mode 100644 index a51caef..0000000 --- a/doc/reference/list_append.htm +++ /dev/null @@ -1,68 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/append.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_APPEND(LIST_1ST,LIST_2ND)

-

Catenates two lists together.

- -

For example,

- -
-BOOST_PP_LIST_APPEND
-( BOOST_PP_TUPLE_TO_LIST(2,(1,2))
-, BOOST_PP_TUPLE_TO_LIST(2,(3,4))
-)
-
- -

expands to the same as:

- -
-BOOST_PP_TUPLE_TO_LIST(4,(1,2,3,4))
-
- -

Test

- - -
- -

#define BOOST_PP_LIST_APPEND_D(D,LIST_1ST,LIST_2ND)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_at.htm b/doc/reference/list_at.htm deleted file mode 100644 index 1a92d1d..0000000 --- a/doc/reference/list_at.htm +++ /dev/null @@ -1,62 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/at.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_AT(LIST,INDEX)

-

Expands to the INDEX:th element of the list LIST. The -first element is at index 0.

- -

For example,

- -
-BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)),1)
-
- -

expands to B.

- -

Test

- - -
- -

#define BOOST_PP_LIST_AT_D(D,LIST,INDEX)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_cat.htm b/doc/reference/list_cat.htm deleted file mode 100644 index c85d5b4..0000000 --- a/doc/reference/list_cat.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/cat.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_CAT(LIST)

-

Catenates all elements of the list.

- -

For example,

- -
-BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(3,(1,2,3)))
-
- -

expands to:

- -
-123
-
- -

Test

- - -
- -

#define BOOST_PP_LIST_CAT_D(D,LIST)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_enum.htm b/doc/reference/list_enum.htm deleted file mode 100644 index 0d41483..0000000 --- a/doc/reference/list_enum.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/enum.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_ENUM(LIST)

-

Converts the list to a comma separated list.

- -

For example,

- -
-BOOST_PP_LIST_ENUM(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
-
- -

expands to:

- -
-A,B,C
-
- -

Uses

- - -
- -

#define BOOST_PP_LIST_ENUM_R(R,LIST)

-

Can be used inside BOOST_PP_FOR() (see for an explanation of the R parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_filter.htm b/doc/reference/list_filter.htm deleted file mode 100644 index d8b0d53..0000000 --- a/doc/reference/list_filter.htm +++ /dev/null @@ -1,66 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/filter.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_FILTER(PRED,DATA,LIST)

-

Expands to a list containing all the elements X of the list -for which PRED(D,DATA,X) is true.

- -

For example,

- -
-BOOST_PP_LIST_FILTER(BOOST_PP_NOT_EQUAL_D,2,BOOST_PP_TUPLE_TO_LIST(3,(1,2,3)))
-
- -

expands to the same as:

- -
-BOOST_PP_TUPLE_TO_LIST(2,(1,3))
-
- -

Test

- - -
- -

#define BOOST_PP_LIST_FILTER_D(D,PRED,DATA,LIST)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_first_n.htm b/doc/reference/list_first_n.htm deleted file mode 100644 index 572f10e..0000000 --- a/doc/reference/list_first_n.htm +++ /dev/null @@ -1,71 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/first_n.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_FIRST_N(COUNT,LIST)

-

Expands to a list of the first COUNT elements of the list -LIST.

- -

For example,

- -
-BOOST_PP_LIST_FIRST_N(2,BOOST_PP_TUPLE_TO_LIST(4,(+,-,*,/)))
-
- -

expands to the same as:

- -
-BOOST_PP_TUPLE_TO_LIST(2,(+,-))
-
- -

See

- - -

Test

- - -
- -

#define BOOST_PP_LIST_FIRST_N_D(D,COUNT,LIST)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_fold_left.htm b/doc/reference/list_fold_left.htm deleted file mode 100644 index 6c893b0..0000000 --- a/doc/reference/list_fold_left.htm +++ /dev/null @@ -1,103 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/fold_left.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_FOLD_LEFT(OP,STATE,LIST)

-

Iterates OP(D,STATE,X) for each element X of the -list LIST (from the left or the start of the list).

- -

In other words, expands to:

- -
-OP
-( D
-, ... OP(D, OP(D,STATE,BOOST_PP_LIST_AT(LIST,0)), BOOST_PP_LIST_AT(LIST,1)) ...
-, BOOST_PP_LIST_AT(LIST,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(LIST))
-)
-
- -

For example,

- -
-#define TEST(D,STATE,X) BOOST_PP_CAT(STATE,X)
-BOOST_PP_LIST_FOLD_LEFT(TEST,_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
-
- -

expands to:

- -
-_ABC
-
- -

Note

-
    -
  • Folding, or accumulation, is a very general pattern of computation. - Most list operations can be implemented in terms of folding.
  • -
- -

See

- - -

Test

- - -
- -

#define BOOST_PP_LIST_FOLD_LEFT_D(D,OP,STATE,LIST)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

- -

Note

- - -
- -

#define BOOST_PP_LIST_FOLD_LEFT_2ND

-

Obsolete, just use BOOST_PP_LIST_FOLD_LEFT().

-
- -

#define BOOST_PP_LIST_FOLD_LEFT_2ND_D

-

Obsolete, just use BOOST_PP_LIST_FOLD_LEFT_D().

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_fold_left_2nd.htm b/doc/reference/list_fold_left_2nd.htm deleted file mode 100644 index 27f2a96..0000000 --- a/doc/reference/list_fold_left_2nd.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/fold_left_2nd.hpp>

-
- -
- -Prev Next Macros Headers -
- -

This header is obsolete. Use the following code instead.

- -
-#include <boost/preprocessor/list/fold_left.hpp>
-
- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_fold_right.htm b/doc/reference/list_fold_right.htm deleted file mode 100644 index 5c0fe4c..0000000 --- a/doc/reference/list_fold_right.htm +++ /dev/null @@ -1,106 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/fold_right.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_FOLD_RIGHT(OP,LIST,STATE)

-

Iterates OP(D,X,STATE) for each element X of the -list LIST (from the right or the end of the list).

- -

In other words, expands to:

- -
-OP
-( D
-, BOOST_PP_LIST_AT(LIST,0)
-, ... OP
-      ( D
-      , BOOST_PP_LIST_AT(LIST,BOOST_PP_SUB(BOOST_PP_LIST_SIZE(LIST),2))
-      , OP
-        ( D
-        , BOOST_PP_LIST_AT(LIST,BOOST_PP_SUB(BOOST_PP_LIST_SIZE(LIST),1))
-        , STATE
-        )
-      ) ...
-)
-
- -

For example,

- -
-#define TEST(D,X,STATE) BOOST_PP_CAT(STATE,X)
-BOOST_PP_LIST_FOLD_RIGHT(TEST,_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
-
- -

expands to:

- -
-_CBA
-
- -

Note

-
    -
  • Folding, or accumulation, is a very general pattern of computation. - Most list operations can be implemented in terms of folding.
  • -
- -

Test

- - -
- -

#define BOOST_PP_LIST_FOLD_RIGHT_D(D,OP,LIST,STATE)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

- -

Note

- - -
- -

#define BOOST_PP_LIST_FOLD_RIGHT_2ND

-

Obsolete, just use BOOST_PP_LIST_FOLD_RIGHT().

-
- -

#define BOOST_PP_LIST_FOLD_RIGHT_2ND_D

-

Obsolete, just use BOOST_PP_LIST_FOLD_RIGHT_D().

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_fold_right_2nd.htm b/doc/reference/list_fold_right_2nd.htm deleted file mode 100644 index 15f139f..0000000 --- a/doc/reference/list_fold_right_2nd.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/fold_right_2nd.hpp>

-
- -
- -Prev Next Macros Headers -
- -

This header is obsolete. Use the following code instead.

- -
-#include <boost/preprocessor/list/fold_right.hpp>
-
- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_for_each.htm b/doc/reference/list_for_each.htm deleted file mode 100644 index d5656f8..0000000 --- a/doc/reference/list_for_each.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/for_each.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_FOR_EACH(MACRO,DATA,LIST)

-

Repeats MACRO(R,DATA,BOOST_PP_LIST_AT(LIST,INDEX)) for each INDEX = [0, -BOOST_PP_LIST_SIZE(LIST)).

- -

In other words, expands to the sequence:

- -
-MACRO(R,DATA,BOOST_PP_LIST_AT(LIST,0))
-MACRO(R,DATA,BOOST_PP_LIST_AT(LIST,1))
-...
-MACRO(R,DATA,BOOST_PP_LIST_AT(LIST,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(LIST))))
-
- -

For example,

- -
-#define TEST(R,DATA,X) BOOST_PP_CAT(DATA,X)();
-BOOST_PP_LIST_FOR_EACH(TEST,prefix_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
-
- -

expands to:

- -
-prefix_A(); prefix_B(); prefix_C();
-
- -

Example

- - -

Test

- - -
- -

#define BOOST_PP_LIST_FOR_EACH_R(R,MACRO,DATA,LIST)

-

Can be used inside BOOST_PP_FOR() (see for an explanation of the R parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_for_each_i.htm b/doc/reference/list_for_each_i.htm deleted file mode 100644 index b4b0ac0..0000000 --- a/doc/reference/list_for_each_i.htm +++ /dev/null @@ -1,71 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/for_each_i.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_FOR_EACH_I(MACRO,DATA,LIST)

-

Repeats MACRO(R,DATA,INDEX,BOOST_PP_LIST_AT(LIST,INDEX)) for each INDEX = [0, -BOOST_PP_LIST_SIZE(LIST)).

- -

In other words, expands to the sequence:

- -
-MACRO(R,DATA,0,BOOST_PP_LIST_AT(LIST,0))
-MACRO(R,DATA,1,BOOST_PP_LIST_AT(LIST,1))
-...
-MACRO(R,DATA,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(LIST)),BOOST_PP_LIST_AT(LIST,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(LIST))))
-
- -

For example,

- -
-#define TEST(R,DATA,INDEX,X) BOOST_PP_CAT(DATA,X)(INDEX);
-BOOST_PP_LIST_FOR_EACH_I(TEST,prefix_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
-
- -

expands to:

- -
-prefix_A(0); prefix_B(1); prefix_C(2);
-
- -
- -

#define BOOST_PP_LIST_FOR_EACH_I_R(R,MACRO,DATA,LIST)

-

Can be used inside BOOST_PP_FOR() (see for an explanation of the R parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_for_each_product.htm b/doc/reference/list_for_each_product.htm deleted file mode 100644 index e70e6e1..0000000 --- a/doc/reference/list_for_each_product.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/for_each_product.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_FOR_EACH_PRODUCT(MACRO,SIZE_OF_TUPLE,TUPLE_OF_LISTS)

-

Repeats MACRO(R,X) for each element X of the -cartesian product of the lists of the SIZE_OF_TUPLE-tuple TUPLE_OF_LISTS.

- -

This macro is useful for generating code to avoid combinatorial -explosion.

- -

For example,

- -
-#define TEST(R,X) X
-BOOST_PP_LIST_FOR_EACH_PRODUCT
-( TEST
-, 2
-, ( BOOST_PP_TUPLE_TO_LIST(3,(A,B,C))
-  , BOOST_PP_TUPLE_TO_LIST(2,(1,2))
-  )
-)
-
- -

expands to:

- -
-(A,1) (A,2) (B,1) (B,2) (C,1) (C,2) 
-
- -

Example

- - -

Test

- - -
- -

#define BOOST_PP_LIST_FOR_EACH_PRODUCT_R(R,MACRO,SIZE_OF_TUPLE,TUPLE_OF_LISTS)

-

Can be used inside BOOST_PP_FOR() (see for an explanation of the R parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_rest_n.htm b/doc/reference/list_rest_n.htm deleted file mode 100644 index e15dd24..0000000 --- a/doc/reference/list_rest_n.htm +++ /dev/null @@ -1,71 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/rest_n.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_REST_N(COUNT,LIST)

-

Expands to a list of all but the first COUNT elements of the -list LIST.

- -

For example,

- -
-BOOST_PP_LIST_REST_N(2,BOOST_PP_TUPLE_TO_LIST(4,(+,-,*,/)))
-
- -

expands to the same as:

- -
-BOOST_PP_TUPLE_TO_LIST(2,(*,/))
-
- -

See

- - -

Test

- - -
- -

#define BOOST_PP_LIST_REST_N_D(D,COUNT,LIST)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_reverse.htm b/doc/reference/list_reverse.htm deleted file mode 100644 index 1e395fc..0000000 --- a/doc/reference/list_reverse.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/reverse.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_REVERSE(LIST)

-

List reversal.

- -

For example,

- -
-BOOST_PP_LIST_REVERSE(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
-
- -

expands to the same as:

- -
-BOOST_PP_TUPLE_TO_LIST(3,(C,B,A))
-
- -

Test

- - -
- -

#define BOOST_PP_LIST_REVERSE_D(D,LIST)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_size.htm b/doc/reference/list_size.htm deleted file mode 100644 index 5135860..0000000 --- a/doc/reference/list_size.htm +++ /dev/null @@ -1,61 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/size.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_SIZE(LIST)

-

Expands to the number of elements in the list.

- -

For example,

- -
-BOOST_PP_LIST_SIZE(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
-
- -

expands to 3.

- -

Test

- - -
- -

#define BOOST_PP_LIST_SIZE_D(D,LIST)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_to_tuple.htm b/doc/reference/list_to_tuple.htm deleted file mode 100644 index 5794af0..0000000 --- a/doc/reference/list_to_tuple.htm +++ /dev/null @@ -1,67 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/to_tuple.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_TO_TUPLE(LIST)

-

Converts the list to a tuple.

- -

For example,

- -
-BOOST_PP_LIST_TO_TUPLE(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
-
- -

expands to (A,B,C).

- -

Note

- - -

Test

- - -
- -

#define BOOST_PP_LIST_TO_TUPLE_R(R,LIST)

-

Can be used inside BOOST_PP_FOR() (see for an explanation of the R parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/list_transform.htm b/doc/reference/list_transform.htm deleted file mode 100644 index bc40484..0000000 --- a/doc/reference/list_transform.htm +++ /dev/null @@ -1,76 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/list/transform.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_LIST_TRANSFORM(OP,DATA,LIST)

-

Applies the macro OP(D,DATA,X) to each element X -of the list producing a new list.

- -

In other words, expands to:

- -
-BOOST_PP_LIST_CONS(OP(D,DATA,BOOST_PP_LIST_AT(LIST,0)),
-BOOST_PP_LIST_CONS(OP(D,DATA,BOOST_PP_LIST_AT(LIST,1)),
-...
-BOOST_PP_LIST_CONS(OP(D,DATA,BOOST_PP_LIST_AT(LIST,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(LIST)))),
-BOOST_PP_LIST_NIL) ... ))
-
- -

For example,

- -
-BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D,2,BOOST_PP_TUPLE_TO_LIST(2,(1,2)))
-
- -

expands to the same as:

- -
-BOOST_PP_TUPLE_TO_LIST(2,(3,4))
-
- -

Test

- - -
- -

#define BOOST_PP_LIST_TRANSFORM_D(D,OP,DATA,LIST)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/logical.htm b/doc/reference/logical.htm deleted file mode 100644 index 2f5f6c1..0000000 --- a/doc/reference/logical.htm +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/logical.hpp>

-
- -
- -Prev Next Macros Headers -
- -

Includes all logical headers.

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/logical_and.htm b/doc/reference/logical_and.htm deleted file mode 100644 index 36e6bad..0000000 --- a/doc/reference/logical_and.htm +++ /dev/null @@ -1,54 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/logical/and.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_AND(X,Y)

-

Expands to the logical AND of the operands.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_AND(0,5) expands to 0 (a single token).

- -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/logical_bool.htm b/doc/reference/logical_bool.htm deleted file mode 100644 index ec5e230..0000000 --- a/doc/reference/logical_bool.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/logical/bool.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_BOOL(X)

-

Expands to 0 if X == 0 and 1 if X != 0.

- -

X must be an integer literal in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_BOOL(3) expands to 1.

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/logical_nor.htm b/doc/reference/logical_nor.htm deleted file mode 100644 index 1a6c790..0000000 --- a/doc/reference/logical_nor.htm +++ /dev/null @@ -1,54 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/logical/nor.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_NOR(X,Y)

-

Expands to the logical NEITHER OR of the operands.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_NOR(0,5) expands to 0 (a single token).

- -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/logical_not.htm b/doc/reference/logical_not.htm deleted file mode 100644 index 99c0293..0000000 --- a/doc/reference/logical_not.htm +++ /dev/null @@ -1,53 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/logical/not.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_NOT(X)

-

Expands to the logical NOT of the operand.

- -

X must be an integer literal in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_NOT(0) expands to 1 (a single token).

- -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/logical_or.htm b/doc/reference/logical_or.htm deleted file mode 100644 index f54fcd0..0000000 --- a/doc/reference/logical_or.htm +++ /dev/null @@ -1,54 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/logical/or.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_OR(X,Y)

-

Expands to the logical OR of the operands.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_OR(0,2) expands to 1 (a single token).

- -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/logical_xor.htm b/doc/reference/logical_xor.htm deleted file mode 100644 index 6dc59bb..0000000 --- a/doc/reference/logical_xor.htm +++ /dev/null @@ -1,54 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/logical/xor.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_XOR(X,Y)

-

Expands to the logical EXCLUSIVE OR of the operands.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_XOR(1,2) expands to 0 (a single token).

- -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/max.htm b/doc/reference/max.htm deleted file mode 100644 index ee15baa..0000000 --- a/doc/reference/max.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/max.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_MAX(X,Y)

-

Expands to the maximum of X and Y.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_MAX(5,7) expands to 7 (a -single token).

- -

Test

- - -
- -

#define BOOST_PP_MAX_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/min.htm b/doc/reference/min.htm deleted file mode 100644 index 12cdd5c..0000000 --- a/doc/reference/min.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/min.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_MIN(X,Y)

-

Expands to the minimum of X and Y.

- -

Both X and Y must expand to integer literals -in the range [0, BOOST_PP_LIMIT_MAG].

- -

For example, BOOST_PP_MIN(5,7) expands to 5 (a -single token).

- -

Test

- - -
- -

#define BOOST_PP_MIN_D(D,X,Y)

-

Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/repeat.htm b/doc/reference/repeat.htm deleted file mode 100644 index e0d959c..0000000 --- a/doc/reference/repeat.htm +++ /dev/null @@ -1,95 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/repeat.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_REPEAT(COUNT,MACRO,DATA)

-

Repeats the macro MACRO(INDEX,DATA) for INDEX = [0,COUNT).

- -

In other words, expands to the sequence:

- -
-MACRO(0,DATA) MACRO(1,DATA) ... MACRO(BOOST_PP_DEC(COUNT),DATA)
-
- -

For example,

- -
-#define TEST(INDEX,DATA) DATA(INDEX);
-BOOST_PP_REPEAT(3,TEST,X)
-
- -

expands to:

- -
-X(0); X(1); X(2);
-
- -

2D and 3D repetition

- -

BOOST_PP_REPEAT() implements automatic recursion. 2D and 3D repetition -are directly supported.

- -

Example

- - -

See

- - -

Test

- - -
- -

#define BOOST_PP_REPEAT_2ND

-

Obsolete, just use BOOST_PP_REPEAT().

-
- -

#define BOOST_PP_REPEAT_3RD

-

Obsolete, just use BOOST_PP_REPEAT().

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/repeat_2nd.htm b/doc/reference/repeat_2nd.htm deleted file mode 100644 index 4ddaf5b..0000000 --- a/doc/reference/repeat_2nd.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/repeat_2nd.hpp>

-
- -
- -Prev Next Macros Headers -
- -

This header is obsolete. Use the following code instead.

- -
-#include <boost/preprocessor/repeat.hpp>
-
- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/repeat_3rd.htm b/doc/reference/repeat_3rd.htm deleted file mode 100644 index 62754fd..0000000 --- a/doc/reference/repeat_3rd.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/repeat_3rd.hpp>

-
- -
- -Prev Next Macros Headers -
- -

This header is obsolete. Use the following code instead.

- -
-#include <boost/preprocessor/repeat.hpp>
-
- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/repeat_from_to.htm b/doc/reference/repeat_from_to.htm deleted file mode 100644 index 85074a7..0000000 --- a/doc/reference/repeat_from_to.htm +++ /dev/null @@ -1,89 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/repeat_from_to.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_REPEAT_FROM_TO(FIRST,LAST,MACRO,DATA)

-

Repeats the macro MACRO(INDEX,DATA) for INDEX = [FIRST,LAST).

- -

In other words, expands to the sequence:

- -
-MACRO(FIRST,DATA) MACRO(BOOST_PP_INC(FIRST),DATA) ... MACRO(BOOST_PP_DEC(LAST),DATA)
-
- -

For example,

- -
-#define TEST(INDEX,DATA) DATA(INDEX);
-BOOST_PP_REPEAT_FROM_TO(4,7,TEST,X)
-
- -

expands to:

- -
-X(4); X(5); X(6);
-
- -

2D and 3D repetition

- -

BOOST_PP_REPEAT_FROM_TO() implements automatic recursion. 2D and 3D repetition -are directly supported.

- -

See

- - -

Test

- - -
- -

#define BOOST_PP_REPEAT_FROM_TO_2ND

-

Obsolete, just use BOOST_PP_REPEAT_FROM_TO().

-
- -

#define BOOST_PP_REPEAT_FROM_TO_3RD

-

Obsolete, just use BOOST_PP_REPEAT_FROM_TO().

-
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/repeat_from_to_2nd.htm b/doc/reference/repeat_from_to_2nd.htm deleted file mode 100644 index 58029c9..0000000 --- a/doc/reference/repeat_from_to_2nd.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/repeat_from_to_2nd.hpp>

-
- -
- -Prev Next Macros Headers -
- -

This header is obsolete. Use the following code instead.

- -
-#include <boost/preprocessor/repeat_from_to.hpp>
-
- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/repeat_from_to_3rd.htm b/doc/reference/repeat_from_to_3rd.htm deleted file mode 100644 index 741dbcc..0000000 --- a/doc/reference/repeat_from_to_3rd.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/repeat_from_to_3rd.hpp>

-
- -
- -Prev Next Macros Headers -
- -

This header is obsolete. Use the following code instead.

- -
-#include <boost/preprocessor/repeat_from_to.hpp>
-
- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/stringize.htm b/doc/reference/stringize.htm deleted file mode 100644 index 17430ad..0000000 --- a/doc/reference/stringize.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/stringize.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_STRINGIZE(X)

-

Stringizes X after it is macro expanded.

- -

For example, BOOST_PP_STRINGIZE(BOOST_PP_CAT(a,b)) expands to "ab".

- -

Example

- - -

Test

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/tuple.htm b/doc/reference/tuple.htm deleted file mode 100644 index d5faebb..0000000 --- a/doc/reference/tuple.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/tuple.hpp>

-
- -
- -Prev Next Macros Headers -
- -

Includes all tuple headers.

- -

A tuple is a fixed size collection of elements.

- -

In the preprocessor library, tuples are represented like macro parameter -lists. Thus an element of a tuple can be any sequence of tokens that -constitutes a single macro parameter.

- -

Examples of tuples:

- -
-(const, volatile)    // 2-tuple
-(*, /, %)            // 3-tuple
-(1, "2", '3', (4,5)) // 4-tuple
-
- -

Tuples can be used for representing structured data.

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/tuple_eat.htm b/doc/reference/tuple_eat.htm deleted file mode 100644 index 4861c02..0000000 --- a/doc/reference/tuple_eat.htm +++ /dev/null @@ -1,55 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/tuple/eat.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_TUPLE_EAT(SIZE_OF_TUPLE)

-

Expands to a macro that eats a tuple of the specified size.

- -

BOOST_PP_TUPLE_EAT() is designed to be used with BOOST_PP_IF() like -BOOST_PP_EMPTY().

- -

For example,

- -
-BOOST_PP_IF(0,BOOST_PP_ENUM_PARAMS,BOOST_PP_TUPLE_EAT(2))(10,P)
-
- -

expands to nothing.

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/tuple_elem.htm b/doc/reference/tuple_elem.htm deleted file mode 100644 index e3996f9..0000000 --- a/doc/reference/tuple_elem.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/tuple/elem.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_TUPLE_ELEM(SIZE_OF_TUPLE,INDEX,TUPLE)

-

Expands to the INDEX:th element of an SIZE_OF_TUPLE-tuple.

- -

For example,

- -
-BOOST_PP_TUPLE_ELEM(2,1,(A,B))
-
- -

expands to B.

- -

See

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/tuple_reverse.htm b/doc/reference/tuple_reverse.htm deleted file mode 100644 index 466057b..0000000 --- a/doc/reference/tuple_reverse.htm +++ /dev/null @@ -1,52 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/tuple/reverse.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_TUPLE_REVERSE(SIZE_OF_TUPLE,TUPLE)

-

Tuple reversal.

- -

For example,

- -
-BOOST_PP_TUPLE_REVERSE(3,(A,B,C))
-
- -

expands to (C,B,A).

- -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/tuple_to_list.htm b/doc/reference/tuple_to_list.htm deleted file mode 100644 index e36a38f..0000000 --- a/doc/reference/tuple_to_list.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/tuple/to_list.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_TUPLE_TO_LIST(SIZE_OF_TUPLE,TUPLE)

-

Converts a tuple to a list.

- -

For example,

- -
-BOOST_PP_TUPLE_TO_LIST(3,(A,B,C))
-
- -

expands to the same as

- -
-BOOST_PP_LIST_CONS(A,
-BOOST_PP_LIST_CONS(B,
-BOOST_PP_LIST_CONS(C,
-BOOST_PP_LIST_NIL)))
-
- -

See

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/reference/while.htm b/doc/reference/while.htm deleted file mode 100644 index 8527beb..0000000 --- a/doc/reference/while.htm +++ /dev/null @@ -1,107 +0,0 @@ - - - - -Boost.Preprocessor - Reference - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Header <boost/preprocessor/while.hpp>

-
- -
- -Prev Next Macros Headers - -
- -

#define BOOST_PP_WHILE(PRED,OP,STATE)

-

Iterates OP(D,STATE) while PRED(D,STATE) is true.

- -

In other words, expands to:

- -
-OP(D, ... OP(D, OP(D,STATE) ) ... )
-
- -

The depth of iteration is determined by PRED(D,STATE).

- -

For example,

- -
-#define PRED(D,STATE) BOOST_PP_LESS_D(D,BOOST_PP_TUPLE_ELEM(2,0,STATE),BOOST_PP_TUPLE_ELEM(2,1,STATE))
-#define OP(D,STATE) (BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2,0,STATE)),BOOST_PP_TUPLE_ELEM(2,1,STATE))
-BOOST_PP_WHILE(PRED,OP,(0,3))
-
- -

expands to:

- -
-(3,3)
-
- -

Legend

-
    -
  • STATE is the current state of iteration. The state is usually a tuple.
  • -
  • PRED is the condition for iteration. It must expand to a decimal - integer literal.
  • -
  • OP is the iterated macro. Note that if the state is a tuple, then - OP(D,STATE) usually expands to a tuple of the same number of elements.
  • -
  • D is the recursion depth and should only be used as a parameter - to other macros using BOOST_PP_WHILE(). Such macros include - BOOST_PP_ADD() and other arithmetic operations. For each macro using - BOOST_PP_WHILE(), there is a version of the macro, distinguished by the - D suffix (e.g. BOOST_PP_ADD_D()), that accepts an additional recursion - depth as the first parameter. This technique is necessary to avoid - recursively expanding the same macro again, which is not permitted by the - C++ preprocessor.
  • -
- -

Automatic recursion?

- -

BOOST_PP_WHILE() currently does not implement automatic recursion. The reason -for this is that it would lead to very poor performance. The automatic recursion -technique takes O(N) steps just to find out that the Nth recursion should be used. -This would dramatically effect the time complexity of macros using automatic -recursion.

- -

Note

-
    -
  • The value of the D parameter may exceed BOOST_PP_LIMIT_MAG.
  • -
  • Using BOOST_PP_WHILE() is a bit tricky. This is due to the C++ - preprocessor limitations. It is recommended to take a look at the - implementations of the various PREPROCESSOR library primitives - such as BOOST_PP_ADD() for additional examples.
  • -
- -

Example

- - -
- -Prev Next Macros Headers -
- -

Revised

- -

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/doc/tutorial.htm b/doc/tutorial.htm deleted file mode 100644 index c803cbd..0000000 --- a/doc/tutorial.htm +++ /dev/null @@ -1,478 +0,0 @@ - - - - -Boost.Preprocessor - Tutorial - - - - - - - -
-

C++ Boost

-
-

Boost.Preprocessor

-

Tutorial

-
-
- -

Contents

-
-
Motivation
-
Preprocessor Metaprogramming Techniques -
-
Use a Local Macro to avoid small scale repetition
-
Use BOOST_PP_EMPTY as an unused parameter in Local - Macro instantiations
-
Use BOOST_PP_CAT instead of ## when necessary
-
Use BOOST_PP_STRINGIZE instead of # whenever necessary
-
Avoid O(N) repetition on lists in general
-
Use a Conditional Define to enable user configuration of code repetition
-
Use Token Look-Up Function to eliminate categorical repetition
-
Use BOOST_PP_REPEAT to avoid O(N*N) repetition
-
Use BOOST_PP_IF to implement special case for the first element
-
Use arithmetic, logical and comparison operations when necessary
-
-
-
- -
- -

Motivation

- -

The C++ function and template parameter lists are special syntactic constructs - and it is impossible to directly manipulate or generate them using C++ constructs. - This leads to unnecessary code repetition.

-

Consider the implementation of the is_function<> metafunction in Boost. The - implementation uses an overloaded is_function_tester() function that is used - for testing if a type is convertible to pointer to a function. Because of the - special treatment of parameter lists, it is not possible to directly match a - function with an arbitrary parameter list. Instead, the is_function_tester() - must be overloaded for every distinct number of parameters that is to be supported. - Example:

- -
template <class R>
-yes_type is_function_tester(R (*)());
-template <class R, class A0>
-yes_type is_function_tester(R (*)(A0));
-template <class R, class A0, A1>
-yes_type is_function_tester(R (*)(A0, A1));
-template <class R, class A0, A1, A2>
-yes_type is_function_tester(R (*)(A0, A1, A2));
-
-// ...
-
- -

The need for this kind of repetition occurs particularly frequently while implementing - generic components or metaprogramming facilities, but the need also manifests - itself in many far simpler situations.

- -

Typical solutions

- -

Typically the repetition is done manually. Manual code repetition is highly - unproductive, but sometimes more readable to the untrained eye.

-

Another solution is to write an external program for generating the repeated - code or use some other extra linquistic means such as a smart editor. Unfortunately, - using external code generators has many disadvantages:

-
    -
  • writing the generator takes time (this could be helped by using a standard - generator)
  • -
  • it is no longer productive to manipulate C++ code directly
  • -
  • invoking the generator may be difficult
  • -
  • automating the invocation of the generator can be difficult in certain environments - (automatic invocation is desirable for active libraries)
  • -
  • porting and distributing the generator may be difficult or simply takes - precious time
  • -
-

What about the preprocessor?

-

Because C++ comes with a preprocessor, one would assume that it would support - these kind of needs directly. Using the preprocessor in this case is highly - desirable because:

-
    -
  • preprocessor is highly portable
  • -
  • preprocessor is automatically invoked as part of the compiling process
  • -
  • preprocessor metacode can be directly embedded into the C++ source code
  • -
  • Compilers generally allow to view or output the preprocessed code, which - can be used for debugging or to copy-paste the generated code.
  • -
-

Most unfortunately, the preprocessor is a very low level preprocessor that - specifically does not support repetition or recursive macros. Library support - is needed!

-

For detailed information on the capabilities and limitations of the preprocessor, - please refer to the C++ standard [Std].

-

The motivation example revisited

-

Using the primitives of the PREPROCESSOR library, the is_function_tester()s - could be implemented like this:

- -
#define IS_FUNCTION_TESTER(N,_)\
-  template<class R BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS(N, class A)>\
-  yes_type is_function_tester(R (*)(BOOST_PP_ENUM_PARAMS(N,A)));
-
-BOOST_PP_REPEAT(BOOST_PP_INC(MAX_IS_FUNCTION_TESTER_PARAMS),IS_FUNCTION_TESTER,_)
-#undef IS_FUNCTION_TESTER
-
- -

In order to change the maximum number of function parameters supported, you - now simply change the MAX_IS_FUNCTION_TESTER_PARAMS definition and recompile.

-
- -

Preprocessor Metaprogramming Techniques

-

The preprocessor metaprogramming techniques are presented in example format. -

-
-

EXAMPLE: - Use a Local Macro to avoid small scale repetition

- -
#define BOOST_PP_DEF(OP)   \
-  template<class T, int n> \
-  vec<T,n>&                \
-    operator OP##=         \
-    ( vec<T,n>&            \
-        lhs                \
-    , const vec<T,n>&      \
-        rhs                \
-    )                      \
-  { for (int i=0; i<n; ++i)\
-      lhs(i) OP##= rhs(i); \
-    return lhs;            \
-  }
-
-BOOST_PP_DEF(+)
-BOOST_PP_DEF(-)
-BOOST_PP_DEF(*)
-BOOST_PP_DEF(/)
-#undef BOOST_PP_DEF
-
- -

TIP: It is usually okay to use a standard macro name like BOOST_PP_DEF - for this kind of code, because the macro is both defined and undefined in the - immediate site of its use.

-

TIP: It is easier to verify proper use of -the line continuation operator when they are aligned.

-

NOTES: You can extend this example by defining more and different kinds - of operators. Before doing so, consider using the Algebraic Categories technique - introduced in [Barton] or a Layered Architecture (see for instance - [Czarnecki]). However, at some point you must type the operator tokens - *, /, +, -, ..., because it is impossible to generate them using templates. - The resulting Categorical Repetition of tokens can be eliminated by using preprocessor - metaprogramming.

-
-

EXAMPLE: - Use BOOST_PP_EMPTY as an unused parameter in Local Macro instantiations

- -
#define BOOST_PP_DEF(CV)  \
-  template<class base>    \
-  CV() typename implement_subscript_using_begin_subscript<base>::value_type&\
-    implement_subscript_using_begin_subscript<base>::operator[]\
-    ( index_type          \
-        i                 \
-    ) CV()                \
-{ return base::begin()[i];\
-}
-
-BOOST_PP_DEF(BOOST_PP_EMPTY)
-BOOST_PP_DEF(const BOOST_PP_EMPTY)
-#undef BOOST_PP_DEF
-
- -

HOW: BOOST_PP_EMPTY() expands to nothing and can be used as - an unused parameter.

-

NOTE: BOOST_PP_EMPTY without the () never gets expanded. The - () is necessary to invoke a function-like macro.

-CAVEAT: You can not safely use concatenation while using BOOST_PP_EMPTY(). -

TIP: Occasionally one or two lines are -considerably longer than the rest. It can often save some work to not align all -of the line continuation operators without making the code too unreadable.

-

TIP: Use syntax highlighting on preprocessor metaprogramming macro and - parameter identifiers such as

-
    -
  • BOOST_PP_DEF,
  • -
  • BOOST_PP_EMPTY,
  • -
  • BOOST_PP_REPEAT,
  • -
  • OP,
  • -
  • CV,
  • -
  • ...
  • -
-

It can greatly improve readability.

-
-

EXAMPLE: Use BOOST_PP_CAT instead of ## when necessary

- -
#define STATIC_ASSERT(EXPR)\
-  enum\
-  { BOOST_PP_CAT(static_check_,__LINE__) = (EXPR) ? 1 : -1\
-  };\
-  typedef char\
-    BOOST_PP_CAT(static_assert_,__LINE__)\
-    [ BOOST_PP_CAT(static_check_,__LINE__)\
-    ]
-
-// ...
-
-STATIC_ASSERT(sizeof(int) <= sizeof(long));
-
- -

WHY: Macro expansion proceeds recursively in "layers". Token pasting - prevents the preprocessor from performing macro expansion, therefore it - is often necessary to delay token concatenation.

-
-

EXAMPLE: Use BOOST_PP_STRINGIZE instead of # whenever necessary

- -
#define NOTE(STR)\
-  message(__FILE__ "(" BOOST_PP_STRINGIZE(__LINE__) ") : " STR)
-
-// ...
-
-#pragma NOTE("TBD!")
-
- -

WHY: Macro expansion proceeds recursively in "layers". Stringization - prevents the preprocessor from performing macro expansion, therefore it is often - necessary to delay stringization.

-
-

EXAMPLE: - Use:

-
    -
  • BOOST_PP_ENUM_PARAMS,
  • -
  • BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT,
  • -
  • BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS,
  • -
  • BOOST_PP_ENUM_SHIFTED_PARAMS, or
  • -
  • BOOST_PP_REPEAT, and
  • -
  • BOOST_PP_COMMA_IF
  • -
-

to avoid O(N) repetition on lists in general

- -
struct make_type_list_end;
-
-template
-< BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT
-  ( MAKE_TYPE_LIST_MAX_LENGTH
-  , class T
-  , make_type_list_end
-  )
->
-struct make_type_list
-{
-private:
-  enum
-  { end = is_same<T0,make_type_list_end>::value
-  };
-
-public:
-  typedef typename
-    type_if
-    < end
-    , type_cons_empty
-    , type_cons
-      < T0
-      , typename
-        type_inner_if
-        < end
-        , type_identity<end>
-        , make_type_list
-          < BOOST_PP_ENUM_SHIFTED_PARAMS
-            ( MAKE_TYPE_LIST_MAX_LENGTH
-            , T
-            )
-          >
-        >::type
-      >
-    >::type type;
-};
-
- -

HOW: BOOST_PP_REPEAT uses simulated recursion (pseudo code):

- -
#define BOOST_PP_REPEAT(N,M,P) BOOST_PP_REPEAT##N(M,P)
-#define BOOST_PP_REPEAT0(M,P)
-#define BOOST_PP_REPEAT1(M,P) M(0,P)
-#define BOOST_PP_REPEAT2(M,P) M(0,P) M(1,P)
-#define BOOST_PP_REPEAT3(M,P) BOOST_PP_REPEAT2(M,P) M(2,P)
-#define BOOST_PP_REPEAT4(M,P) BOOST_PP_REPEAT3(M,P) M(3,P)
-// ...
-
- -

BOOST_PP_ENUM_PARAMS variations use BOOST_PP_REPEAT

- -

BOOST_PP_COMMA_IF(I) expands to a comma if I != 0.

- -

BOOST_PP_INC(I) expands essentially to "I+1" and BOOST_PP_DEC(I) - expands essentially to "I-1".

- -
- -

EXAMPLE: Use a Conditional Define to -enable user configuration of code repetition based on need rather than some -"reasonable" upper limit

- -
#ifndef MAKE_TYPE_LIST_MAX_LENGTH
-#define MAKE_TYPE_LIST_MAX_LENGTH 8
-#endif
-
- -

Now the user can configure the make_type_list primitive without modifying library - code.

-
-

EXAMPLE: - Use BOOST_PP_REPEAT and a Token Look-Up Function to eliminate categorical - repetition

- -
// CAVEAT: My compiler is not standard on arithmetic types.
-#define ARITHMETIC_TYPE(I)  ARITHMETIC_TYPE##I
-#define ARITHMETIC_TYPE0    bool
-#define ARITHMETIC_TYPE1    char
-#define ARITHMETIC_TYPE2    signed char
-#define ARITHMETIC_TYPE3    unsigned char
-#define ARITHMETIC_TYPE4    short
-#define ARITHMETIC_TYPE5    unsigned short
-#define ARITHMETIC_TYPE6    int
-#define ARITHMETIC_TYPE7    unsigned int
-#define ARITHMETIC_TYPE8    long
-#define ARITHMETIC_TYPE9    unsigned long
-#define ARITHMETIC_TYPE10   float
-#define ARITHMETIC_TYPE11   double
-#define ARITHMETIC_TYPE12   long double
-#define ARITHMETIC_TYPE_CNT 13
-
-//  ...
-
-#define BOOST_PP_DEF(I,_)\
-catch (ARITHMETIC_TYPE(I) t)\
-{ report_typeid(t);\
-  report_value(t);\
-}
-BOOST_PP_REPEAT
-( ARITHMETIC_TYPE_CNT
-, BOOST_PP_DEF
-, _
-)
-#undef BOOST_PP_DEF
-
-// ...
-
- -

NOTE: The repetition of the above -example can be eliminated using template metaprogramming [Czarnecki] as well. However -categorical repetition of operator tokens can not be completely eliminated by -using template metaprogramming.

-
-

EXAMPLE: - Use BOOST_PP_REPEAT to avoid O(N*N) repetition

- -
#ifndef MAX_VEC_ARG_CNT
-#define MAX_VEC_ARG_CNT 8
-#endif
-
-//  ...
-
-#define ARG_FUN(I,_) BOOST_PP_COMMA_IF(I) T a##I
-#define ASSIGN_FUN(I,_) (*this)[I] = a##I;
-
-#define DEF_VEC_CTOR_FUN(I,_)\
-vec( BOOST_PP_REPEAT(I,ARG_FUN,_) )\
-{ BOOST_PP_REPEAT(I,ASSIGN_FUN,_)\
-}
-
-BOOST_PP_REPEAT
-( BOOST_PP_INC(MAX_VEC_ARG_CNT)
-, DEF_VEC_CTOR_FUN
-, _
-)
-
-#undef ARG_FUN
-#undef ASSIGN_FUN
-#undef DEF_VEC_CTOR_FUN
-
-// ...
-
- -

HOW: BOOST_PP_REPEAT is implemented in a special way to enable -automatic recursion.

- -
- -

EXAMPLE: Use BOOST_PP_IF to implement special case for the first element

- -
#define BOOST_PP_COMMA_IF(C)\
-  BOOST_PP_IF(C,BOOST_PP_COMMA,BOOST_PP_EMPTY)()
-
-BOOST_PP_IF(0,true,false) == false;
-BOOST_PP_IF(1,true,false) == true;
-
- -

BOOST_PP_IF enables convenient generation of lists using BOOST_PP_REPEAT.

- -

NOTE: THEN and ELSE don't have to be macros. However, if at least one - of them is a function-like macro and you want it to be expanded conditionally, - you have to make the other parameter a function-like macro, too. This can often - be done using BOOST_PP_IDENTITY. Consider the following example (by - Aleksey Gurtovoy):

- -
#define NUMBERED_EXPRESSION(I,X)\
-  BOOST_PP_IF                   \
-  ( I                           \
-  , BOOST_PP_IDENTITY(X##I)     \
-  , BOOST_PP_EMPTY              \
-  )()
- -

NOTE: Like in the above implementation of COMMA_IF, the result of IF - is often invoked and not the THEN and ELSE parameters. If the parameters were - invoked, the code would not expand correctly, because the EMPTY parameter would - get expanded to nothing before the IF would be properly expanded.

-

HOW: BOOST_PP_IF is defined for the entire repeat range (pseudo - code):

- -
#define BOOST_PP_IF(C,THEN,ELSE) BOOST_PP_IF##C(THEN,ELSE)
-#define BOOST_PP_IF0(THEN,ELSE) ELSE
-#define BOOST_PP_IF1(THEN,ELSE) THEN
-#define BOOST_PP_IF2(THEN,ELSE) THEN
-// ...
-
- -
- -

EXAMPLE: Use arithmetic, logical and comparison operations when necessary

- -

The PREPROCESSOR library supports saturated arithmetic, logical and -comparison operations on decimal integer literals in the range [0,BOOST_PP_LIMIT_MAG].

- -

Suppose that you want to generate a numbered lists with a special element inserted - at a desired position. For example: E0, E1, S, E2. Consider the following example:

- -
#define SPECIAL_NUMBERED_LIST(N,I,ELEM,SPECIAL)\
-  BOOST_PP_ASSERT_MSG(BOOST_PP_LESS(I,N),BAD PARAMS FOR SPECIAL_NUMBERED_LIST!)\
-  BOOST_PP_ENUM_PARAMS(I,ELEM)\
-  BOOST_PP_COMMA_IF(I) SPECIAL\
-  BOOST_PP_REPEAT(BOOST_PP_SUB(\
-    BOOST_PP_DEC(N),I),SPECIAL_NUMBERED_LIST_HELPER,(ELEM,I))
-#define SPECIAL_NUMBERED_LIST_HELPER(I,ELEM_BASE)\
-  ,\
-  BOOST_PP_CAT\
-  ( BOOST_PP_TUPLE_ELEM(2,0,ELEM_BASE)\
-  , BOOST_PP_ADD\
-    ( I\
-    , BOOST_PP_TUPLE_ELEM(2,1,ELEM_BASE)\
-    )\
-  )
-
-SPECIAL_NUMBERED_LIST(3,0,E,S)
-SPECIAL_NUMBERED_LIST(3,1,E,S)
-SPECIAL_NUMBERED_LIST(3,2,E,S)
-SPECIAL_NUMBERED_LIST(3,3,E,S)
-
- -
-

Revised - - -

-

© Copyright Housemarque Oy 2002

- -

Permission to copy, use, modify, sell and distribute this document is granted -provided this copyright notice appears in all copies. This document is provided -"as is" without express or implied warranty, and with no claim as to its suitability -for any purpose.

- - diff --git a/example/array_arithmetic.c b/example/array_arithmetic.c deleted file mode 100644 index 9f5f3cb..0000000 --- a/example/array_arithmetic.c +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example implements over 2200 functions for 1-dimensional arithmetic - * array manipulation in C. The idea is to use preprocessor data structures, - * lists and tuples, for storing metainformation to be used for generating - * the actual C code. - * - * Who needs templates anyway? :) - * - * Compile with any C compiler with a standards conforming preprocessor. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* Information about C operators. */ - -/* Accessors for the operator datatype. */ -#define OP_SYMBOL(O) BOOST_PP_TUPLE_ELEM(5,0,O) -#define OP_NAME(O) BOOST_PP_TUPLE_ELEM(5,1,O) -#define OP_IS_FLOATING(O) BOOST_PP_TUPLE_ELEM(5,2,O) -#define OP_IS_LOGICAL(O) BOOST_PP_TUPLE_ELEM(5,3,O) -#define OP_IS_SHIFT(O) BOOST_PP_TUPLE_ELEM(5,4,O) - -/* List of applicative unary operators. */ -#define APPLICATIVE_UNARY_OPS\ - BOOST_PP_TUPLE_TO_LIST\ - ( 3\ - , ( ( ! , logical_not , 1 , 1 , 0 )\ - , ( ~ , bitwise_not , 0 , 0 , 0 )\ - , ( - , neg , 1 , 0 , 0 )\ - )\ - ) - -/* List of applicative binary operators. */ -#define APPLICATIVE_BINARY_OPS\ - BOOST_PP_TUPLE_TO_LIST\ - ( 18\ - , ( ( * , mul , 1 , 0 , 0 )\ - , ( / , div , 1 , 0 , 0 )\ - , ( % , mod , 0 , 0 , 0 )\ - , ( + , add , 1 , 0 , 0 )\ - , ( - , sub , 1 , 0 , 0 )\ - , ( << , shift_left , 0 , 0 , 1 )\ - , ( >> , shift_right , 0 , 0 , 1 )\ - , ( < , less , 1 , 1 , 0 )\ - , ( <= , less_equal , 1 , 1 , 0 )\ - , ( >= , greater_equal , 1 , 1 , 0 )\ - , ( > , greater , 1 , 1 , 0 )\ - , ( == , equal , 1 , 1 , 0 )\ - , ( != , not_equal , 1 , 1 , 0 )\ - , ( & , bitwise_and , 0 , 0 , 0 )\ - , ( | , bitwise_or , 0 , 0 , 0 )\ - , ( ^ , bitwise_xor , 0 , 0 , 0 )\ - , ( && , logical_and , 1 , 1 , 0 )\ - , ( || , logical_or , 1 , 1 , 0 )\ - )\ - ) - -/* Information about C built-in types. */ - -/* Accessors for the type datatype. */ -#define TYPE_NAME(T) BOOST_PP_TUPLE_ELEM(4,0,T) -#define TYPE_ABBREVIATION(T) BOOST_PP_TUPLE_ELEM(4,1,T) -#define TYPE_IS_FLOATING(T) BOOST_PP_TUPLE_ELEM(4,2,T) -#define TYPE_RANK(T) BOOST_PP_TUPLE_ELEM(4,3,T) - -/* List of C built-in types. */ -#define BUILTIN_TYPES\ - BOOST_PP_TUPLE_TO_LIST\ - ( 12\ - , ( ( signed char , sc , 0 , 1 )\ - , ( char , ch , 0 , 1 )\ - , ( unsigned char , uc , 0 , 1 )\ - , ( short , ss , 0 , 2 )\ - , ( unsigned short , us , 0 , 2 )\ - , TYPE_INT\ - , ( unsigned , ui , 0 , 4 )\ - , ( long , sl , 0 , 5 )\ - , ( unsigned long , ul , 0 , 6 )\ - , ( float , fl , 1 , 7 )\ - , ( double , db , 1 , 8 )\ - , ( long double , ld , 1 , 9 )\ - )\ - ) - -/* Type int is needed in some type computations. */ -#define TYPE_INT ( int , si , 0 , 3 ) - -/* Type computation macros. */ -#define TYPE_OF_INTEGER_PROMOTION(T) BOOST_PP_IF(BOOST_PP_LESS(TYPE_RANK(T),TYPE_RANK(TYPE_INT)),TYPE_INT,T) -#define TYPE_OF_USUAL_ARITHMETIC_CONVERSION(L,R) TYPE_OF_INTEGER_PROMOTION(BOOST_PP_IF(BOOST_PP_LESS(TYPE_RANK(L),TYPE_RANK(R)),R,L)) -#define TYPE_OF_UNARY_OP(O,T) BOOST_PP_IF(OP_IS_LOGICAL(O),TYPE_INT,TYPE_OF_INTEGER_PROMOTION(T)) -#define TYPE_OF_BINARY_OP(O,L,R) BOOST_PP_IF(OP_IS_LOGICAL(O),TYPE_INT,BOOST_PP_IF(OP_IS_SHIFT(O),TYPE_OF_INTEGER_PROMOTION(L),TYPE_OF_USUAL_ARITHMETIC_CONVERSION(L,R))) -#define IS_VALID_UNARY_OP_AND_TYPE_COMBINATION(O,T) BOOST_PP_IF(TYPE_IS_FLOATING(T),OP_IS_FLOATING(O),1) -#define IS_VALID_BINARY_OP_AND_TYPE_COMBINATION(O,L,R) BOOST_PP_IF(BOOST_PP_OR(TYPE_IS_FLOATING(L),TYPE_IS_FLOATING(R)),OP_IS_FLOATING(O),1) - -/* Generates code for all all unary operators and integral types. */ -#define UNARY_ARRAY_OP(_,OT) BOOST_PP_IF(IS_VALID_UNARY_OP_AND_TYPE_COMBINATION OT,UNARY_ARRAY_OP_CODE,BOOST_PP_TUPLE2_EAT) OT -#define UNARY_ARRAY_OP_CODE(O,T)\ - void BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(4,(array_,OP_NAME(O),_,TYPE_ABBREVIATION(T))))\ - ( const TYPE_NAME(T)* in\ - , TYPE_NAME(TYPE_OF_UNARY_OP(O,T))* out\ - , unsigned n\ - )\ - { do\ - { *out++ = OP_SYMBOL(O) *in++;\ - } while (--n);\ - } - -BOOST_PP_LIST_FOR_EACH_PRODUCT(UNARY_ARRAY_OP,2,(APPLICATIVE_UNARY_OPS,BUILTIN_TYPES)) - -/* Generates code for all binary operators and integral type pairs. */ -#define BINARY_ARRAY_OP(_,OLR) BOOST_PP_IF(IS_VALID_BINARY_OP_AND_TYPE_COMBINATION OLR,BINARY_ARRAY_OP_CODE,BOOST_PP_TUPLE3_EAT) OLR -#define BINARY_ARRAY_OP_CODE(O,L,R)\ - void BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(6,(array_,OP_NAME(O),_,TYPE_ABBREVIATION(L),_,TYPE_ABBREVIATION(R))))\ - ( const TYPE_NAME(L)* lhs_in\ - , const TYPE_NAME(R)* rhs_in\ - , TYPE_NAME(TYPE_OF_BINARY_OP(O,L,R))* out\ - , unsigned n\ - )\ - { do\ - { *out++ = *lhs_in OP_SYMBOL(O) *rhs_in;\ - ++lhs_in;\ - ++rhs_in;\ - } while (--n);\ - } - -BOOST_PP_LIST_FOR_EACH_PRODUCT(BINARY_ARRAY_OP,3,(APPLICATIVE_BINARY_OPS,BUILTIN_TYPES,BUILTIN_TYPES)) diff --git a/example/catch_builtin.cpp b/example/catch_builtin.cpp deleted file mode 100644 index 852c3a1..0000000 --- a/example/catch_builtin.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example demonstrates the usage of lists and BOOST_PP_LIST_FOR_EACH(). */ - -#include -#include -#include -#include - -/* List of built-in types. (Strictly speaking wchar_t should be on the list.) */ -#define BUILTIN_TYPES\ - BOOST_PP_TUPLE_TO_LIST\ - ( 13\ - , ( bool\ - , char\ - , signed char\ - , unsigned char\ - , unsigned short\ - , short\ - , int\ - , unsigned\ - , long\ - , unsigned long\ - , float\ - , double\ - , long double\ - )\ - ) - -/* This is the macro we pass to BOOST_PP_LIST_FOR_EACH(). */ -#define CATCH(R,_,T)\ - catch (T t) { std::cerr << "Caught an " << typeid(t).name() << " = " << t; } - -int main() -{ - try { throw 10; } - BOOST_PP_LIST_FOR_EACH(CATCH,_,BUILTIN_TYPES) - - return 0; -} diff --git a/example/count_down.c b/example/count_down.c deleted file mode 100644 index e9162d0..0000000 --- a/example/count_down.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This is a trivial example of using BOOST_PP_WHILE() that simply - * counts down from N to 0 ultimately expanding to a 0. - */ - -#include -#include - -#define COUNT_DOWN(N) BOOST_PP_WHILE(COUNT_DOWN_C,COUNT_DOWN_F,N) -/* Above is the macro we are implementing using BOOST_PP_WHILE(). */ - -#define COUNT_DOWN_C(D,N) N -/* Above is the condition. It expands to the current N. */ - -#define COUNT_DOWN_F(D,N) BOOST_PP_DEC(N) -/* Above is the iteration macro. It decrements N. */ - -enum { x = COUNT_DOWN(50) }; -/* The above expands to 0. */ diff --git a/example/delay.c b/example/delay.c deleted file mode 100644 index 059ca34..0000000 --- a/example/delay.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include -#include -#include -#include -#include - -/* The time complexity of DELAY(N) is O(pow(2,N)). - * - * Handy when recompiles are too fast to take a coffee break. :) - * - * Template metaprogramming can be used for implementing similar - * delays. Unfortunately template instantiation consumes memory, - * therefore compilers usually fail to fully compile long template - * based delays, because they run out of memory. - * - * On many compilers (e.g. g++, MSVC++), this macro takes only a - * small amount of memory to preprocess. On some compilers (e.g. - * MWCW), however, this macro seems to consume huge amounts of - * memory. - */ - -#ifndef DELAY_MAX -#define DELAY_MAX 14 -#endif - -#define DELAY(N) BOOST_PP_TUPLE_ELEM(2,0,(BOOST_PP_EMPTY,BOOST_PP_WHILE(DELAY_C,BOOST_PP_CAT(DELAY_F,N),BOOST_PP_DEC(N))))() -#define DELAY_C(D,N) N -#define DELAY_F0(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F1(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F2(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F3(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F4(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F5(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F6(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F7(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F8(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F9(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F10(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F11(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F12(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F13(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F14(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F15(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F16(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F17(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F18(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F19(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F20(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F21(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F22(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F23(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F24(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F25(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F26(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F27(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F28(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F29(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F30(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F31(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F32(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F33(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F34(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F35(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F36(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F37(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F38(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F39(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F40(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F41(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F42(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F43(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F44(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F45(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F46(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F47(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F48(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F49(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) -#define DELAY_F50(D,N) BOOST_PP_IF(1,BOOST_PP_DEC(N),BOOST_PP_WHILE##D(DELAY_C,DELAY_F##N,BOOST_PP_DEC(N))) - -DELAY(DELAY_MAX) diff --git a/example/duffs_device.c b/example/duffs_device.c deleted file mode 100644 index e06e490..0000000 --- a/example/duffs_device.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example uses the preprocessor library to implement a generalized - * macro for implementing a Duff's Device. - * - * This example was inspired by an original generalized macro for - * implementing Duff's Device written by Joerg Walter. - */ - -#include -#include -#include - -/* Expands to a Duff's Device. */ -#define DUFFS_DEVICE(UNROLLING_FACTOR,COUNTER_TYPE,N,STATEMENT)\ - do\ - {\ - COUNTER_TYPE duffs_device_initial_cnt = (N);\ - if (duffs_device_initial_cnt > 0)\ - {\ - COUNTER_TYPE duffs_device_running_cnt = (duffs_device_initial_cnt + (UNROLLING_FACTOR-1))/UNROLLING_FACTOR;\ - switch (duffs_device_initial_cnt % UNROLLING_FACTOR)\ - {\ - do\ - {\ - BOOST_PP_REPEAT(UNROLLING_FACTOR,DUFFS_DEVICE_C,(UNROLLING_FACTOR,{STATEMENT}))\ - } while (--duffs_device_running_cnt);\ - }\ - }\ - } while (0) - -#define DUFFS_DEVICE_C(I,UNROLLING_FACTOR_STATEMENT)\ - case (I?BOOST_PP_TUPLE_ELEM(2,0,UNROLLING_FACTOR_STATEMENT)-I:0): BOOST_PP_TUPLE_ELEM(2,1,UNROLLING_FACTOR_STATEMENT); - - -#ifndef UNROLLING_FACTOR -#define UNROLLING_FACTOR 16 -#endif - -#ifndef N -#define N 1000 -#endif - -int main(void) -{ - int i=0; - DUFFS_DEVICE(UNROLLING_FACTOR, int, 0, ++i;); - assert(i == 0); - DUFFS_DEVICE(UNROLLING_FACTOR, int, N, ++i;); - assert(i == N); - - return 0; -} diff --git a/example/is_integral.cpp b/example/is_integral.cpp deleted file mode 100644 index 95541df..0000000 --- a/example/is_integral.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example demonstrates the usage of preprocessor lists for generating C++ code. */ - -#include -#include -#include -#include - -/* List of integral types. (Strictly speaking, wchar_t should be on the list.) */ -#define INTEGRAL_TYPES\ - BOOST_PP_TUPLE_TO_LIST(9,(char, signed char, unsigned char, short, unsigned short, int, unsigned, long, unsigned long)) - -/* List of invokeable cv-qualifiers. */ -#define CV_QUALIFIERS\ - BOOST_PP_TUPLE_TO_LIST(4,(BOOST_PP_EMPTY, const BOOST_PP_EMPTY, volatile BOOST_PP_EMPTY, const volatile BOOST_PP_EMPTY)) - -/* Template for testing whether a type is an integral type. */ -template struct is_integral {enum {value = false};}; - -/* Macro for defining a specialization of is_integral<> template. */ -#define IS_INTEGRAL_SPECIALIZATION(R,L)\ - template<> struct is_integral {enum {value = true};}; - -BOOST_PP_LIST_FOR_EACH_PRODUCT(IS_INTEGRAL_SPECIALIZATION,2,(CV_QUALIFIERS, INTEGRAL_TYPES)) -#undef IS_INTEGRAL_SPECIALIZATION -#undef CV_QUALIFIERS -#undef INTEGRAL_TYPES diff --git a/example/linear_fib.c b/example/linear_fib.c deleted file mode 100644 index bd3d8f3..0000000 --- a/example/linear_fib.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example shows how BOOST_PP_WHILE() can be used for implementing - * macros. - */ - -#include -#include -#include -#include -#include -#include - -/* First consider the following C implementation of Fibonacci. */ - -typedef struct linear_fib_state { int a0, a1, n; } linear_fib_state; - -static int linear_fib_c( linear_fib_state p ) -{ - return p.n; -} - -static linear_fib_state linear_fib_f( linear_fib_state p ) -{ - linear_fib_state r = { p.a1, p.a0 + p.a1, p.n - 1 }; - return r; -} - -static int linear_fib( int n ) -{ - linear_fib_state p = { 0, 1, n }; - - while ( linear_fib_c(p) ) { p = linear_fib_f(p); } - - return p.a0; -} - -/* Then consider the following preprocessor implementation of Fibonacci. */ - -#define LINEAR_FIB(N)\ - LINEAR_FIB_D(0,N) -/* Since the macro is implemented using BOOST_PP_WHILE, the actual - * implementation takes a depth as a parameter so that it can be called - * inside a BOOST_PP_WHILE. The above easy-to-use version simply uses 0 - * as the depth and can not be called inside a BOOST_PP_WHILE. - */ - -#define LINEAR_FIB_D(D,N)\ - BOOST_PP_TUPLE_ELEM(3,0,BOOST_PP_WHILE##D(LINEAR_FIB_C,LINEAR_FIB_F,(0,1,N))) -/* ^^^ ^^^ ^^ ^^ ^^^^^^^ - * #1 #2 #3 #3 #1 - * - * #1) The state is a 3-tuple. After the iteration is finished, the first - * element of the tuple is the result. - * - * #2) The WHILE primitive is "invoked" directly. BOOST_PP_WHILE(D,...) - * can't be used because it would not be expanded by the C++ preprocessor. - * - * #3) ???_C is the condition and ???_F is the iteration macro. - */ - -#define LINEAR_FIB_C(D,P)\ - /* p.n */ BOOST_PP_TUPLE_ELEM(3,2,P) - -#define LINEAR_FIB_F(D,P)\ - (/* p.a1 */ BOOST_PP_TUPLE_ELEM(3,1,P)\ - ,/* p.a0+p.a1*/ BOOST_PP_ADD_D(D,BOOST_PP_TUPLE_ELEM(3,0,P),BOOST_PP_TUPLE_ELEM(3,1,P))\ - /* ^^ ^ \ - * BOOST_PP_ADD() uses BOOST_PP_WHILE(). Therefore we must\ - * pass the recursion depth explicitly to BOOST_PP_ADD_D().\ - */\ - ,/* p.n - 1 */ BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(3,2,P))\ - ) - -int main() -{ - printf("linear_fib(10) = %d\n", linear_fib(10)); - printf("LINEAR_FIB(10) = %d\n", LINEAR_FIB(10)); - - return 0; -} diff --git a/example/note.c b/example/note.c deleted file mode 100644 index e4d34a4..0000000 --- a/example/note.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example shows how BOOST_PP_STRINGIZE() can be used to allow macro - * expansion before stringization. - */ - -#include - -#define NOTE(STR)\ - message(__FILE__ "(" BOOST_PP_STRINGIZE(__LINE__) ") : " STR) - -#pragma NOTE("Hello, World!") diff --git a/example/repeat_2d.c b/example/repeat_2d.c deleted file mode 100644 index ebfd5c7..0000000 --- a/example/repeat_2d.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example implements a generalized macro for 2D repetition using - * the simple repetition primitives of the preprocessor library. - */ - -#include - -/**

Repeats the macro M(X,Y,DATA) for X = [0,W) and Y = [0,H).

- -

In other words, expands to the sequence:

- -
-M(  0,  0,  DATA) M(  1,  0,  DATA) ... M(W-1,  0,  DATA)
-M(  0,  1,  DATA) M(  1,  1,  DATA) ... M(W-1,  1,  DATA)
-      ...            ...      ...       ...
-M(  0,H-1,  DATA) M(  1,H-1,  DATA) ... M(W-1,H-1,  DATA)
-
-*/ -#define REPEAT_2D(W,H,M,DATA)\ - /* Here we can simply use BOOST_PP_REPEAT(), because\ - * it implements automatic recursion.\ - */\ - BOOST_PP_REPEAT\ - ( H\ - , REPEAT_2D_ROW\ - , (W,M,DATA)\ - ) - -#define REPEAT_2D_ROW(Y,WMD)\ - BOOST_PP_REPEAT\ - ( BOOST_PP_TUPLE_ELEM(3,0,WMD)\ - , REPEAT_2D_ELEM\ - , (Y, BOOST_PP_TUPLE_ELEM(3,1,WMD), BOOST_PP_TUPLE_ELEM(3,2,WMD))\ - ) -#define REPEAT_2D_ELEM(X,YMD)\ - BOOST_PP_TUPLE_ELEM(3,1,YMD)\ - ( X\ - , BOOST_PP_TUPLE_ELEM(3,0,YMD)\ - , BOOST_PP_TUPLE_ELEM(3,2,YMD)\ - ) - -#include -#include -#include -#include - -/* Here we use the above macro to generate something. */ -#define ELEM(X,Y,E) BOOST_PP_COMMA_IF(BOOST_PP_OR(X,Y)) BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(5,(E,_,X,_,Y))) - -enum { REPEAT_2D(3,4,ELEM,elem) }; - -/* The above expands to: - * - * enum { elem_0_0, elem_1_0, elem_2_0, - * elem_0_1, elem_1_1, elem_2_1, - * elem_0_2, elem_1_2, elem_2_2, - * elem_0_3, elem_1_3, elem_2_3 }; - */ diff --git a/example/static_assert.c b/example/static_assert.c deleted file mode 100644 index 88d192f..0000000 --- a/example/static_assert.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example shows how BOOST_PP_CAT() can be used to allow macro - * expansion before token concatenation. - */ - -#include - -/* Use of BOOST_PP_CAT() below allows macro expansion of __LINE__. */ -#define STATIC_ASSERT(EXPR)\ - typedef char BOOST_PP_CAT(static_assert_,__LINE__)[ (EXPR) ? 1 : -1 ] - -STATIC_ASSERT(sizeof(int) <= sizeof(long)); - -/* This static assert is broken. The __LINE__ is not expanded as desired. */ -#define BROKEN_STATIC_ASSERT(EXPR)\ - typedef char static_assert_##__LINE__[ (EXPR) ? 1 : -1 ] - -BROKEN_STATIC_ASSERT(sizeof(int) <= sizeof(long)); diff --git a/example/subscript_layer.cpp b/example/subscript_layer.cpp deleted file mode 100644 index 83149fa..0000000 --- a/example/subscript_layer.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2002 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This example shows how BOOST_PP_EMPTY can be used as an unused or - * empty parameter. - */ - -#include - -/* This could be a layer from a generative container library. */ -template -struct subscript_layer : base -{ -#define DEF(CV)\ - CV() typename base::value_type& operator[](typename base::index_type i) CV()\ - { return base::begin()[i]; } - - DEF(BOOST_PP_EMPTY) - DEF(const BOOST_PP_EMPTY) -#undef DEF -}; diff --git a/regression/arithmetic.cpp b/regression/arithmetic.cpp deleted file mode 100644 index 6d3cf31..0000000 --- a/regression/arithmetic.cpp +++ /dev/null @@ -1,63 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include -# include - -// addition - -BEGIN BOOST_PP_ADD(2, 3) == 5 END - -BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), 2) == 6 END -BEGIN BOOST_PP_ADD(2, BOOST_PP_ADD(1, 4)) == 7 END -BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), BOOST_PP_ADD(2, 2)) == 8 END - -// subtraction - -BEGIN BOOST_PP_SUB(11, 0) == 11 END -BEGIN BOOST_PP_SUB(12, 1) == 11 END -BEGIN BOOST_PP_SUB(3, 4) == 0 END - -BEGIN BOOST_PP_SUB(5, BOOST_PP_SUB(3, 2)) == 4 END -BEGIN BOOST_PP_SUB(BOOST_PP_SUB(10, 5), 2) == 3 END -BEGIN BOOST_PP_SUB(BOOST_PP_SUB(7, 3), BOOST_PP_SUB(10, 8)) == 2 END - -// multiplication - -BEGIN BOOST_PP_MUL(0, 1) == 0 END -BEGIN BOOST_PP_MUL(1, 0) == 0 END -BEGIN BOOST_PP_MUL(1, 1) == 1 END -BEGIN BOOST_PP_MUL(4, 3) == 12 END - -BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), 2) == 8 END -BEGIN BOOST_PP_MUL(2, BOOST_PP_MUL(2, 2)) == 8 END -BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), BOOST_PP_MUL(2, 2)) == 16 END - -// division - -BEGIN BOOST_PP_DIV(2, 1) == 2 END -BEGIN BOOST_PP_DIV(0, 5) == 0 END -BEGIN BOOST_PP_DIV(7, 3) == 2 END - -BEGIN BOOST_PP_DIV(BOOST_PP_DIV(4, 2), 2) == 1 END -BEGIN BOOST_PP_DIV(10, BOOST_PP_DIV(10, 2)) == 2 END -BEGIN BOOST_PP_DIV(BOOST_PP_DIV(10, 2), BOOST_PP_DIV(4, 2)) == 2 END - -// modulus - -BEGIN BOOST_PP_MOD(5, 5) == 0 END -BEGIN BOOST_PP_MOD(9, 5) == 4 END -BEGIN BOOST_PP_MOD(7, 4) == 3 END - -BEGIN BOOST_PP_MOD(BOOST_PP_MOD(5, 3), 3) == 2 END -BEGIN BOOST_PP_MOD(5, BOOST_PP_MOD(4, 3)) == 0 END diff --git a/regression/array.cpp b/regression/array.cpp deleted file mode 100644 index a093c76..0000000 --- a/regression/array.cpp +++ /dev/null @@ -1,26 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include - -# define ARRAY (3, (0, 1, 2)) - -// element access - -BEGIN BOOST_PP_ARRAY_ELEM(1, ARRAY) == 1 END -BEGIN BOOST_PP_ARRAY_ELEM(2, (5, (0, 1, 2, 3, 4))) == 2 END - -// size - -BEGIN BOOST_PP_ARRAY_SIZE(ARRAY) == 3 END -BEGIN BOOST_PP_ARRAY_SIZE((5, (0, 1, 2, 3, 4))) == 5 END diff --git a/regression/comparison.cpp b/regression/comparison.cpp deleted file mode 100644 index a8cd002..0000000 --- a/regression/comparison.cpp +++ /dev/null @@ -1,46 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include - -// equality - -BEGIN BOOST_PP_EQUAL(2, 0) == 0 END -BEGIN BOOST_PP_EQUAL(2, 2) == 1 END - -// inequality - -BEGIN BOOST_PP_NOT_EQUAL(2, 0) == 1 END -BEGIN BOOST_PP_NOT_EQUAL(2, 2) == 0 END - -// less - -BEGIN BOOST_PP_LESS(2, 1) == 0 END -BEGIN BOOST_PP_LESS(1, 2) == 1 END - -// less_equal - -BEGIN BOOST_PP_LESS_EQUAL(2, 1) == 0 END -BEGIN BOOST_PP_LESS_EQUAL(1, 2) == 1 END -BEGIN BOOST_PP_LESS_EQUAL(2, 2) == 1 END - -// greater - -BEGIN BOOST_PP_GREATER(2, 1) == 1 END -BEGIN BOOST_PP_GREATER(1, 2) == 0 END - -// greater_equal - -BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END -BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END -BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END diff --git a/regression/control.cpp b/regression/control.cpp deleted file mode 100644 index ffa54a8..0000000 --- a/regression/control.cpp +++ /dev/null @@ -1,41 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include -# include -# include - -# define TR(x) 1 - -BEGIN BOOST_PP_EXPR_IIF(0, TR)(0) == 0 END -BEGIN BOOST_PP_EXPR_IIF(1, TR)(0) == 1 END - -BEGIN BOOST_PP_EXPR_IF(3, TR)(0) == 1 END -BEGIN BOOST_PP_EXPR_IF(0, TR)(0) == 0 END - -BEGIN BOOST_PP_IIF(0, 1, 0) == 0 END -BEGIN BOOST_PP_IIF(1, 1, 0) == 1 END - -BEGIN BOOST_PP_IF(0, 1, 0) == 0 END -BEGIN BOOST_PP_IF(9, 1, 0) == 1 END - -# define PRED(d, state) state -# define OP_1(d, state) BOOST_PP_DEC(state) - -BEGIN BOOST_PP_WHILE(PRED, OP_1, 50) == 0 END - -# define OP_2(d, state) BOOST_PP_DEC(BOOST_PP_ADD(BOOST_PP_WHILE(PRED, OP_1, state), state)) -# define OP_3(d, state) BOOST_PP_DEC(BOOST_PP_ADD_D(d, BOOST_PP_WHILE_ ## d(PRED, OP_1, state), state)) - -BEGIN BOOST_PP_WHILE(PRED, OP_3, 10) == 0 END -BEGIN BOOST_PP_WHILE(PRED, OP_3, 10) == 0 END diff --git a/regression/debug.cpp b/regression/debug.cpp deleted file mode 100644 index d4094bf..0000000 --- a/regression/debug.cpp +++ /dev/null @@ -1,22 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include - -BEGIN sizeof(BOOST_PP_ASSERT_MSG(0, "text") "") / sizeof(char) != 1 END -BEGIN sizeof(BOOST_PP_ASSERT_MSG(1, "text") "") / sizeof(char) == 1 END - -BOOST_PP_ASSERT(10) - -# line BOOST_PP_LINE(100, __FILE__) -BEGIN __LINE__ == 100 END diff --git a/regression/facilities.cpp b/regression/facilities.cpp deleted file mode 100644 index 9a8f3e6..0000000 --- a/regression/facilities.cpp +++ /dev/null @@ -1,29 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include -# include - -BEGIN BOOST_PP_APPLY(BOOST_PP_NIL) 0 == 0 END -BEGIN BOOST_PP_APPLY((0)) == 0 END - -BEGIN BOOST_PP_APPLY((BOOST_PP_EMPTY))() 0 == 0 END - -# define MACRO(x, y, z) 1 -# define ARGS (1, 2, 3) - -BEGIN BOOST_PP_EXPAND(MACRO ARGS) == 1 END - -BEGIN BOOST_PP_IDENTITY(1)() == 1 END - -BEGIN BOOST_PP_CAT(BOOST_PP_INTERCEPT, 2) 1 == 1 END diff --git a/regression/iteration.cpp b/regression/iteration.cpp deleted file mode 100644 index d7d7949..0000000 --- a/regression/iteration.cpp +++ /dev/null @@ -1,34 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# if !BOOST_PP_IS_SELFISH -# -# include -# -# define TEST(n) BEGIN n == n END -# -# define BOOST_PP_LOCAL_MACRO(n) TEST(n) -# define BOOST_PP_LOCAL_LIMITS (1, 5) -# include BOOST_PP_LOCAL_ITERATE() -# -# define BOOST_PP_LOCAL_MACRO(n) TEST(n) -# define BOOST_PP_LOCAL_LIMITS (5, 1) -# include BOOST_PP_LOCAL_ITERATE() -# -# define BOOST_PP_INDIRECT_SELF -# include BOOST_PP_INCLUDE_SELF() -# -# else - -BEGIN BOOST_PP_IS_SELFISH == 1 END - -# endif diff --git a/regression/iteration.h b/regression/iteration.h deleted file mode 100644 index 072ab7e..0000000 --- a/regression/iteration.h +++ /dev/null @@ -1,61 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# if !BOOST_PP_IS_ITERATING -# -# include -# include -# include -# -# define NO_FLAGS -# -# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, )) -# include BOOST_PP_ITERATE() -# -# undef NO_FLAGS -# -# define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, , 0x0001)) -# include BOOST_PP_ITERATE() -# -# define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, , 0x0002)) -# include BOOST_PP_ITERATE() -# -# elif defined NO_FLAGS - -struct BOOST_PP_CAT(X, BOOST_PP_ITERATION()) { - BEGIN - BOOST_PP_ITERATION() >= BOOST_PP_ITERATION_START() && - BOOST_PP_ITERATION() <= BOOST_PP_ITERATION_FINISH() - END -}; - -# elif BOOST_PP_ITERATION_DEPTH() == 1 \ - && BOOST_PP_ITERATION_FLAGS() == 0x0001 - -struct BOOST_PP_CAT(Y, BOOST_PP_ITERATION()) { }; - -# elif BOOST_PP_ITERATION_DEPTH() == 1 \ - && BOOST_PP_ITERATION_FLAGS() == 0x0002 - -# define BOOST_PP_ITERATION_PARAMS_2 (3, (1, BOOST_PP_ITERATION(), )) -# include BOOST_PP_ITERATE() - -# elif BOOST_PP_ITERATION_DEPTH() == 2 \ - && BOOST_PP_FRAME_FLAGS(1) == 0x0002 - -struct BOOST_PP_CAT(Z, BOOST_PP_CAT(BOOST_PP_ITERATION(), BOOST_PP_RELATIVE_ITERATION(1))) { }; - -# else -# -# error should not get here! -# -# endif diff --git a/regression/list.cpp b/regression/list.cpp deleted file mode 100644 index 7e84f5a..0000000 --- a/regression/list.cpp +++ /dev/null @@ -1,55 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include -# include -# include -# include -# include - -# define LIST (4, (1, (5, (2, BOOST_PP_NIL)))) - -# define REVERSAL(d, x, y) BOOST_PP_SUB_D(d, y, x) - -BEGIN BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_SUB_D, 22, LIST) == 10 END -BEGIN BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_ADD_D, 0, LIST) == 12 END -BEGIN BOOST_PP_LIST_FOLD_RIGHT(REVERSAL, 0, LIST) == 4 END - -BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REVERSE(LIST)) == 2514 END - -BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REST_N(2, LIST)) == 52 END -BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FIRST_N(2, LIST)) == 41 END - -BEGIN BOOST_PP_LIST_AT(LIST, 2) == 5 END -BEGIN BOOST_PP_LIST_SIZE(LIST) == 4 END - -BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D, 2, LIST)) == 6374 END -BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(BOOST_PP_LIST_REST(LIST), LIST)) == 1524152 END - -# define F1(r, state, x) + x + state -BEGIN BOOST_PP_LIST_FOR_EACH(F1, 1, LIST) == 16 END - -BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_LIST_TO_TUPLE(LIST)) == 2 END - -BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FILTER(BOOST_PP_LESS_D, 3, LIST)) == 45 END - -# define F2(r, x) + BOOST_PP_TUPLE_ELEM(2, 0, x) + 2 - BOOST_PP_TUPLE_ELEM(2, 1, x) -BEGIN BOOST_PP_LIST_FOR_EACH_PRODUCT(F2, 2, ( (1, (0, BOOST_PP_NIL)), (2, (3, BOOST_PP_NIL)) )) == 0 END - -# define L1 (0, (x, BOOST_PP_NIL)) -# define L2 (a, (1, (b, (2, BOOST_PP_NIL)))) -# define L3 (c, (3, (d, BOOST_PP_NIL))) - -# define LL (L1, (L2, (L3, BOOST_PP_NIL))) - -BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_APPEND_D, BOOST_PP_NIL, LL)) == 0x0a1b2c3d END diff --git a/regression/logical.cpp b/regression/logical.cpp deleted file mode 100644 index 178aa1b..0000000 --- a/regression/logical.cpp +++ /dev/null @@ -1,37 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include - -BEGIN BOOST_PP_NOT(0) == 1 END -BEGIN BOOST_PP_NOT(2) == 0 END - -BEGIN BOOST_PP_AND(0, 0) == 0 END -BEGIN BOOST_PP_AND(0, 3) == 0 END -BEGIN BOOST_PP_AND(4, 0) == 0 END -BEGIN BOOST_PP_AND(5, 6) == 1 END - -BEGIN BOOST_PP_OR(0, 0) == 0 END -BEGIN BOOST_PP_OR(0, 7) == 1 END -BEGIN BOOST_PP_OR(8, 0) == 1 END -BEGIN BOOST_PP_OR(9, 1) == 1 END - -BEGIN BOOST_PP_XOR(0, 0) == 0 END -BEGIN BOOST_PP_XOR(0, 2) == 1 END -BEGIN BOOST_PP_XOR(3, 0) == 1 END -BEGIN BOOST_PP_XOR(4, 5) == 0 END - -BEGIN BOOST_PP_NOR(0, 0) == 1 END -BEGIN BOOST_PP_NOR(0, 6) == 0 END -BEGIN BOOST_PP_NOR(7, 0) == 0 END -BEGIN BOOST_PP_NOR(8, 9) == 0 END diff --git a/regression/repetition.cpp b/regression/repetition.cpp deleted file mode 100644 index cde9a4c..0000000 --- a/regression/repetition.cpp +++ /dev/null @@ -1,51 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include -# include -# include -# include -# include -# include - -# define MAX 10 - -# define NTH(z, n, data) data ## n - -int add(BOOST_PP_ENUM_PARAMS(MAX, int x)) { - return BOOST_PP_REPEAT(MAX, NTH, + x); -} - -const int r = add(BOOST_PP_ENUM_PARAMS(MAX, 1 BOOST_PP_INTERCEPT)); - -# define CONSTANT(z, n, text) BOOST_PP_CAT(text, n) = n -const int BOOST_PP_ENUM(MAX, CONSTANT, default_param_); - -# define TEST(n) \ - void BOOST_PP_CAT(test_enum_params, n)(BOOST_PP_ENUM_PARAMS(n, int x)); \ - void BOOST_PP_CAT(test_enum_params_with_a_default, n)(BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(n, int x, 0)); \ - void BOOST_PP_CAT(test_enum_params_with_defaults, n)(BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(n, int x, default_param_)); - -TEST(0) -TEST(MAX) - -template struct no_rescan; - -# define F1(z, n, p) p n -BEGIN 1 + (4+5+6) BOOST_PP_REPEAT_FROM_TO(4, 7, F1, -) END - -# define PRED(r, state) BOOST_PP_NOT_EQUAL(state, BOOST_PP_INC(MAX)) -# define OP(r, state) BOOST_PP_INC(state) -# define MACRO(r, state) BOOST_PP_COMMA_IF(BOOST_PP_NOT_EQUAL(state, 1)) BOOST_PP_CAT(class T, state) - -template struct for_test; diff --git a/regression/selection.cpp b/regression/selection.cpp deleted file mode 100644 index 3491f72..0000000 --- a/regression/selection.cpp +++ /dev/null @@ -1,22 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include - -BEGIN BOOST_PP_MAX(2, 2) == 2 END -BEGIN BOOST_PP_MAX(2, 1) == 2 END -BEGIN BOOST_PP_MAX(1, 2) == 2 END - -BEGIN BOOST_PP_MIN(2, 2) == 2 END -BEGIN BOOST_PP_MIN(2, 1) == 1 END -BEGIN BOOST_PP_MIN(1, 2) == 1 END diff --git a/regression/slot.cpp b/regression/slot.cpp deleted file mode 100644 index 24047a0..0000000 --- a/regression/slot.cpp +++ /dev/null @@ -1,28 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include - -# define X() 4 - -# define BOOST_PP_VALUE 1 + 2 + 3 + X() -# include BOOST_PP_ASSIGN_SLOT(1) - -# undef X - -BEGIN BOOST_PP_SLOT(1) == 10 END - -# define BOOST_PP_VALUE BOOST_PP_SLOT(1) * BOOST_PP_SLOT(1) -# include BOOST_PP_ASSIGN_SLOT(1) - -BEGIN BOOST_PP_SLOT(1) == 100 END diff --git a/regression/test.h b/regression/test.h deleted file mode 100644 index 71bb657..0000000 --- a/regression/test.h +++ /dev/null @@ -1,33 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Permission to copy, use, modify, sell and distribute this software is -# * granted provided this copyright notice appears in all copies. This -# * software is provided "as is" without express or implied warranty, and -# * with no claim as to its suitability for any purpose. -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_LIBS_PREPROCESSOR_REGRESSION_TEST_H -# define BOOST_LIBS_PREPROCESSOR_REGRESSION_TEST_H -# -# include -# -# define BEGIN typedef int BOOST_PP_CAT(test_, __LINE__)[(( -# define END )==1) ? 1 : -1]; - -#include - -namespace std { } -using namespace std; - -int main(void) { - printf("pass " __TIME__); - return 0; -} - -# endif diff --git a/regression/tuple.cpp b/regression/tuple.cpp deleted file mode 100644 index 9e1dc8d..0000000 --- a/regression/tuple.cpp +++ /dev/null @@ -1,25 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * -# * modify, sell, and distribute this software is granted provided * -# * this copyright notice appears in all copies. This software is * -# * provided "as is" without express or implied warranty, and with * -# * no claim at to its suitability for any purpose. * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# include -# include - -# define TUPLE (0, 1, 2, 3, 4, 5) - -BEGIN BOOST_PP_TUPLE_ELEM(6, 3, TUPLE) == 3 END -BEGIN BOOST_PP_TUPLE_ELEM(6, 5, TUPLE) == 5 END - -# define CALC(x) BOOST_PP_TUPLE_ELEM(3, 0, x) BOOST_PP_TUPLE_ELEM(3, 1, x) BOOST_PP_TUPLE_ELEM(3, 2, x) -# define T2 (+3, /2, +6) - -BEGIN CALC(T2) == 7 END -BEGIN CALC(BOOST_PP_TUPLE_REVERSE(3, T2)) == 6 END diff --git a/test/arithmetic_test.cpp b/test/arithmetic_test.cpp deleted file mode 100644 index 3e9f520..0000000 --- a/test/arithmetic_test.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 2001 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include -#include -#include -#include -#include - -#include - -/* *** */ - -TEST_B BOOST_PP_ADD(2,3) == 5 TEST_E -TEST_B BOOST_PP_ADD(21,BOOST_PP_SUB(BOOST_PP_LIMIT_MAG,20)) == BOOST_PP_LIMIT_MAG TEST_E - -TEST_B BOOST_PP_SUB(11,0) == 11 TEST_E -TEST_B BOOST_PP_SUB(12,1) == 11 TEST_E -TEST_B BOOST_PP_SUB(3,4) == 0 TEST_E - -TEST_B BOOST_PP_MUL(0,1) == 0 TEST_E -TEST_B BOOST_PP_MUL(1,0) == 0 TEST_E -TEST_B BOOST_PP_MUL(1,1) == 1 TEST_E -TEST_B BOOST_PP_MUL(4,3) == 12 TEST_E - -TEST_B BOOST_PP_DIV(2,1) == 2 TEST_E -TEST_B BOOST_PP_DIV(0,5) == 0 TEST_E -TEST_B BOOST_PP_DIV(7,3) == 2 TEST_E - -TEST_B BOOST_PP_EQUAL(1,0) == 0 TEST_E -TEST_B BOOST_PP_EQUAL(10,10) == 1 TEST_E - -TEST_B BOOST_PP_NOT_EQUAL(3,4) == 1 TEST_E -TEST_B BOOST_PP_NOT_EQUAL(7,7) == 0 TEST_E - -TEST_B BOOST_PP_LESS_EQUAL(6,7) == 1 TEST_E -TEST_B BOOST_PP_LESS_EQUAL(8,1) == 0 TEST_E -TEST_B BOOST_PP_LESS_EQUAL(5,5) == 1 TEST_E - -TEST_B BOOST_PP_GREATER_EQUAL(6,7) == 0 TEST_E -TEST_B BOOST_PP_GREATER_EQUAL(10,10) == 1 TEST_E -TEST_B BOOST_PP_GREATER_EQUAL(8,1) == 1 TEST_E - -TEST_B BOOST_PP_LESS(2,1) == 0 TEST_E -TEST_B BOOST_PP_LESS(1,1) == 0 TEST_E -TEST_B BOOST_PP_LESS(1,2) == 1 TEST_E - -TEST_B BOOST_PP_GREATER(2,1) == 1 TEST_E -TEST_B BOOST_PP_GREATER(1,1) == 0 TEST_E -TEST_B BOOST_PP_GREATER(1,2) == 0 TEST_E - -TEST_B BOOST_PP_MIN(1,0) == 0 TEST_E -TEST_B BOOST_PP_MIN(1,2) == 1 TEST_E - -TEST_B BOOST_PP_MAX(3,2) == 3 TEST_E -TEST_B BOOST_PP_MAX(4,5) == 5 TEST_E - -TEST_B BOOST_PP_MOD(5,5) == 0 TEST_E -TEST_B BOOST_PP_MOD(9,5) == 4 TEST_E -TEST_B BOOST_PP_MOD(7,4) == 3 TEST_E diff --git a/test/for_test.cpp b/test/for_test.cpp deleted file mode 100644 index 7f6f265..0000000 --- a/test/for_test.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2001 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include -#include - -#include - -/* *** */ - -#ifndef FOR_TEST_MAX -#define FOR_TEST_MAX 50 -#endif - -#define C(D,X) X -#define F(D,X) BOOST_PP_DEC(X) -#define I(D,X) -X - -TEST_B (FOR_TEST_MAX*(FOR_TEST_MAX+1)/2)+1 BOOST_PP_FOR(FOR_TEST_MAX,C,F,I) TEST_E diff --git a/test/list_test.cpp b/test/list_test.cpp deleted file mode 100644 index 39ca282..0000000 --- a/test/list_test.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2001 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include -#include -#include -#include -#include - -#include - -/* *** */ - -#define TEST_LIST BOOST_PP_TUPLE_TO_LIST(4,(4,1,5,2)) - -TEST_B BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_SUB_D,22,TEST_LIST) == 10 TEST_E -TEST_B BOOST_PP_LIST_CAT(BOOST_PP_LIST_REVERSE(TEST_LIST)) == 2514 TEST_E -TEST_B BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_SUB_D,TEST_LIST,0) == 4 TEST_E - -TEST_B BOOST_PP_LIST_CAT(BOOST_PP_LIST_REST_N(2,TEST_LIST)) == 52 TEST_E -TEST_B BOOST_PP_LIST_CAT(BOOST_PP_LIST_FIRST_N(2,TEST_LIST)) == 41 TEST_E - -TEST_B BOOST_PP_LIST_AT(TEST_LIST,2) == 5 TEST_E - -TEST_B BOOST_PP_LIST_SIZE(TEST_LIST) == 4 TEST_E - -TEST_B BOOST_PP_LIST_CAT(BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D,2,TEST_LIST)) == 6374 TEST_E - -TEST_B BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(BOOST_PP_LIST_REST(TEST_LIST),TEST_LIST)) == 1524152 TEST_E - -#define F(I,P,X) +X+P -TEST_B BOOST_PP_LIST_FOR_EACH(F,1,TEST_LIST) == 16 TEST_E -#undef F - -TEST_B BOOST_PP_TUPLE_ELEM(4,3,BOOST_PP_LIST_TO_TUPLE(TEST_LIST)) == 2 TEST_E - -TEST_B BOOST_PP_LIST_CAT(BOOST_PP_LIST_FILTER(BOOST_PP_LESS_D,3,TEST_LIST)) == 45 TEST_E - -#define F(R,X) +BOOST_PP_TUPLE_ELEM(2,0,X)+2-BOOST_PP_TUPLE_ELEM(2,1,X) -TEST_B BOOST_PP_LIST_FOR_EACH_PRODUCT(F,2,(BOOST_PP_TUPLE_TO_LIST(2,(1,0)),BOOST_PP_TUPLE_TO_LIST(2,(2,3)))) == 0 TEST_E -#undef F - -TEST_B BOOST_PP_LIST_CAT(BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_D, - BOOST_PP_TUPLE_TO_LIST(3, - (BOOST_PP_TUPLE_TO_LIST(2,(0,x)), - BOOST_PP_TUPLE_TO_LIST(4,(A,1,B,2)), - BOOST_PP_TUPLE_TO_LIST(3,(C,3,D)))), - BOOST_PP_LIST_NIL)) == 0xA1B2C3D TEST_E diff --git a/test/logical_test.cpp b/test/logical_test.cpp deleted file mode 100644 index 16ec842..0000000 --- a/test/logical_test.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2001 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include - -#include - -/* *** */ - -TEST_B BOOST_PP_NOT(0) == 1 TEST_E -TEST_B BOOST_PP_NOT(2) == 0 TEST_E - -TEST_B BOOST_PP_AND(0,0) == 0 TEST_E -TEST_B BOOST_PP_AND(0,3) == 0 TEST_E -TEST_B BOOST_PP_AND(4,0) == 0 TEST_E -TEST_B BOOST_PP_AND(5,6) == 1 TEST_E - -TEST_B BOOST_PP_OR(0,0) == 0 TEST_E -TEST_B BOOST_PP_OR(0,7) == 1 TEST_E -TEST_B BOOST_PP_OR(8,0) == 1 TEST_E -TEST_B BOOST_PP_OR(9,1) == 1 TEST_E - -TEST_B BOOST_PP_XOR(0,0) == 0 TEST_E -TEST_B BOOST_PP_XOR(0,2) == 1 TEST_E -TEST_B BOOST_PP_XOR(3,0) == 1 TEST_E -TEST_B BOOST_PP_XOR(4,5) == 0 TEST_E - -TEST_B BOOST_PP_NOR(0,0) == 1 TEST_E -TEST_B BOOST_PP_NOR(0,6) == 0 TEST_E -TEST_B BOOST_PP_NOR(7,0) == 0 TEST_E -TEST_B BOOST_PP_NOR(8,9) == 0 TEST_E diff --git a/test/preprocessor_test.cpp b/test/preprocessor_test.cpp deleted file mode 100644 index 5225a67..0000000 --- a/test/preprocessor_test.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2001 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -/* *** */ - -struct Container -{ -#define BOOST_PP_DEF(CV)\ - CV() int& operator[](int i) CV(); - - BOOST_PP_DEF(BOOST_PP_EMPTY) - BOOST_PP_DEF(BOOST_PP_IDENTITY(const)) - BOOST_PP_DEF(BOOST_PP_IDENTITY(volatile)) - BOOST_PP_DEF(BOOST_PP_IDENTITY(const volatile)) - -#undef BOOST_PP_DEF -}; - -/* *** */ - -TEST_B BOOST_PP_IF(BOOST_PP_IF(1,1,1),true,false) && - BOOST_PP_IF(BOOST_PP_IF(0,0,0),false,true) TEST_E - -/* *** */ - -TEST_B BOOST_PP_EXPR_IF(1,1) TEST_E - -/* *** */ - -TEST_B BOOST_PP_CAT(BOOST_PP_IF(1,tru,fals), e) TEST_E - -/* *** */ - -char stringize_test[3] = BOOST_PP_STRINGIZE(__LINE__); - -/* *** */ - -TEST_B BOOST_PP_TUPLE_ELEM(2,0,(1,0)) TEST_E diff --git a/test/repeat_2nd_test.cpp b/test/repeat_2nd_test.cpp deleted file mode 100644 index 2a0f90c..0000000 --- a/test/repeat_2nd_test.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 2001 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include -#include -#include -#include -#include - -/* *** */ - -/* RATIONALE: - * - BOOST_PP_REPEAT, BOOST_PP_ENUM, BOOST_PP_REPEAT_FROM_TO and must work - * recursively together. - * - BOOST_PP_REPEAT is already tested with - * BOOST_PP_ENUM_PARAMS. - * - The tested repeat count should exceed imaginable usage. - * - Testing the generation of is_function_helper()s upto 40 arguments should - * be sufficient in this case. Many compilers may fail the repetition tests - * (at least with higher counts). However, the primary purpose of the - * repetition primitives is to enable configurability with reasonable - * defaults, and not necessarily "the most impressive repetition". - * - ENUM_SHIFTED_PARAMS must be tested so that the shifted range is shown to - * be correct. - */ - -#ifndef IS_FUNCTION_HELPER_TEST_MAX -#define IS_FUNCTION_HELPER_TEST_MAX 40 -#endif - -typedef char yes_type; - -#define IS_FUNCTION_HELPER(I,A)\ - template\ - \ - yes_type is_function_helper(\ - P0 (*)(BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(I),P))); - -BOOST_PP_REPEAT(BOOST_PP_INC(IS_FUNCTION_HELPER_TEST_MAX),IS_FUNCTION_HELPER,A) - -#undef IS_FUNCTION_HELPER - -/* *** */ - -#define ELEM(_,X) X -#define COL(I,_) - BOOST_PP_TUPLE_ELEM(2,0,(BOOST_PP_ENUM(2,ELEM,I))) -#define ROW(I,_) BOOST_PP_REPEAT(I,COL,_) - -TEST_B 0 == (1 +1+2 +1+2+3) BOOST_PP_REPEAT_FROM_TO(2,5,ROW,_) TEST_E - -#undef ROW -#undef COL -#undef ELEM diff --git a/test/repeat_test.cpp b/test/repeat_test.cpp deleted file mode 100644 index 6de24f2..0000000 --- a/test/repeat_test.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 2001 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include -#include -#include -#include -#include -#include - -/* *** */ - -/* RATIONALE: - * - All forms of ENUM_PARAMS must be tested with 0 and n, where n is - * sufficiently large to exceed imaginable usage like. 50 should be - * suffient in this case. - */ - -#ifndef ENUM_PARAMS_TEST_MAX -#define ENUM_PARAMS_TEST_MAX 50 -#endif - -#define CONSTANT(I,A) BOOST_PP_CAT(A,I) = I -const int BOOST_PP_ENUM(ENUM_PARAMS_TEST_MAX, CONSTANT, default_param_); -#undef CONSTANT - -#define TEST_ENUM_PARAMS(N)\ - void BOOST_PP_CAT(test_enum_params,N)(\ - BOOST_PP_ENUM_PARAMS(N, int x));\ - void BOOST_PP_CAT(test_enum_params_with_a_default,N)(\ - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(N, int x, 0));\ - void BOOST_PP_CAT(test_enum_params_with_defaults,N)(\ - BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(N, int x, default_param_)); - -TEST_ENUM_PARAMS(0) -TEST_ENUM_PARAMS(ENUM_PARAMS_TEST_MAX) - -#undef TEST_ENUM_PARAMS - -template -struct no_rescan; - -/* *** */ - -#define F(I,P) P I -TEST_B 1 + (4+5+6) BOOST_PP_REPEAT_FROM_TO(4,7,F,-) TEST_E -#undef F diff --git a/test/test.hpp b/test/test.hpp deleted file mode 100644 index 11b5796..0000000 --- a/test/test.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef BOOST_LIBS_PREPROCESSOR_TEST_TEST_HPP -#define BOOST_LIBS_PREPROCESSOR_TEST_TEST_HPP - -/* Copyright (C) 2001 - * Housemarque Oy - * http://www.housemarque.com - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -#include - -/* The TEST macro has been broken into two pieces to avoid - * double expansion: - * 1. as a macro argument - * 2. rescan - */ -#define TEST_B typedef int BOOST_PP_CAT(test_,__LINE__)[(( -#define TEST_E )==1) ? 1 : -1]; - -#define MACRO(X) X -#define MACRO_ARGS(X) (X) -#endif diff --git a/test/trivial_test.cpp b/test/trivial_test.cpp deleted file mode 100644 index ee0c374..0000000 --- a/test/trivial_test.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 2002 Vesa Karvonen - * - * Permission to copy, use, modify, sell and distribute this software is - * granted provided this copyright notice appears in all copies. This - * software is provided "as is" without express or implied warranty, and - * with no claim as to its suitability for any purpose. - * - * See http://www.boost.org for most recent version. - */ - -/* This simply attempts to include all preprocessor library headers. */ -#include From 4bb690a8196eec6acab032dcfeccab1f6e41b887 Mon Sep 17 00:00:00 2001 From: Paul Mensonides Date: Thu, 3 Oct 2002 22:13:37 +0000 Subject: [PATCH 4/5] lib cleanup [SVN r15693] --- doc/acknowledgements.html | 55 ++ doc/bibliography.html | 55 ++ doc/blank.html | 9 + doc/contents.html | 20 + doc/data.html | 15 + doc/data/arrays.html | 43 + doc/data/lists.html | 36 + doc/data/tuples.html | 32 + doc/examples.html | 18 + doc/examples/out.cpp | 16 - doc/headers.html | 165 ++++ doc/headers/arithmetic.hpp.html | 25 + doc/headers/array.hpp.html | 21 + doc/headers/assert_msg.hpp.html | 20 + doc/headers/cat.hpp.html | 19 + doc/headers/comma.hpp.html | 20 + doc/headers/comma_if.hpp.html | 20 + doc/headers/comparison.hpp.html | 24 + doc/headers/control.hpp.html | 24 + doc/headers/debug.hpp.html | 20 + doc/headers/dec.hpp.html | 20 + doc/headers/empty.hpp.html | 20 + doc/headers/enum.hpp.html | 20 + doc/headers/enum_params.hpp.html | 20 + .../enum_params_with_a_default.hpp.html | 20 + .../enum_params_with_defaults.hpp.html | 20 + doc/headers/enum_shifted.hpp.html | 20 + doc/headers/enum_shifted_params.hpp.html | 20 + doc/headers/expand.hpp.html | 20 + doc/headers/expr_if.hpp.html | 20 + doc/headers/facilities.hpp.html | 23 + doc/headers/for.hpp.html | 20 + doc/headers/identity.hpp.html | 20 + doc/headers/if.hpp.html | 20 + doc/headers/inc.hpp.html | 20 + doc/headers/iterate.hpp.html | 20 + doc/headers/iteration.hpp.html | 21 + doc/headers/library.hpp.html | 15 + doc/headers/limits.hpp.html | 20 + doc/headers/list.hpp.html | 35 + doc/headers/logical.hpp.html | 29 + doc/headers/max.hpp.html | 20 + doc/headers/min.hpp.html | 20 + doc/headers/preprocessor.hpp.html | 15 + doc/headers/punctuation.hpp.html | 22 + doc/headers/repeat.hpp.html | 20 + doc/headers/repeat_2nd.hpp.html | 20 + doc/headers/repeat_3rd.hpp.html | 20 + doc/headers/repeat_from_to.hpp.html | 20 + doc/headers/repeat_from_to_2nd.hpp.html | 20 + doc/headers/repeat_from_to_3rd.hpp.html | 20 + doc/headers/repetition.hpp.html | 33 + doc/headers/selection.hpp.html | 20 + doc/headers/slot.hpp.html | 19 + doc/headers/stringize.hpp.html | 19 + doc/headers/tuple.hpp.html | 23 + doc/headers/while.hpp.html | 20 + doc/index.html | 13 + doc/miscellanea.html | 15 + doc/ref.html | 217 +++++ doc/ref/add.html | 57 ++ doc/ref/add_d.html | 79 ++ doc/ref/and.html | 53 + doc/ref/apply.html | 53 + doc/ref/array_data.html | 38 + doc/ref/array_elem.html | 40 + doc/ref/array_size.html | 34 + doc/ref/assert.html | 103 ++ doc/ref/assert_msg.html | 55 ++ doc/ref/assign_slot.html | 50 + doc/ref/bitand.html | 54 + doc/ref/bitnor.html | 54 + doc/ref/bitor.html | 54 + doc/ref/bitxor.html | 55 ++ doc/ref/bool.html | 43 + doc/ref/cat.html | 46 + doc/ref/comma.html | 32 + doc/ref/comma_if.html | 49 + doc/ref/compl.html | 47 + doc/ref/config_extended_line_info.html | 33 + doc/ref/dec.html | 43 + doc/ref/deduce_d.html | 71 ++ doc/ref/deduce_r.html | 37 + doc/ref/deduce_z.html | 37 + doc/ref/div.html | 52 + doc/ref/div_d.html | 74 ++ doc/ref/empty.html | 36 + doc/ref/enum.html | 69 ++ doc/ref/enum_binary_params.html | 65 ++ doc/ref/enum_binary_params_z.html | 82 ++ doc/ref/enum_params.html | 58 ++ doc/ref/enum_params_with_a_default.html | 72 ++ doc/ref/enum_params_with_defaults.html | 73 ++ doc/ref/enum_params_z.html | 71 ++ doc/ref/enum_shifted.html | 71 ++ doc/ref/enum_shifted_params.html | 62 ++ doc/ref/enum_shifted_params_z.html | 68 ++ doc/ref/enum_shifted_z.html | 82 ++ doc/ref/enum_trailing.html | 72 ++ doc/ref/enum_trailing_binary_params.html | 72 ++ doc/ref/enum_trailing_binary_params_z.html | 56 ++ doc/ref/enum_trailing_params.html | 55 ++ doc/ref/enum_trailing_params_z.html | 70 ++ doc/ref/enum_trailing_z.html | 85 ++ doc/ref/enum_z.html | 85 ++ doc/ref/equal.html | 53 + doc/ref/equal_d.html | 58 ++ doc/ref/expand.html | 56 ++ doc/ref/expr_if.html | 59 ++ doc/ref/expr_iif.html | 56 ++ doc/ref/filename_x.html | 41 + doc/ref/for.html | 94 ++ doc/ref/for_r.html | 144 +++ doc/ref/frame_finish.html | 31 + doc/ref/frame_flags.html | 31 + doc/ref/frame_iteration.html | 62 ++ doc/ref/frame_start.html | 31 + doc/ref/greater.html | 54 + doc/ref/greater_d.html | 58 ++ doc/ref/greater_equal.html | 54 + doc/ref/greater_equal_d.html | 58 ++ doc/ref/identity.html | 46 + doc/ref/if.html | 52 + doc/ref/iif.html | 54 + doc/ref/inc.html | 43 + doc/ref/include_self.html | 90 ++ doc/ref/indirect_self.html | 34 + doc/ref/intercept.html | 40 + doc/ref/is_iterating.html | 27 + doc/ref/is_selfish.html | 27 + doc/ref/iterate.html | 72 ++ doc/ref/iteration.html | 44 + doc/ref/iteration_depth.html | 57 ++ doc/ref/iteration_finish.html | 46 + doc/ref/iteration_flags.html | 57 ++ doc/ref/iteration_limits.html | 48 + doc/ref/iteration_params_x.html | 66 ++ doc/ref/iteration_start.html | 46 + doc/ref/less.html | 54 + doc/ref/less_d.html | 59 ++ doc/ref/less_equal.html | 54 + doc/ref/less_equal_d.html | 59 ++ doc/ref/limit_dim.html | 24 + doc/ref/limit_for.html | 23 + doc/ref/limit_iteration.html | 23 + doc/ref/limit_iteration_dim.html | 23 + doc/ref/limit_mag.html | 23 + doc/ref/limit_repeat.html | 23 + doc/ref/limit_slot_count.html | 23 + doc/ref/limit_slot_sig.html | 23 + doc/ref/limit_tuple.html | 23 + doc/ref/limit_while.html | 23 + doc/ref/line.html | 101 ++ doc/ref/list_append.html | 58 ++ doc/ref/list_append_d.html | 85 ++ doc/ref/list_at.html | 50 + doc/ref/list_at_d.html | 52 + doc/ref/list_cat.html | 47 + doc/ref/list_cat_d.html | 56 ++ doc/ref/list_cons.html | 76 ++ doc/ref/list_enum.html | 51 + doc/ref/list_enum_r.html | 58 ++ doc/ref/list_filter.html | 65 ++ doc/ref/list_filter_d.html | 75 ++ doc/ref/list_first.html | 51 + doc/ref/list_first_n.html | 51 + doc/ref/list_first_n_d.html | 60 ++ doc/ref/list_fold_left.html | 64 ++ doc/ref/list_fold_left_2nd.html | 64 ++ doc/ref/list_fold_left_2nd_d.html | 75 ++ doc/ref/list_fold_left_d.html | 70 ++ doc/ref/list_fold_left_d_old.html | 75 ++ doc/ref/list_fold_right.html | 68 ++ doc/ref/list_fold_right_2nd.html | 68 ++ doc/ref/list_fold_right_2nd_d.html | 75 ++ doc/ref/list_fold_right_d.html | 70 ++ doc/ref/list_fold_right_d_old.html | 79 ++ doc/ref/list_for_each.html | 64 ++ doc/ref/list_for_each_i.html | 64 ++ doc/ref/list_for_each_i_r.html | 71 ++ doc/ref/list_for_each_product.html | 75 ++ doc/ref/list_for_each_product_r.html | 107 ++ doc/ref/list_for_each_r.html | 70 ++ doc/ref/list_is_cons.html | 40 + doc/ref/list_is_nil.html | 40 + doc/ref/list_nil.html | 57 ++ doc/ref/list_rest.html | 51 + doc/ref/list_rest_n.html | 51 + doc/ref/list_rest_n_d.html | 60 ++ doc/ref/list_reverse.html | 44 + doc/ref/list_reverse_d.html | 52 + doc/ref/list_size.html | 44 + doc/ref/list_size_d.html | 56 ++ doc/ref/list_to_tuple.html | 51 + doc/ref/list_to_tuple_r.html | 58 ++ doc/ref/list_transform.html | 67 ++ doc/ref/list_transform_d.html | 75 ++ doc/ref/local_iterate.html | 51 + doc/ref/local_limits.html | 69 ++ doc/ref/local_macro.html | 53 + doc/ref/lparen.html | 41 + doc/ref/lparen_if.html | 50 + doc/ref/max.html | 53 + doc/ref/max_d.html | 59 ++ doc/ref/min.html | 53 + doc/ref/min_d.html | 59 ++ doc/ref/mod.html | 52 + doc/ref/mod_d.html | 64 ++ doc/ref/mul.html | 57 ++ doc/ref/mul_d.html | 80 ++ doc/ref/nil.html | 30 + doc/ref/nor.html | 53 + doc/ref/not.html | 48 + doc/ref/not_equal.html | 53 + doc/ref/not_equal_d.html | 58 ++ doc/ref/or.html | 53 + doc/ref/relative_finish.html | 35 + doc/ref/relative_flags.html | 35 + doc/ref/relative_iteration.html | 90 ++ doc/ref/relative_start.html | 35 + doc/ref/repeat.html | 69 ++ doc/ref/repeat_1st.html | 71 ++ doc/ref/repeat_2nd.html | 71 ++ doc/ref/repeat_3rd.html | 71 ++ doc/ref/repeat_from_to.html | 91 ++ doc/ref/repeat_from_to_1st.html | 80 ++ doc/ref/repeat_from_to_2nd.html | 80 ++ doc/ref/repeat_from_to_3rd.html | 80 ++ doc/ref/repeat_from_to_d.html | 72 ++ doc/ref/repeat_from_to_d_z.html | 73 ++ doc/ref/repeat_from_to_z.html | 94 ++ doc/ref/repeat_z.html | 89 ++ doc/ref/rparen.html | 42 + doc/ref/rparen_if.html | 50 + doc/ref/slot.html | 49 + doc/ref/stringize.html | 39 + doc/ref/sub.html | 52 + doc/ref/sub_d.html | 74 ++ doc/ref/tuple_eat.html | 47 + doc/ref/tuple_elem.html | 54 + doc/ref/tuple_rem.html | 41 + doc/ref/tuple_reverse.html | 45 + doc/ref/tuple_to_list.html | 46 + doc/ref/value.html | 26 + doc/ref/while.html | 105 ++ doc/ref/while_d.html | 118 +++ doc/ref/xor.html | 53 + doc/resources.html | 15 + doc/styles.css | 79 ++ doc/syntax.html | 215 ++++ doc/terms.html | 14 + doc/terms/evaluated.html | 16 + doc/terms/named_external.html | 14 + doc/top.html | 27 + doc/topics.html | 20 + doc/topics/evaluated_slots.html | 146 +++ doc/topics/file_iteration.html | 921 ++++++++++++++++++ doc/topics/incompatible.html | 129 +++ doc/topics/local_iteration.html | 149 +++ doc/topics/motivation.html | 100 ++ doc/topics/problems.html | 124 +++ doc/topics/reentrancy.html | 253 +++++ doc/topics/techniques.html | 336 +++++++ 263 files changed, 14965 insertions(+), 16 deletions(-) create mode 100644 doc/acknowledgements.html create mode 100644 doc/bibliography.html create mode 100644 doc/blank.html create mode 100644 doc/contents.html create mode 100644 doc/data.html create mode 100644 doc/data/arrays.html create mode 100644 doc/data/lists.html create mode 100644 doc/data/tuples.html create mode 100644 doc/examples.html delete mode 100644 doc/examples/out.cpp create mode 100644 doc/headers.html create mode 100644 doc/headers/arithmetic.hpp.html create mode 100644 doc/headers/array.hpp.html create mode 100644 doc/headers/assert_msg.hpp.html create mode 100644 doc/headers/cat.hpp.html create mode 100644 doc/headers/comma.hpp.html create mode 100644 doc/headers/comma_if.hpp.html create mode 100644 doc/headers/comparison.hpp.html create mode 100644 doc/headers/control.hpp.html create mode 100644 doc/headers/debug.hpp.html create mode 100644 doc/headers/dec.hpp.html create mode 100644 doc/headers/empty.hpp.html create mode 100644 doc/headers/enum.hpp.html create mode 100644 doc/headers/enum_params.hpp.html create mode 100644 doc/headers/enum_params_with_a_default.hpp.html create mode 100644 doc/headers/enum_params_with_defaults.hpp.html create mode 100644 doc/headers/enum_shifted.hpp.html create mode 100644 doc/headers/enum_shifted_params.hpp.html create mode 100644 doc/headers/expand.hpp.html create mode 100644 doc/headers/expr_if.hpp.html create mode 100644 doc/headers/facilities.hpp.html create mode 100644 doc/headers/for.hpp.html create mode 100644 doc/headers/identity.hpp.html create mode 100644 doc/headers/if.hpp.html create mode 100644 doc/headers/inc.hpp.html create mode 100644 doc/headers/iterate.hpp.html create mode 100644 doc/headers/iteration.hpp.html create mode 100644 doc/headers/library.hpp.html create mode 100644 doc/headers/limits.hpp.html create mode 100644 doc/headers/list.hpp.html create mode 100644 doc/headers/logical.hpp.html create mode 100644 doc/headers/max.hpp.html create mode 100644 doc/headers/min.hpp.html create mode 100644 doc/headers/preprocessor.hpp.html create mode 100644 doc/headers/punctuation.hpp.html create mode 100644 doc/headers/repeat.hpp.html create mode 100644 doc/headers/repeat_2nd.hpp.html create mode 100644 doc/headers/repeat_3rd.hpp.html create mode 100644 doc/headers/repeat_from_to.hpp.html create mode 100644 doc/headers/repeat_from_to_2nd.hpp.html create mode 100644 doc/headers/repeat_from_to_3rd.hpp.html create mode 100644 doc/headers/repetition.hpp.html create mode 100644 doc/headers/selection.hpp.html create mode 100644 doc/headers/slot.hpp.html create mode 100644 doc/headers/stringize.hpp.html create mode 100644 doc/headers/tuple.hpp.html create mode 100644 doc/headers/while.hpp.html create mode 100644 doc/index.html create mode 100644 doc/miscellanea.html create mode 100644 doc/ref.html create mode 100644 doc/ref/add.html create mode 100644 doc/ref/add_d.html create mode 100644 doc/ref/and.html create mode 100644 doc/ref/apply.html create mode 100644 doc/ref/array_data.html create mode 100644 doc/ref/array_elem.html create mode 100644 doc/ref/array_size.html create mode 100644 doc/ref/assert.html create mode 100644 doc/ref/assert_msg.html create mode 100644 doc/ref/assign_slot.html create mode 100644 doc/ref/bitand.html create mode 100644 doc/ref/bitnor.html create mode 100644 doc/ref/bitor.html create mode 100644 doc/ref/bitxor.html create mode 100644 doc/ref/bool.html create mode 100644 doc/ref/cat.html create mode 100644 doc/ref/comma.html create mode 100644 doc/ref/comma_if.html create mode 100644 doc/ref/compl.html create mode 100644 doc/ref/config_extended_line_info.html create mode 100644 doc/ref/dec.html create mode 100644 doc/ref/deduce_d.html create mode 100644 doc/ref/deduce_r.html create mode 100644 doc/ref/deduce_z.html create mode 100644 doc/ref/div.html create mode 100644 doc/ref/div_d.html create mode 100644 doc/ref/empty.html create mode 100644 doc/ref/enum.html create mode 100644 doc/ref/enum_binary_params.html create mode 100644 doc/ref/enum_binary_params_z.html create mode 100644 doc/ref/enum_params.html create mode 100644 doc/ref/enum_params_with_a_default.html create mode 100644 doc/ref/enum_params_with_defaults.html create mode 100644 doc/ref/enum_params_z.html create mode 100644 doc/ref/enum_shifted.html create mode 100644 doc/ref/enum_shifted_params.html create mode 100644 doc/ref/enum_shifted_params_z.html create mode 100644 doc/ref/enum_shifted_z.html create mode 100644 doc/ref/enum_trailing.html create mode 100644 doc/ref/enum_trailing_binary_params.html create mode 100644 doc/ref/enum_trailing_binary_params_z.html create mode 100644 doc/ref/enum_trailing_params.html create mode 100644 doc/ref/enum_trailing_params_z.html create mode 100644 doc/ref/enum_trailing_z.html create mode 100644 doc/ref/enum_z.html create mode 100644 doc/ref/equal.html create mode 100644 doc/ref/equal_d.html create mode 100644 doc/ref/expand.html create mode 100644 doc/ref/expr_if.html create mode 100644 doc/ref/expr_iif.html create mode 100644 doc/ref/filename_x.html create mode 100644 doc/ref/for.html create mode 100644 doc/ref/for_r.html create mode 100644 doc/ref/frame_finish.html create mode 100644 doc/ref/frame_flags.html create mode 100644 doc/ref/frame_iteration.html create mode 100644 doc/ref/frame_start.html create mode 100644 doc/ref/greater.html create mode 100644 doc/ref/greater_d.html create mode 100644 doc/ref/greater_equal.html create mode 100644 doc/ref/greater_equal_d.html create mode 100644 doc/ref/identity.html create mode 100644 doc/ref/if.html create mode 100644 doc/ref/iif.html create mode 100644 doc/ref/inc.html create mode 100644 doc/ref/include_self.html create mode 100644 doc/ref/indirect_self.html create mode 100644 doc/ref/intercept.html create mode 100644 doc/ref/is_iterating.html create mode 100644 doc/ref/is_selfish.html create mode 100644 doc/ref/iterate.html create mode 100644 doc/ref/iteration.html create mode 100644 doc/ref/iteration_depth.html create mode 100644 doc/ref/iteration_finish.html create mode 100644 doc/ref/iteration_flags.html create mode 100644 doc/ref/iteration_limits.html create mode 100644 doc/ref/iteration_params_x.html create mode 100644 doc/ref/iteration_start.html create mode 100644 doc/ref/less.html create mode 100644 doc/ref/less_d.html create mode 100644 doc/ref/less_equal.html create mode 100644 doc/ref/less_equal_d.html create mode 100644 doc/ref/limit_dim.html create mode 100644 doc/ref/limit_for.html create mode 100644 doc/ref/limit_iteration.html create mode 100644 doc/ref/limit_iteration_dim.html create mode 100644 doc/ref/limit_mag.html create mode 100644 doc/ref/limit_repeat.html create mode 100644 doc/ref/limit_slot_count.html create mode 100644 doc/ref/limit_slot_sig.html create mode 100644 doc/ref/limit_tuple.html create mode 100644 doc/ref/limit_while.html create mode 100644 doc/ref/line.html create mode 100644 doc/ref/list_append.html create mode 100644 doc/ref/list_append_d.html create mode 100644 doc/ref/list_at.html create mode 100644 doc/ref/list_at_d.html create mode 100644 doc/ref/list_cat.html create mode 100644 doc/ref/list_cat_d.html create mode 100644 doc/ref/list_cons.html create mode 100644 doc/ref/list_enum.html create mode 100644 doc/ref/list_enum_r.html create mode 100644 doc/ref/list_filter.html create mode 100644 doc/ref/list_filter_d.html create mode 100644 doc/ref/list_first.html create mode 100644 doc/ref/list_first_n.html create mode 100644 doc/ref/list_first_n_d.html create mode 100644 doc/ref/list_fold_left.html create mode 100644 doc/ref/list_fold_left_2nd.html create mode 100644 doc/ref/list_fold_left_2nd_d.html create mode 100644 doc/ref/list_fold_left_d.html create mode 100644 doc/ref/list_fold_left_d_old.html create mode 100644 doc/ref/list_fold_right.html create mode 100644 doc/ref/list_fold_right_2nd.html create mode 100644 doc/ref/list_fold_right_2nd_d.html create mode 100644 doc/ref/list_fold_right_d.html create mode 100644 doc/ref/list_fold_right_d_old.html create mode 100644 doc/ref/list_for_each.html create mode 100644 doc/ref/list_for_each_i.html create mode 100644 doc/ref/list_for_each_i_r.html create mode 100644 doc/ref/list_for_each_product.html create mode 100644 doc/ref/list_for_each_product_r.html create mode 100644 doc/ref/list_for_each_r.html create mode 100644 doc/ref/list_is_cons.html create mode 100644 doc/ref/list_is_nil.html create mode 100644 doc/ref/list_nil.html create mode 100644 doc/ref/list_rest.html create mode 100644 doc/ref/list_rest_n.html create mode 100644 doc/ref/list_rest_n_d.html create mode 100644 doc/ref/list_reverse.html create mode 100644 doc/ref/list_reverse_d.html create mode 100644 doc/ref/list_size.html create mode 100644 doc/ref/list_size_d.html create mode 100644 doc/ref/list_to_tuple.html create mode 100644 doc/ref/list_to_tuple_r.html create mode 100644 doc/ref/list_transform.html create mode 100644 doc/ref/list_transform_d.html create mode 100644 doc/ref/local_iterate.html create mode 100644 doc/ref/local_limits.html create mode 100644 doc/ref/local_macro.html create mode 100644 doc/ref/lparen.html create mode 100644 doc/ref/lparen_if.html create mode 100644 doc/ref/max.html create mode 100644 doc/ref/max_d.html create mode 100644 doc/ref/min.html create mode 100644 doc/ref/min_d.html create mode 100644 doc/ref/mod.html create mode 100644 doc/ref/mod_d.html create mode 100644 doc/ref/mul.html create mode 100644 doc/ref/mul_d.html create mode 100644 doc/ref/nil.html create mode 100644 doc/ref/nor.html create mode 100644 doc/ref/not.html create mode 100644 doc/ref/not_equal.html create mode 100644 doc/ref/not_equal_d.html create mode 100644 doc/ref/or.html create mode 100644 doc/ref/relative_finish.html create mode 100644 doc/ref/relative_flags.html create mode 100644 doc/ref/relative_iteration.html create mode 100644 doc/ref/relative_start.html create mode 100644 doc/ref/repeat.html create mode 100644 doc/ref/repeat_1st.html create mode 100644 doc/ref/repeat_2nd.html create mode 100644 doc/ref/repeat_3rd.html create mode 100644 doc/ref/repeat_from_to.html create mode 100644 doc/ref/repeat_from_to_1st.html create mode 100644 doc/ref/repeat_from_to_2nd.html create mode 100644 doc/ref/repeat_from_to_3rd.html create mode 100644 doc/ref/repeat_from_to_d.html create mode 100644 doc/ref/repeat_from_to_d_z.html create mode 100644 doc/ref/repeat_from_to_z.html create mode 100644 doc/ref/repeat_z.html create mode 100644 doc/ref/rparen.html create mode 100644 doc/ref/rparen_if.html create mode 100644 doc/ref/slot.html create mode 100644 doc/ref/stringize.html create mode 100644 doc/ref/sub.html create mode 100644 doc/ref/sub_d.html create mode 100644 doc/ref/tuple_eat.html create mode 100644 doc/ref/tuple_elem.html create mode 100644 doc/ref/tuple_rem.html create mode 100644 doc/ref/tuple_reverse.html create mode 100644 doc/ref/tuple_to_list.html create mode 100644 doc/ref/value.html create mode 100644 doc/ref/while.html create mode 100644 doc/ref/while_d.html create mode 100644 doc/ref/xor.html create mode 100644 doc/resources.html create mode 100644 doc/styles.css create mode 100644 doc/syntax.html create mode 100644 doc/terms.html create mode 100644 doc/terms/evaluated.html create mode 100644 doc/terms/named_external.html create mode 100644 doc/top.html create mode 100644 doc/topics.html create mode 100644 doc/topics/evaluated_slots.html create mode 100644 doc/topics/file_iteration.html create mode 100644 doc/topics/incompatible.html create mode 100644 doc/topics/local_iteration.html create mode 100644 doc/topics/motivation.html create mode 100644 doc/topics/problems.html create mode 100644 doc/topics/reentrancy.html create mode 100644 doc/topics/techniques.html diff --git a/doc/acknowledgements.html b/doc/acknowledgements.html new file mode 100644 index 0000000..e9ef104 --- /dev/null +++ b/doc/acknowledgements.html @@ -0,0 +1,55 @@ + + + acknowledgements.html + + + +

Acknowledgements

+
+ The following are a few acknowledgements of people that contributed to + or were instrumental in the development of the library by Vesa Karnoven and myself. +
+

Vesa Karvonen

+
+ The original idea of passing two extra parameters to REPEAT, which makes it possible to create preprocessor code on top of it, + was due to Aleksey Gurtovoy.  + The invokeable IDENTITY macro was invented by him.  + He also suggested the name for the library.  + Many thanks to Aleksey for his insights! +
+
+ Thanks to everyone who participated in the review:  David Abrahams, Beman Dawes, Ronald Garcia, Douglas Gregor, Aleksey Gurtovoy, Jeremy Siek, and Daryle Walker. +
+
+ Thanks to Chris Little and Mat Marcus for providing help with MWCW. +
+
+ The original automatic recursion technique, which makes many of the library + primitives easier to use, was invented by Paul Mensonides. +
+
+ The PREPROCESSOR library has been developed by Vesa Karvonen. +
+

Paul Mensonides

+
+ Thanks to Vesa Karvonen for the original conception of the library.  + His work, his help, and his opinions are all much appreciated. +
+
+ Thanks also to David Abrahams for his observations and continued support. +
+
+ The help of several other Boost developers is also greatly appreciated.  + In particular, thanks to Aleksey Gurtovoy for his suggestions and to Ralf W. Grosse-Kunstleve for providing + access to several compilers for testing. +
+
+
+ © Copyright Housemarque Oy 2002 +
+
+Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies.  +This document is provided "as is" without express or implied warranty and with no claim as to its suitability for any purpose. +
+ + diff --git a/doc/bibliography.html b/doc/bibliography.html new file mode 100644 index 0000000..02eab34 --- /dev/null +++ b/doc/bibliography.html @@ -0,0 +1,55 @@ + + + bibliography.html + + + +

Bibliography

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[Stroustrup]Stroustrup:  The Design and Evolution of C++, ISBN 0201543303
[Czarnecki]Czarnecki, Eisenecker:  Generative Programming, ISBN 0201309777
[Barton]Barton, Nackman:  Scientific and Engineering C++, ISBN 0201533936
[McConnell]McConnell:  Code Complete, ISBN 1556154844
[Std]ISO/IEC 14882:1998 Programming Languages - C++
[Thompson]Thompson:  Haskell:  The Craft of Functional Programming, ISBN 0201342758
[Okasaki]Okasaki:  Purely Functional Data Structures, ISBN 0521663504
[Cousineau]Cousineau, Mauny:  The Functional Approach to Programming, ISBN 0521576814
[Abelson]Abelson, Sussman, Sussman:  Structure and Interpretation of Computer Programs, ISBN 0521576814
+
+
+ © Copyright Housemarque Oy 2002 +
+
+Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies.  +This document is provided "as is" without express or implied warranty and with no claim as to its suitability for any purpose. +
+ + diff --git a/doc/blank.html b/doc/blank.html new file mode 100644 index 0000000..05e6d82 --- /dev/null +++ b/doc/blank.html @@ -0,0 +1,9 @@ + + + blank.html + + + + + + diff --git a/doc/contents.html b/doc/contents.html new file mode 100644 index 0000000..0aae6e7 --- /dev/null +++ b/doc/contents.html @@ -0,0 +1,20 @@ + + + contents.html + + + + + +

Topics

+

Terminology

+

Data Types

+

Reference

+

Headers

+

Examples

+

Miscellanea

+ + + diff --git a/doc/data.html b/doc/data.html new file mode 100644 index 0000000..f1dc401 --- /dev/null +++ b/doc/data.html @@ -0,0 +1,15 @@ + + + data.html + + + + +

Data Types [back]

+ + + diff --git a/doc/data/arrays.html b/doc/data/arrays.html new file mode 100644 index 0000000..6274eb2 --- /dev/null +++ b/doc/data/arrays.html @@ -0,0 +1,43 @@ + + + arrays.html + + + + +

Arrays

+
+ An array is a data structure consisting of a two-element tuple.  + The first element is the number of elements in the array.  + The second element is another tuple of the elements in the array.  + For example, +
+
+ (3, (a, b, c)) +
+
+ ...is an array of 3 elements--a, b, and c. +
+
+ The primary strength of arrays is that they store their own size.  + Because of this, access to elements does not require the size.  + It only requires that an element exists at a certain index. +
+
+ This allows macro parameters to be variable in size and allows data states to change + size without the user explicitly keeping track of the size independently. +
+
+ Elements of an array can be extracted with BOOST_PP_ARRAY_ELEM, + an array's size can be extracted with BOOST_PP_ARRAY_SIZE, and + an array can be converted to the more primitive tuple data structure + with BOOST_PP_ARRAY_DATA. +
+

Primitives

+ + + diff --git a/doc/data/lists.html b/doc/data/lists.html new file mode 100644 index 0000000..3f0fabb --- /dev/null +++ b/doc/data/lists.html @@ -0,0 +1,36 @@ + + + lists.html + + + + +

Lists

+
+ A list is a simple cons-style list with a head and a tail.  + The head of a list is an element, + and the tail is either another list or BOOST_PP_NIL. + For example, +
+
+ (a, (b, (c, BOOST_PP_NIL))) +
+
+ ...is a list of 3 elements--a, b, and c. +
+
+ This allows macro parameters to be variable in size and allows data states to change + size without the user explicitly keeping track of the size independently. +
+
+ Elements of a list can be extracted with + BOOST_PP_LIST_FIRST and BOOST_PP_LIST_REST.  +
+

Primitives

+ + + diff --git a/doc/data/tuples.html b/doc/data/tuples.html new file mode 100644 index 0000000..ca01b2e --- /dev/null +++ b/doc/data/tuples.html @@ -0,0 +1,32 @@ + + + tuples.html + + + + +

Tuples

+
+ A tuple is a simple comma-separated list of elements inside parenthesis.  + For example, +
+
+ (a, b, c) +
+
+ ...is a tuple of 3 elements--a, b, and c. +
+
+ Tuples are fast and easy to use.  + However, all access to tuples requires knowledge of its size. +
+
+ Elements of a tuple can be extracted with + BOOST_PP_TUPLE_ELEM. +
+

Primitives

+ + + diff --git a/doc/examples.html b/doc/examples.html new file mode 100644 index 0000000..97482db --- /dev/null +++ b/doc/examples.html @@ -0,0 +1,18 @@ + + + topics.html + + + + +

Examples [back]

+ + + diff --git a/doc/examples/out.cpp b/doc/examples/out.cpp deleted file mode 100644 index 4fe5bc1..0000000 --- a/doc/examples/out.cpp +++ /dev/null @@ -1,16 +0,0 @@ - - -extern "C" { - - void _assert(const char*, const char*, unsigned); - -} - -int main(void) { - int i = 0; - do { int duffs_device_initial_cnt = (0); if (duffs_device_initial_cnt > 0) { int duffs_device_running_cnt = (duffs_device_initial_cnt + (16 - 1)) / 16; switch (duffs_device_initial_cnt % 16) { do { case (0 ? 16 - 0 : 0): { ++i; }; case (1 ? 16 - 1 : 0): { ++i; }; case (2 ? 16 - 2 : 0): { ++i; }; case (3 ? 16 - 3 : 0): { ++i; }; case (4 ? 16 - 4 : 0): { ++i; }; case (5 ? 16 - 5 : 0): { ++i; }; case (6 ? 16 - 6 : 0): { ++i; }; case (7 ? 16 - 7 : 0): { ++i; }; case (8 ? 16 - 8 : 0): { ++i; }; case (9 ? 16 - 9 : 0): { ++i; }; case (10 ? 16 - 10 : 0): { ++i; }; case (11 ? 16 - 11 : 0): { ++i; }; case (12 ? 16 - 12 : 0): { ++i; }; case (13 ? 16 - 13 : 0): { ++i; }; case (14 ? 16 - 14 : 0): { ++i; }; case (15 ? 16 - 15 : 0): { ++i; }; } while (--duffs_device_running_cnt); } } } while (0); - (void)( (i == 0) || (_assert("i == 0", "duffs_device.c", 58), 0) ); - do { int duffs_device_initial_cnt = (1000); if (duffs_device_initial_cnt > 0) { int duffs_device_running_cnt = (duffs_device_initial_cnt + (16 - 1)) / 16; switch (duffs_device_initial_cnt % 16) { do { case (0 ? 16 - 0 : 0): { ++i; }; case (1 ? 16 - 1 : 0): { ++i; }; case (2 ? 16 - 2 : 0): { ++i; }; case (3 ? 16 - 3 : 0): { ++i; }; case (4 ? 16 - 4 : 0): { ++i; }; case (5 ? 16 - 5 : 0): { ++i; }; case (6 ? 16 - 6 : 0): { ++i; }; case (7 ? 16 - 7 : 0): { ++i; }; case (8 ? 16 - 8 : 0): { ++i; }; case (9 ? 16 - 9 : 0): { ++i; }; case (10 ? 16 - 10 : 0): { ++i; }; case (11 ? 16 - 11 : 0): { ++i; }; case (12 ? 16 - 12 : 0): { ++i; }; case (13 ? 16 - 13 : 0): { ++i; }; case (14 ? 16 - 14 : 0): { ++i; }; case (15 ? 16 - 15 : 0): { ++i; }; } while (--duffs_device_running_cnt); } } } while (0); - (void)( (i == 1000) || (_assert("i == N", "duffs_device.c", 60), 0) ); - return 0; -} diff --git a/doc/headers.html b/doc/headers.html new file mode 100644 index 0000000..2d00a7e --- /dev/null +++ b/doc/headers.html @@ -0,0 +1,165 @@ + + + headers.html + + + + + +

Headers [back]

+ + + diff --git a/doc/headers/arithmetic.hpp.html b/doc/headers/arithmetic.hpp.html new file mode 100644 index 0000000..29a8bfd --- /dev/null +++ b/doc/headers/arithmetic.hpp.html @@ -0,0 +1,25 @@ + + + arithmetic.hpp + + + +
+ The arithmetic.hpp includes the headers in the arithmetic folder. +
+

Usage

+
+ #include <boost/preprocessor/arithmetic.hpp> +
+

Includes

+ + + diff --git a/doc/headers/array.hpp.html b/doc/headers/array.hpp.html new file mode 100644 index 0000000..11f5c6b --- /dev/null +++ b/doc/headers/array.hpp.html @@ -0,0 +1,21 @@ + + + array.hpp + + + +
+ The array.hpp includes the headers in the array folder. +
+

Usage

+
+ #include <boost/preprocessor/array.hpp> +
+

Includes

+ + + diff --git a/doc/headers/assert_msg.hpp.html b/doc/headers/assert_msg.hpp.html new file mode 100644 index 0000000..51610b7 --- /dev/null +++ b/doc/headers/assert_msg.hpp.html @@ -0,0 +1,20 @@ + + + assert_msg.hpp + + + +
+ The assert_msg.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/assert_msg.hpp> +
+

Includes

+ + + diff --git a/doc/headers/cat.hpp.html b/doc/headers/cat.hpp.html new file mode 100644 index 0000000..55be6d1 --- /dev/null +++ b/doc/headers/cat.hpp.html @@ -0,0 +1,19 @@ + + + cat.hpp + + + +
+ The cat.hpp header defines a concatenation macro. +
+

Usage

+
+ #include <boost/preprocessor/cat.hpp> +
+

Contents

+ + + diff --git a/doc/headers/comma.hpp.html b/doc/headers/comma.hpp.html new file mode 100644 index 0000000..3682824 --- /dev/null +++ b/doc/headers/comma.hpp.html @@ -0,0 +1,20 @@ + + + comma.hpp + + + +
+ The comma.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/comma.hpp> +
+

Includes

+ + + diff --git a/doc/headers/comma_if.hpp.html b/doc/headers/comma_if.hpp.html new file mode 100644 index 0000000..02c15e2 --- /dev/null +++ b/doc/headers/comma_if.hpp.html @@ -0,0 +1,20 @@ + + + comma_if.hpp + + + +
+ The comma_if.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/comma_if.hpp> +
+

Includes

+ + + diff --git a/doc/headers/comparison.hpp.html b/doc/headers/comparison.hpp.html new file mode 100644 index 0000000..066f290 --- /dev/null +++ b/doc/headers/comparison.hpp.html @@ -0,0 +1,24 @@ + + + comparison.hpp + + + +
+ The comparison.hpp includes the headers in the comparison folder. +
+

Usage

+
+ #include <boost/preprocessor/comparison.hpp> +
+

Includes

+ + + diff --git a/doc/headers/control.hpp.html b/doc/headers/control.hpp.html new file mode 100644 index 0000000..6be634c --- /dev/null +++ b/doc/headers/control.hpp.html @@ -0,0 +1,24 @@ + + + control.hpp + + + +
+ The control.hpp includes the headers in the control folder. +
+

Usage

+
+ #include <boost/preprocessor/control.hpp> +
+

Includes

+ + + diff --git a/doc/headers/debug.hpp.html b/doc/headers/debug.hpp.html new file mode 100644 index 0000000..3acc7b4 --- /dev/null +++ b/doc/headers/debug.hpp.html @@ -0,0 +1,20 @@ + + + debug.hpp + + + +
+ The debug.hpp includes the headers in the debug folder. +
+

Usage

+
+ #include <boost/preprocessor/debug.hpp> +
+

Includes

+ + + diff --git a/doc/headers/dec.hpp.html b/doc/headers/dec.hpp.html new file mode 100644 index 0000000..b6a024e --- /dev/null +++ b/doc/headers/dec.hpp.html @@ -0,0 +1,20 @@ + + + dec.hpp + + + +
+ The dec.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/dec.hpp> +
+

Includes

+ + + diff --git a/doc/headers/empty.hpp.html b/doc/headers/empty.hpp.html new file mode 100644 index 0000000..ef6827c --- /dev/null +++ b/doc/headers/empty.hpp.html @@ -0,0 +1,20 @@ + + + empty.hpp + + + +
+ The empty.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/empty.hpp> +
+

Includes

+ + + diff --git a/doc/headers/enum.hpp.html b/doc/headers/enum.hpp.html new file mode 100644 index 0000000..8c9e9d3 --- /dev/null +++ b/doc/headers/enum.hpp.html @@ -0,0 +1,20 @@ + + + enum.hpp + + + +
+ The enum.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/enum.hpp> +
+

Includes

+ + + diff --git a/doc/headers/enum_params.hpp.html b/doc/headers/enum_params.hpp.html new file mode 100644 index 0000000..323f119 --- /dev/null +++ b/doc/headers/enum_params.hpp.html @@ -0,0 +1,20 @@ + + + enum_params.hpp + + + +
+ The enum_params.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/enum_params.hpp> +
+

Includes

+ + + diff --git a/doc/headers/enum_params_with_a_default.hpp.html b/doc/headers/enum_params_with_a_default.hpp.html new file mode 100644 index 0000000..bd08d72 --- /dev/null +++ b/doc/headers/enum_params_with_a_default.hpp.html @@ -0,0 +1,20 @@ + + + enum_params_with_a_default.hpp + + + +
+ The enum_params_with_a_default.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/enum_params_with_a_default.hpp> +
+

Includes

+ + + diff --git a/doc/headers/enum_params_with_defaults.hpp.html b/doc/headers/enum_params_with_defaults.hpp.html new file mode 100644 index 0000000..118ae99 --- /dev/null +++ b/doc/headers/enum_params_with_defaults.hpp.html @@ -0,0 +1,20 @@ + + + enum_params_with_defaults.hpp + + + +
+ The enum_params_with_defaults.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/enum_params_with_defaults.hpp> +
+

Includes

+ + + diff --git a/doc/headers/enum_shifted.hpp.html b/doc/headers/enum_shifted.hpp.html new file mode 100644 index 0000000..2635bbd --- /dev/null +++ b/doc/headers/enum_shifted.hpp.html @@ -0,0 +1,20 @@ + + + enum_shifted.hpp + + + +
+ The enum_shifted.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/enum_shifted.hpp> +
+

Includes

+ + + diff --git a/doc/headers/enum_shifted_params.hpp.html b/doc/headers/enum_shifted_params.hpp.html new file mode 100644 index 0000000..65314ce --- /dev/null +++ b/doc/headers/enum_shifted_params.hpp.html @@ -0,0 +1,20 @@ + + + enum_shifted_params.hpp + + + +
+ The enum_shifted_params.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/enum_shifted_params.hpp> +
+

Includes

+ + + diff --git a/doc/headers/expand.hpp.html b/doc/headers/expand.hpp.html new file mode 100644 index 0000000..7cf8695 --- /dev/null +++ b/doc/headers/expand.hpp.html @@ -0,0 +1,20 @@ + + + expand.hpp + + + +
+ The expand.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/expand.hpp> +
+

Includes

+ + + diff --git a/doc/headers/expr_if.hpp.html b/doc/headers/expr_if.hpp.html new file mode 100644 index 0000000..b48973e --- /dev/null +++ b/doc/headers/expr_if.hpp.html @@ -0,0 +1,20 @@ + + + expr_if.hpp + + + +
+ The expr_if.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/expr_if.hpp> +
+

Includes

+ + + diff --git a/doc/headers/facilities.hpp.html b/doc/headers/facilities.hpp.html new file mode 100644 index 0000000..0add972 --- /dev/null +++ b/doc/headers/facilities.hpp.html @@ -0,0 +1,23 @@ + + + facilities.hpp + + + +
+ The facilities.hpp includes the headers in the facilities folder. +
+

Usage

+
+ #include <boost/preprocessor/facilities.hpp> +
+

Includes

+ + + diff --git a/doc/headers/for.hpp.html b/doc/headers/for.hpp.html new file mode 100644 index 0000000..cc74959 --- /dev/null +++ b/doc/headers/for.hpp.html @@ -0,0 +1,20 @@ + + + for.hpp + + + +
+ The for.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/for.hpp> +
+

Includes

+ + + diff --git a/doc/headers/identity.hpp.html b/doc/headers/identity.hpp.html new file mode 100644 index 0000000..98ed139 --- /dev/null +++ b/doc/headers/identity.hpp.html @@ -0,0 +1,20 @@ + + + identity.hpp + + + +
+ The identity.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/identity.hpp> +
+

Includes

+ + + diff --git a/doc/headers/if.hpp.html b/doc/headers/if.hpp.html new file mode 100644 index 0000000..e72b200 --- /dev/null +++ b/doc/headers/if.hpp.html @@ -0,0 +1,20 @@ + + + if.hpp + + + +
+ The if.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/if.hpp> +
+

Includes

+ + + diff --git a/doc/headers/inc.hpp.html b/doc/headers/inc.hpp.html new file mode 100644 index 0000000..db35475 --- /dev/null +++ b/doc/headers/inc.hpp.html @@ -0,0 +1,20 @@ + + + inc.hpp + + + +
+ The inc.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/inc.hpp> +
+

Includes

+ + + diff --git a/doc/headers/iterate.hpp.html b/doc/headers/iterate.hpp.html new file mode 100644 index 0000000..a2f3dde --- /dev/null +++ b/doc/headers/iterate.hpp.html @@ -0,0 +1,20 @@ + + + iterate.hpp + + + +
+ The iterate.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/iterate.hpp> +
+

Includes

+ + + diff --git a/doc/headers/iteration.hpp.html b/doc/headers/iteration.hpp.html new file mode 100644 index 0000000..9f394e2 --- /dev/null +++ b/doc/headers/iteration.hpp.html @@ -0,0 +1,21 @@ + + + iteration.hpp + + + +
+ The iteration.hpp includes the headers in the iteration folder. +
+

Usage

+
+ #include <boost/preprocessor/iteration.hpp> +
+

Includes

+ + + diff --git a/doc/headers/library.hpp.html b/doc/headers/library.hpp.html new file mode 100644 index 0000000..7b3e955 --- /dev/null +++ b/doc/headers/library.hpp.html @@ -0,0 +1,15 @@ + + + library.hpp + + + +
+ The library.hpp includes the entire library. +
+

Usage

+
+ #include <boost/preprocessor/library.hpp> +
+ + diff --git a/doc/headers/limits.hpp.html b/doc/headers/limits.hpp.html new file mode 100644 index 0000000..fe22153 --- /dev/null +++ b/doc/headers/limits.hpp.html @@ -0,0 +1,20 @@ + + + limits.hpp + + + +
+ The limits.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/limits.hpp> +
+

Includes

+ + + diff --git a/doc/headers/list.hpp.html b/doc/headers/list.hpp.html new file mode 100644 index 0000000..0583bcf --- /dev/null +++ b/doc/headers/list.hpp.html @@ -0,0 +1,35 @@ + + + list.hpp + + + +
+ The list.hpp includes the headers in the list folder. +
+

Usage

+
+ #include <boost/preprocessor/list.hpp> +
+

Includes

+ + + diff --git a/doc/headers/logical.hpp.html b/doc/headers/logical.hpp.html new file mode 100644 index 0000000..c347646 --- /dev/null +++ b/doc/headers/logical.hpp.html @@ -0,0 +1,29 @@ + + + logical.hpp + + + +
+ The logical.hpp includes the headers in the logical folder. +
+

Usage

+
+ #include <boost/preprocessor/logical.hpp> +
+

Includes

+ + + diff --git a/doc/headers/max.hpp.html b/doc/headers/max.hpp.html new file mode 100644 index 0000000..5034f06 --- /dev/null +++ b/doc/headers/max.hpp.html @@ -0,0 +1,20 @@ + + + max.hpp + + + +
+ The max.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/max.hpp> +
+

Includes

+ + + diff --git a/doc/headers/min.hpp.html b/doc/headers/min.hpp.html new file mode 100644 index 0000000..c4bb66d --- /dev/null +++ b/doc/headers/min.hpp.html @@ -0,0 +1,20 @@ + + + min.hpp + + + +
+ The min.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/min.hpp> +
+

Includes

+ + + diff --git a/doc/headers/preprocessor.hpp.html b/doc/headers/preprocessor.hpp.html new file mode 100644 index 0000000..b63c449 --- /dev/null +++ b/doc/headers/preprocessor.hpp.html @@ -0,0 +1,15 @@ + + + preprocessor.hpp + + + +
+ The preprocessor.hpp includes the entire library. +
+

Usage

+
+ #include <boost/preprocessor.hpp> +
+ + diff --git a/doc/headers/punctuation.hpp.html b/doc/headers/punctuation.hpp.html new file mode 100644 index 0000000..b05d7e7 --- /dev/null +++ b/doc/headers/punctuation.hpp.html @@ -0,0 +1,22 @@ + + + punctuation.hpp + + + +
+ The punctuation.hpp includes the headers in the punctuation folder. +
+

Usage

+
+ #include <boost/preprocessor/punctuation.hpp> +
+

Includes

+ + + diff --git a/doc/headers/repeat.hpp.html b/doc/headers/repeat.hpp.html new file mode 100644 index 0000000..9445fc9 --- /dev/null +++ b/doc/headers/repeat.hpp.html @@ -0,0 +1,20 @@ + + + repeat.hpp + + + +
+ The repeat.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/repeat.hpp> +
+

Includes

+ + + diff --git a/doc/headers/repeat_2nd.hpp.html b/doc/headers/repeat_2nd.hpp.html new file mode 100644 index 0000000..6511226 --- /dev/null +++ b/doc/headers/repeat_2nd.hpp.html @@ -0,0 +1,20 @@ + + + repeat_2nd.hpp + + + +
+ The repeat_2nd.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/repeat_2nd.hpp> +
+

Includes

+ + + diff --git a/doc/headers/repeat_3rd.hpp.html b/doc/headers/repeat_3rd.hpp.html new file mode 100644 index 0000000..8e84c27 --- /dev/null +++ b/doc/headers/repeat_3rd.hpp.html @@ -0,0 +1,20 @@ + + + repeat_3rd.hpp + + + +
+ The repeat_3rd.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/repeat_3rd.hpp> +
+

Includes

+ + + diff --git a/doc/headers/repeat_from_to.hpp.html b/doc/headers/repeat_from_to.hpp.html new file mode 100644 index 0000000..6755551 --- /dev/null +++ b/doc/headers/repeat_from_to.hpp.html @@ -0,0 +1,20 @@ + + + repeat_from_to.hpp + + + +
+ The repeat_from_to.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/repeat_from_to.hpp> +
+

Includes

+ + + diff --git a/doc/headers/repeat_from_to_2nd.hpp.html b/doc/headers/repeat_from_to_2nd.hpp.html new file mode 100644 index 0000000..f7ad95b --- /dev/null +++ b/doc/headers/repeat_from_to_2nd.hpp.html @@ -0,0 +1,20 @@ + + + repeat_from_to_2nd.hpp + + + +
+ The repeat_from_to_2nd.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/repeat_from_to_2nd.hpp> +
+

Includes

+ + + diff --git a/doc/headers/repeat_from_to_3rd.hpp.html b/doc/headers/repeat_from_to_3rd.hpp.html new file mode 100644 index 0000000..4573718 --- /dev/null +++ b/doc/headers/repeat_from_to_3rd.hpp.html @@ -0,0 +1,20 @@ + + + repeat_from_to_3rd.hpp + + + +
+ The repeat_from_to_3rd.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/repeat_from_to_3rd.hpp> +
+

Includes

+ + + diff --git a/doc/headers/repetition.hpp.html b/doc/headers/repetition.hpp.html new file mode 100644 index 0000000..d57a2af --- /dev/null +++ b/doc/headers/repetition.hpp.html @@ -0,0 +1,33 @@ + + + repetition.hpp + + + +
+ The repetition.hpp includes the headers in the repetition folder. +
+

Usage

+
+ #include <boost/preprocessor/repetition.hpp> +
+

Includes

+ + + diff --git a/doc/headers/selection.hpp.html b/doc/headers/selection.hpp.html new file mode 100644 index 0000000..6b61935 --- /dev/null +++ b/doc/headers/selection.hpp.html @@ -0,0 +1,20 @@ + + + selection.hpp + + + +
+ The selection.hpp includes the headers in the selection folder. +
+

Usage

+
+ #include <boost/preprocessor/selection.hpp> +
+

Includes

+ + + diff --git a/doc/headers/slot.hpp.html b/doc/headers/slot.hpp.html new file mode 100644 index 0000000..4e13c7b --- /dev/null +++ b/doc/headers/slot.hpp.html @@ -0,0 +1,19 @@ + + + slot.hpp + + + +
+ The slot.hpp includes the headers in the slot folder. +
+

Usage

+
+ #include <boost/preprocessor/slot.hpp> +
+

Includes

+ + + diff --git a/doc/headers/stringize.hpp.html b/doc/headers/stringize.hpp.html new file mode 100644 index 0000000..2945d06 --- /dev/null +++ b/doc/headers/stringize.hpp.html @@ -0,0 +1,19 @@ + + + stringize.hpp + + + +
+ The stringize.hpp header defines a stringizing macro. +
+

Usage

+
+ #include <boost/preprocessor/stringize.hpp> +
+

Contents

+ + + diff --git a/doc/headers/tuple.hpp.html b/doc/headers/tuple.hpp.html new file mode 100644 index 0000000..2926b21 --- /dev/null +++ b/doc/headers/tuple.hpp.html @@ -0,0 +1,23 @@ + + + tuple.hpp + + + +
+ The tuple.hpp includes the headers in the tuple folder. +
+

Usage

+
+ #include <boost/preprocessor/tuple.hpp> +
+

Includes

+ + + diff --git a/doc/headers/while.hpp.html b/doc/headers/while.hpp.html new file mode 100644 index 0000000..a972367 --- /dev/null +++ b/doc/headers/while.hpp.html @@ -0,0 +1,20 @@ + + + while.hpp + + + +
+ The while.hpp is a jumper header for backwards compatibility.  + This header is deprecated. +
+

Usage

+
+ #include <boost/preprocessor/while.hpp> +
+

Includes

+ + + diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..b509b64 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,13 @@ + + + Boost.Preprocessor + + + + + + + + .. + + diff --git a/doc/miscellanea.html b/doc/miscellanea.html new file mode 100644 index 0000000..d738746 --- /dev/null +++ b/doc/miscellanea.html @@ -0,0 +1,15 @@ + + + miscellanea.html + + + + +

Miscellanea [back]

+ + + diff --git a/doc/ref.html b/doc/ref.html new file mode 100644 index 0000000..a66a943 --- /dev/null +++ b/doc/ref.html @@ -0,0 +1,217 @@ + + + ref.html + + + + +

Reference [back]

+ + + \ No newline at end of file diff --git a/doc/ref/add.html b/doc/ref/add.html new file mode 100644 index 0000000..42c7d02 --- /dev/null +++ b/doc/ref/add.html @@ -0,0 +1,57 @@ + + + BOOST_PP_ADD + + + +
+ The BOOST_PP_ADD macro expands to the sum of its arguments. +
+

Usage

+
+ BOOST_PP_ADD(x, y) +
+

Arguments

+
+
x
+
+ The first addend of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The second addend of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If the sum of x and y is greater than BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_ADD_D in such a situation. +
+
+ This macro is the most efficient when x is less than or equal to y.  + However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.  + In other words, x should be the addend that is most likely to be the largest of the two operands. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/add.hpp>
+
+BOOST_PP_ADD(4, 3) // expands to 7
+
+ + diff --git a/doc/ref/add_d.html b/doc/ref/add_d.html new file mode 100644 index 0000000..df2af3a --- /dev/null +++ b/doc/ref/add_d.html @@ -0,0 +1,79 @@ + + + BOOST_PP_ADD_D + + + +
+ The BOOST_PP_ADD_D macro expands to the sum of its second and third arguments.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_ADD_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The first addend of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The second addend of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If the sum of x and y is greater than BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. +
+
+ This macro is the most efficient when x is less than or equal to y.  + However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.  + In other words, x should be the addend that is most likely to be the largest of the two operands. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/add.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define PRED(d, data) BOOST_PP_TUPLE_ELEM(2, 0, data)
+
+#define OP(d, data) \
+   ( \
+      BOOST_PP_DEC( \
+         BOOST_PP_TUPLE_ELEM(2, 0, data) \
+      ), \
+      BOOST_PP_ADD_D( \
+         d, \
+         BOOST_PP_TUPLE_ELEM(2, 1, data), \
+         2 \
+      ) \
+   ) \
+   /**/
+
+// increment 'x' by 2 'n' times
+#define STRIDE(x, n) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_WHILE(PRED, OP, (n, x)))
+
+STRIDE(10, 2) // expands to 14
+STRIDE(51, 6) // expands to 63
+
+ + diff --git a/doc/ref/and.html b/doc/ref/and.html new file mode 100644 index 0000000..bfcde95 --- /dev/null +++ b/doc/ref/and.html @@ -0,0 +1,53 @@ + + + BOOST_PP_AND + + + +
+ The BOOST_PP_AND macro expands to the logical AND of its operands. +
+

Usage

+
+ BOOST_PP_AND(p, q) +
+

Arguments

+
+
p
+
+ The left operand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
q
+
+ The right operand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If both p and q are non-zero, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro performs a boolean conversion on each operand before performing the logical AND operation.  + If that conversion is not necessary, use BOOST_PP_BITAND instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/and.hpp>
+
+BOOST_PP_AND(4, 3) // expands to 1
+BOOST_PP_AND(5, 0) // expands to 0
+
+ + diff --git a/doc/ref/apply.html b/doc/ref/apply.html new file mode 100644 index 0000000..82bcb11 --- /dev/null +++ b/doc/ref/apply.html @@ -0,0 +1,53 @@ + + + BOOST_PP_APPLY + + + +
+ The BOOST_PP_APPLY macro abstracts the difference between an argument and nothing. +
+

Usage

+
+ BOOST_PP_APPLY(x) +
+

Arguments

+
+
x
+
+ The abstracted argument.  + This argument must be either BOOST_PP_NIL or a tuple with one element--such as (arg) or ((a, b)). +
+
+

Remarks

+
+ If x is BOOST_PP_NIL, this macro expands to nothing.  + If x is a one element tuple, it expands to the contents of that tuple. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/facilities/apply.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define CV(i) \
+   BOOST_PP_APPLY( \
+      BOOST_PP_TUPLE_ELEM( \
+         4, i, \
+         (BOOST_PP_NIL, (const), (volatile), (const volatile)) \
+      ) \
+   ) \
+   /**/
+
+CV(0) // expands to nothing
+CV(1) // expands to const
+
+ + diff --git a/doc/ref/array_data.html b/doc/ref/array_data.html new file mode 100644 index 0000000..75798c0 --- /dev/null +++ b/doc/ref/array_data.html @@ -0,0 +1,38 @@ + + + BOOST_PP_ARRAY_DATA + + + +
+ The BOOST_PP_ARRAY_DATA macro extracts the tuple data from an array. +
+

Usage

+
+ BOOST_PP_ARRAY_DATA(array) +
+

Arguments

+
+
array
+
+ An array to be converted to a tuple. +
+
+

Remarks

+
+ This macro expands to the data portion of an array which is a tuple. +
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/array/data.hpp>
+
+#define ARRAY (3, (x, y, z))
+
+BOOST_PP_ARRAY_DATA(ARRAY) // expands to (x, y, z)
+
+ + diff --git a/doc/ref/array_elem.html b/doc/ref/array_elem.html new file mode 100644 index 0000000..7e5d700 --- /dev/null +++ b/doc/ref/array_elem.html @@ -0,0 +1,40 @@ + + + BOOST_PP_ARRAY_ELEM + + + +
+ The BOOST_PP_ARRAY_ELEM macro extracts an element from a array. +
+

Usage

+
+ BOOST_PP_ARRAY_ELEM(i, array) +
+

Arguments

+
+
i
+
+ The zero-based index into the array of the element to be extracted.  +
+
array
+
+ The array from which an element is to be extracted.  + This array must contain at least i + 1 elements. +
+
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/array/elem.hpp>
+
+#define ARRAY (4, (a, b, c, d))
+
+BOOST_PP_ARRAY_ELEM(0, ARRAY) // expands to a
+BOOST_PP_ARRAY_ELEM(3, ARRAY) // expands to d
+
+ + diff --git a/doc/ref/array_size.html b/doc/ref/array_size.html new file mode 100644 index 0000000..20cec76 --- /dev/null +++ b/doc/ref/array_size.html @@ -0,0 +1,34 @@ + + + BOOST_PP_ARRAY_SIZE + + + +
+ The BOOST_PP_ARRAY_SIZE macro expands to the size of the array passed to it. +
+

Usage

+
+ BOOST_PP_ARRAY_SIZE(array) +
+

Arguments

+
+
array
+
+ An array whose size is to be extracted. +
+
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/array/size.hpp>
+
+#define ARRAY (3, (x, y, z))
+
+BOOST_PP_ARRAY_SIZE(ARRAY) // expands to 3
+
+ + diff --git a/doc/ref/assert.html b/doc/ref/assert.html new file mode 100644 index 0000000..5beb721 --- /dev/null +++ b/doc/ref/assert.html @@ -0,0 +1,103 @@ + + + BOOST_PP_ASSERT + + + +
+ The BOOST_PP_ASSERT macro conditionally causes a preprocessing error. +
+

Usage

+
+ BOOST_PP_ASSERT(cond) +
+

Arguments

+
+
cond
+
+ A condition that determines whether an assertion occurs.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If cond expands to 0, this macro causes a preprocessing error.  + Otherwise, it expands to nothing. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/debug/assert.hpp>
+#include <boost/preprocessor/logical/bitnor.hpp>
+#include <boost/preprocessor/logical/compl.hpp>
+
+// The is BOOST_PP_IS_NULLARY macro is not part of
+// the public interface of the library because it
+// doesn't work on Borland preprocessors.  It is
+// only used here to illustrate assertions.  In
+// effect, it detects whether an argument is empty
+// parenthesis or some text.
+
+#include <boost/preprocessor/detail/is_nullary.hpp>
+
+#define IS_EDISON_DESIGN_GROUP() \
+   BOOST_PP_COMPL( \
+      BOOST_PP_IS_NULLARY( \
+         BOOST_PP_CAT(IS_EDG_CHECK, __EDG_VERSION) \
+      ) \
+   ) \
+   /**/
+#define IS_EDG_CHECK__EDG_VERSION ()
+
+#define IS_METROWERKS() \
+   BOOST_PP_COMPL( \
+      BOOST_PP_IS_NULLARY( \
+         BOOST_PP_CAT(IS_MWERKS_CHECK, __MWERKS__) \
+      ) \
+   ) \
+   /**/
+#define IS_MWERKS_CHECK__MWERKS__ ()
+
+#define IS_MICROSOFT() \
+   BOOST_PP_BITNOR( \
+      IS_MICROSOFT_ROOT(), \
+      IS_EDISON_DESIGN_GROUP() \
+   ) \
+   /**/
+#define IS_MICROSOFT_ROOT() \
+   BOOST_PP_IS_NULLARY( \
+      BOOST_PP_CAT(IS_MSVC_CHECK, _MSC_VER) \
+   ) \
+   /**/
+#define IS_MSVC_CHECK_MS_VER ()
+
+// this macro doesn't work on EDG...
+// (this is just an example)
+
+#define MACRO(n) \
+   BOOST_PP_CAT( \
+      MACRO_, \
+      IS_EDISON_DESIGN_GROUP() \
+   )(n) \
+   /**/
+
+#define MACRO_1(n) \
+   BOOST_PP_ASSERT(0) \
+   "Edison Design Group is not supported" \
+   /**/
+
+#define MACRO_0(n) normal mode: n
+
+MACRO(10)
+
+ + diff --git a/doc/ref/assert_msg.html b/doc/ref/assert_msg.html new file mode 100644 index 0000000..3b53122 --- /dev/null +++ b/doc/ref/assert_msg.html @@ -0,0 +1,55 @@ + + + BOOST_PP_ASSERT_MSG + + + +
+ The BOOST_PP_ASSERT_MSG macro conditionally inserts debugging text. +
+

Usage

+
+ BOOST_PP_ASSERT_MSG(cond, msg) +
+

Arguments

+
+
cond
+
+ A condition that determines whether an assertion occurs.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
msg
+
+ A message to display if cond evaluates to 0. +
+
+

Remarks

+
+ If cond expands to 0, this macro expands to msg.  + Otherwise, it expands to nothing. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/debug/assert.hpp>
+
+// lines are supposed to be counted
+// in translation phase 1
+
+#line 9
+BOOST_PP_ASSERT_MSG( \
+   BOOST_PP_EQUAL(__LINE__, 9), \
+   "incorrect line numbering detected" \
+)
+
+ + diff --git a/doc/ref/assign_slot.html b/doc/ref/assign_slot.html new file mode 100644 index 0000000..9f76220 --- /dev/null +++ b/doc/ref/assign_slot.html @@ -0,0 +1,50 @@ + + + BOOST_PP_ASSIGN_SLOT + + + +
+ The BOOST_PP_ASSIGN_SLOT macro fully evaluates a numeric macro or expression. +
+

Usage

+
+ #include BOOST_PP_ASSIGN_SLOT(i) +
+

Arguments

+
+
i
+
+ The slot index that is to be assigned.  + This value must be in the range of 1 to BOOST_PP_LIMIT_SLOT_COUNT. +
+
+

Remarks

+
+ Prior to use, the named external argument BOOST_PP_VALUE must be defined.  + Also, it must expand to a numeric value that is in the range of 0 to 2^32 - 1. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/slot/slot.hpp>
+
+#define X() 4
+
+#define BOOST_PP_VALUE 1 + 2 + 3 + X()
+#include BOOST_PP_ASSIGN_SLOT(1)
+
+#undef X
+
+BOOST_PP_SLOT(1) // expands to 10
+
+ + diff --git a/doc/ref/bitand.html b/doc/ref/bitand.html new file mode 100644 index 0000000..a3f427f --- /dev/null +++ b/doc/ref/bitand.html @@ -0,0 +1,54 @@ + + + BOOST_PP_BITAND + + + +
+ The BOOST_PP_BITAND macro expands to the bitwise AND of its operands. +
+

Usage

+
+ BOOST_PP_BITAND(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the operation.  + This value must expand to 0 or 1. +
+
y
+
+ The right operand of the operation.  + This value must expand to 0 or 1. +
+
+

Remarks

+
+ If both x and y are 1, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro does not perform a boolean conversion on either operand before performing the bitwise AND operation.  + If that conversion is necessary, use BOOST_PP_AND instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/bitand.hpp>
+
+BOOST_PP_BITAND(0, 0) // expands to 0
+BOOST_PP_BITAND(0, 1) // expands to 0
+BOOST_PP_BITAND(1, 0) // expands to 0
+BOOST_PP_BITAND(1, 1) // expands to 1
+
+ + diff --git a/doc/ref/bitnor.html b/doc/ref/bitnor.html new file mode 100644 index 0000000..ec18fdf --- /dev/null +++ b/doc/ref/bitnor.html @@ -0,0 +1,54 @@ + + + BOOST_PP_BITNOR + + + +
+ The BOOST_PP_BITNOR macro expands to the bitwise NOR of its operands. +
+

Usage

+
+ BOOST_PP_BITNOR(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the operation.  + This value must expand to 0 or 1. +
+
y
+
+ The right operand of the operation.  + This value must expand to 0 or 1. +
+
+

Remarks

+
+ If neither x nor y is 1, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro does not perform a boolean conversion on either operand before performing the bitwise NOR operation.  + If that conversion is necessary, use BOOST_PP_NOR instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/bitnor.hpp>
+
+BOOST_PP_BITNOR(0, 0) // expands to 1
+BOOST_PP_BITNOR(0, 1) // expands to 0
+BOOST_PP_BITNOR(1, 0) // expands to 0
+BOOST_PP_BITNOR(1, 1) // expands to 0
+
+ + diff --git a/doc/ref/bitor.html b/doc/ref/bitor.html new file mode 100644 index 0000000..a0136e3 --- /dev/null +++ b/doc/ref/bitor.html @@ -0,0 +1,54 @@ + + + BOOST_PP_BITOR + + + +
+ The BOOST_PP_BITOR macro expands to the bitwise OR of its operands. +
+

Usage

+
+ BOOST_PP_BITOR(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the operation.  + This value must expand to 0 or 1. +
+
y
+
+ The right operand of the operation.  + This value must expand to 0 or 1. +
+
+

Remarks

+
+ If either x or y is 1, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro does not perform a boolean conversion on either operand before performing the bitwise OR operation.  + If that conversion is necessary, use BOOST_PP_OR instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/bitor.hpp>
+
+BOOST_PP_BITOR(0, 0) // expands to 0
+BOOST_PP_BITOR(0, 1) // expands to 1
+BOOST_PP_BITOR(1, 0) // expands to 1
+BOOST_PP_BITOR(1, 1) // expands to 1
+
+ + diff --git a/doc/ref/bitxor.html b/doc/ref/bitxor.html new file mode 100644 index 0000000..7ae0520 --- /dev/null +++ b/doc/ref/bitxor.html @@ -0,0 +1,55 @@ + + + BOOST_PP_BITXOR + + + + +
+ The BOOST_PP_BITXOR macro expands to the bitwise XOR of its operands. +
+

Usage

+
+ BOOST_PP_BITXOR(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the operation.  + This value must expand to 0 or 1. +
+
y
+
+ The right operand of the operation.  + This value must expand to 0 or 1. +
+
+

Remarks

+
+ If either x or y is 1 exclusively, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro does not perform a boolean conversion on either operand before performing the bitwise OR operation.  + If that conversion is necessary, use BOOST_PP_XOR instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/bitxor.hpp>
+
+BOOST_PP_BITXOR(0, 0) // expands to 0
+BOOST_PP_BITXOR(0, 1) // expands to 1
+BOOST_PP_BITXOR(1, 0) // expands to 1
+BOOST_PP_BITXOR(1, 1) // expands to 0
+
+ + diff --git a/doc/ref/bool.html b/doc/ref/bool.html new file mode 100644 index 0000000..2dec091 --- /dev/null +++ b/doc/ref/bool.html @@ -0,0 +1,43 @@ + + + BOOST_PP_BOOL + + + +
+ The BOOST_PP_BOOL macro performs a boolean conversion on its operand. +
+

Usage

+
+ BOOST_PP_BOOL(x) +
+

Arguments

+
+
x
+
+ The value to be converted.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is 0, this macro expands to 0.  + Otherwise it expands to 1. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/bool.hpp>
+
+BOOST_PP_BOOL(6) // expands to 1
+BOOST_PP_BOOL(0) // expands to 0
+
+ + diff --git a/doc/ref/cat.html b/doc/ref/cat.html new file mode 100644 index 0000000..caeb938 --- /dev/null +++ b/doc/ref/cat.html @@ -0,0 +1,46 @@ + + + BOOST_PP_CAT + + + +
+ The BOOST_PP_CAT macro concatenates its arguments after they have been expanded. +
+

Usage

+
+ BOOST_PP_CAT(a, b) +
+

Arguments

+
+
a
+
+ The left operand of the concatenation. +
+
b
+
+ The right operand of the concatenation. +
+
+

Remarks

+
+ The preprocessor token-pasting operator (##) prevents arguments from expanding.  + This macro allows its arguments to expand before concatenation. +
+
+ Concatenation must not result in an invocation of a macro that uses BOOST_PP_CAT.  + If that happens, BOOST_PP_CAT will not expand the second time. +
+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+
+BOOST_PP_CAT(x, BOOST_PP_CAT(y, z)) // expands to xyz
+
+ + diff --git a/doc/ref/comma.html b/doc/ref/comma.html new file mode 100644 index 0000000..9187274 --- /dev/null +++ b/doc/ref/comma.html @@ -0,0 +1,32 @@ + + + BOOST_PP_COMMA + + + +
+ The BOOST_PP_COMMA macro expands to a comma. +
+

Usage

+
+ BOOST_PP_COMMA() +
+

Remarks

+
+ The preprocessor interprets commas as argument separators in macro invocations.  + Because of this, commas require special handling. +
+

Requirements

+ +

Sample Code

+ + + diff --git a/doc/ref/comma_if.html b/doc/ref/comma_if.html new file mode 100644 index 0000000..76998ef --- /dev/null +++ b/doc/ref/comma_if.html @@ -0,0 +1,49 @@ + + + BOOST_PP_COMMA_IF + + + +
+ The BOOST_PP_COMMA_IF macro conditionally expands to a comma. +
+

Usage

+
+ BOOST_PP_COMMA_IF(cond) +
+

Arguments

+
+
cond
+
+ The condition that determines if a the macro expands to a comma or nothing.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If cond expands to 0, this macro expands to nothing.  + Otherwise, it expands to a comma. +
+
+ The preprocessor interprets commas as argument separators in macro invocations.  + Because of this, commas require special handling. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define MACRO(z, n, text) BOOST_PP_COMMA_IF(n) text
+
+BOOST_PP_REPEAT(3, MACRO, class) // expands to class, class, class
+
+ + diff --git a/doc/ref/compl.html b/doc/ref/compl.html new file mode 100644 index 0000000..52a12fd --- /dev/null +++ b/doc/ref/compl.html @@ -0,0 +1,47 @@ + + + BOOST_PP_COMPL + + + +
+ The BOOST_PP_COMPL macro performs a bitwise inversion (bitwise NOT or one's complement) on its operand. +
+

Usage

+
+ BOOST_PP_COMPL(x) +
+

Arguments

+
+
x
+
+ The value to be converted.  + This value must expand to 0 or 1. +
+
+

Remarks

+
+ If x is 0, this macro expands to 1.  + If x is 1, this it expands to 0. +
+
+ This macro does not perform a boolean conversion on its operand before performing the inversion OR operation.  + If that conversion is necessary, use BOOST_PP_NOT instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/compl.hpp>
+
+BOOST_PP_COMPL(1) // expands to 0
+BOOST_PP_COMPL(0) // expands to 1
+
+ + diff --git a/doc/ref/config_extended_line_info.html b/doc/ref/config_extended_line_info.html new file mode 100644 index 0000000..9ff752f --- /dev/null +++ b/doc/ref/config_extended_line_info.html @@ -0,0 +1,33 @@ + + + BOOST_PP_CONFIG_EXTENDED_LINE_INFO + + + + +
+ The BOOST_PP_CONFIG_EXTENDED_LINE_INFO is a user-defined macro that determines whether BOOST_PP_LINE outputs extended file-iteration state information. +
+

Usage

+
+ #define BOOST_PP_CONFIG_EXTENDED_LINE_INFO n +
+

Arguments

+
+
n
+
+ The value that determines if BOOST_PP_LINE outputs extended file-iteration information.  + This value must be 0 or 1. +
+
+

Remarks

+
+ If n is 1, BOOST_PP_LINE will output extended data.  + By default, this macro is set to 0. +
+

See Also

+ + + diff --git a/doc/ref/dec.html b/doc/ref/dec.html new file mode 100644 index 0000000..99b97fe --- /dev/null +++ b/doc/ref/dec.html @@ -0,0 +1,43 @@ + + + BOOST_PP_DEC + + + +
+ The BOOST_PP_DEC macro expands to one less than its argument. +
+

Usage

+
+ BOOST_PP_DEC(x) +
+

Arguments

+
+
x
+
+ The value to be decremented.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is 0, the result is saturated to 0. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+
+BOOST_PP_DEC(BOOST_PP_DEC(6)) // expands to 4
+BOOST_PP_DEC(0) // expands to 0
+
+ + diff --git a/doc/ref/deduce_d.html b/doc/ref/deduce_d.html new file mode 100644 index 0000000..d304ddf --- /dev/null +++ b/doc/ref/deduce_d.html @@ -0,0 +1,71 @@ + + + BOOST_PP_DEDUCE_D + + + +
+ The BOOST_PP_DEDUCE_D macro manually deduces the state of the BOOST_PP_WHILE construct. +
+

Usage

+
+ BOOST_PP_DEDUCE_D() +
+

Remarks

+
+ This macro is intended to avoid the use of automatic-recursion at deep expansion depths.  + Automatic-recursion at such depths can be inefficient on some preprocessors.  + It is not intended to be used directly with the invocation of macros with a _D suffix such as: +
+ BOOST_PP_ADD_D(BOOST_PP_DEDUCE_D(), x, y) +
+ If it is used in this context, the _D macro will fail.  + The _D macros directly concatenate to the d parameter that is passed to them, + which would prevent BOOST_PP_DEDUCE_D() from expanding.  + Furthermore, it is pointless to use this macro in a situation such as this + because it would already be too late to gain any efficiency. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/add.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/control/deduce_d.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define RANGE(first, last) \
+   BOOST_PP_REPEAT( \
+      BOOST_PP_INC( \
+         BOOST_PP_SUB(last, first) \
+      , \
+      RANGE_M, \
+      (first, BOOST_PP_DEDUCE_D()) \
+   ) \
+   /**/
+
+#define RANGE_M(z, n, data) \
+   RANGE_M_2( \
+      n, \
+      BOOST_PP_TUPLE_ELEM(2, 0, data), \
+      BOOST_PP_TUPLE_ELEM(2, 1, data) \
+   ) \
+   /**/
+
+#define RANGE_M_2(n, first, d) \
+   BOOST_PP_COMMA_IF(n) BOOST_PP_ADD_D(d, n, first) \
+   /**/
+
+RANGE(5, 10) // expands to 5, 6, 7, 8, 9, 10
+
+ + diff --git a/doc/ref/deduce_r.html b/doc/ref/deduce_r.html new file mode 100644 index 0000000..370f98a --- /dev/null +++ b/doc/ref/deduce_r.html @@ -0,0 +1,37 @@ + + + BOOST_PP_DEDUCE_R + + + +
+ The BOOST_PP_DEDUCE_R macro manually deduces the state of the BOOST_PP_FOR construct. +
+

Usage

+
+ BOOST_PP_DEDUCE_R() +
+

Remarks

+
+ This macro is intended to avoid the use of automatic-recursion at deep expansion depths.  + Automatic-recursion at such depths can be inefficient on some preprocessors.  + It is not intended to be used directly with the invocation of macros with a _R suffix such as: +
+ BOOST_PP_LIST_ENUM_R(BOOST_PP_DEDUCE_R(), (a, (b, (c, BOOST_PP_NIL)))) +
+ If it is used in this context, the _R macro will fail.  + The _R macros directly concatenate to the r parameter that is passed to them, + which would prevent BOOST_PP_DEDUCE_R() from expanding.  + Furthermore, it is pointless to use this macro in a situation such as this + because it would already be too late to gain any efficiency. +
+

See Also

+ +

Requirements

+ + + diff --git a/doc/ref/deduce_z.html b/doc/ref/deduce_z.html new file mode 100644 index 0000000..8078306 --- /dev/null +++ b/doc/ref/deduce_z.html @@ -0,0 +1,37 @@ + + + BOOST_PP_DEDUCE_Z + + + +
+ The BOOST_PP_DEDUCE_Z macro manually deduces the state of the BOOST_PP_REPEAT construct. +
+

Usage

+
+ BOOST_PP_DEDUCE_Z() +
+

Remarks

+
+ This macro is intended to avoid the use of automatic-recursion at deep expansion depths.  + Automatic-recursion at such depths can be inefficient on some preprocessors.  + It is not intended to be used directly with the invocation of macros with a _Z suffix such as: +
+ BOOST_PP_ENUM_PARAMS_Z(BOOST_PP_DEDUCE_Z(), (a, (b, (c, BOOST_PP_NIL)))) +
+ If it is used in this context, the _Z macro will fail.  + The _Z macros directly concatenate to the r parameter that is passed to them, + which would prevent BOOST_PP_DEDUCE_Z() from expanding.  + Furthermore, it is pointless to use this macro in a situation such as this + because it would already be too late to gain any efficiency. +
+

See Also

+ +

Requirements

+ + + diff --git a/doc/ref/div.html b/doc/ref/div.html new file mode 100644 index 0000000..c182019 --- /dev/null +++ b/doc/ref/div.html @@ -0,0 +1,52 @@ + + + BOOST_PP_DIV + + + +
+ The BOOST_PP_DIV macro expands to the quotient of its arguments. +
+

Usage

+
+ BOOST_PP_DIV(x, y) +
+

Arguments

+
+
x
+
+ The dividend (numerator) of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The divisor (denominator) of the operation.  + Valid values range from 1 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_DIV_D in such a situation. +
+
+ If y is 0, the result is undefined. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/div.hpp>
+
+BOOST_PP_DIV(11, 5) // expands to 2
+
+ + diff --git a/doc/ref/div_d.html b/doc/ref/div_d.html new file mode 100644 index 0000000..283a5bf --- /dev/null +++ b/doc/ref/div_d.html @@ -0,0 +1,74 @@ + + + BOOST_PP_DIV_D + + + +
+ The BOOST_PP_DIV_D macro expands to the quotient of its second and third arguments.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_DIV_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The dividend (numerator) of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The divisor (denominator) of the operation.  + Valid values range from 1 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If y is 0, the result is undefined. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/arithmetic/div.hpp>
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define PRED(d, data) BOOST_PP_TUPLE_ELEM(2, 0, data)
+
+#define OP(d, data) \
+   ( \
+      BOOST_PP_DEC( \
+         BOOST_PP_TUPLE_ELEM(2, 0, data) \
+      ), \
+      BOOST_PP_DIV_D( \
+         d, \
+         BOOST_PP_TUPLE_ELEM(2, 1, data), \
+         2 \
+      ) \
+   ) \
+   /**/
+
+// halve 'x' 'n' times
+#define HALVE(x, n) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_WHILE(PRED, OP, (n, x)))
+
+HALVE(8, 2) // expands to 2
+HALVE(16, 1) // expands to 8
+
+ + diff --git a/doc/ref/empty.html b/doc/ref/empty.html new file mode 100644 index 0000000..48e8dbe --- /dev/null +++ b/doc/ref/empty.html @@ -0,0 +1,36 @@ + + + BOOST_PP_EMPTY + + + + +
+ The BOOST_PP_EMPTY macro is a nullary utility macro that expands to nothing. +
+

Usage

+
+ BOOST_PP_EMPTY() +
+

Remarks

+
+ This macro is helps avoid inefficient macro-expansion.  + It is primarily useful as arguments to BOOST_PP_IF or BOOST_PP_IIF. +
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+
+#define X() result
+#define MACRO(c) BOOST_PP_IF(c, X, BOOST_PP_EMPTY)()
+
+MACRO(0) // expands to nothing
+MACRO(1) // expands to result
+
+ + diff --git a/doc/ref/enum.html b/doc/ref/enum.html new file mode 100644 index 0000000..d5941a0 --- /dev/null +++ b/doc/ref/enum.html @@ -0,0 +1,69 @@ + + + BOOST_PP_ENUM + + + +
+ The BOOST_PP_ENUM macro generates a comma-separated list. +
+

Usage

+
+ BOOST_PP_ENUM(count, macro, data) +
+

Arguments

+
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_ENUM with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ macro(z, 0, data), macro(z, 1, data), ... macro(z, count - 1, data) +
+
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_ENUM_z. +
+
+ Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  + This limitation no longer exists, as the library can automatically detect the next available repetition depth. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum.hpp>
+
+#define TEXT(z, n, text) text
+
+BOOST_PP_ENUM(4, TEXT, class) // expands to class, class, class, class
+
+ + diff --git a/doc/ref/enum_binary_params.html b/doc/ref/enum_binary_params.html new file mode 100644 index 0000000..01fae48 --- /dev/null +++ b/doc/ref/enum_binary_params.html @@ -0,0 +1,65 @@ + + + BOOST_PP_ENUM_BINARY_PARAMS + + + +
+ The BOOST_PP_ENUM_BINARY_PARAMS macro generates a comma-separated list of binary parameters. +
+

Usage

+
+ BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) +
+

Arguments

+
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
p1
+
+ The text of the first part of the parameter.  + BOOST_PP_ENUM_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
p2
+
+ The text of the first part of the parameter.  + BOOST_PP_ENUM_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ p1 ## 0 p2 ## 0, p1 ## 1 p2 ## 1, ... p1 ## count - 1 p2 ## count - 1 +
+
+
+ To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_BINARY_PARAMS_Z. +
+
+ This macro is a replacement for both BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT and BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+BOOST_PP_ENUM_BINARY_PARAMS(3, T, p) // expands to T0 p0, T1 p1, T2 p2
+
+ + diff --git a/doc/ref/enum_binary_params_z.html b/doc/ref/enum_binary_params_z.html new file mode 100644 index 0000000..dcb95c0 --- /dev/null +++ b/doc/ref/enum_binary_params_z.html @@ -0,0 +1,82 @@ + + + BOOST_PP_ENUM_BINARY_PARAMS_Z + + + +
+ The BOOST_PP_ENUM_BINARY_PARAMS_Z macro generates a comma-separated list of binary parameters.  + It reenters BOOST_PP_REPEAT with maximum efficiency. +
+

Usage

+
+ BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
p1
+
+ The text of the first part of the parameter.  + BOOST_PP_ENUM_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
p2
+
+ The text of the first part of the parameter.  + BOOST_PP_ENUM_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ p1 ## 0 p2 ## 0, p1 ## 1 p2 ## 1, ... p1 ## count - 1 p2 ## count - 1 +
+
+
+ This macro is a replacement for both BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT and BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+#define FUNCTION(z, n, _) \
+   template<BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(n), class T)> \
+   void f(BOOST_PP_ENUM_BINARY_PARAMS_Z(z, BOOST_PP_INC(n), T, p)) { \
+      /* ... */ \
+   } \
+   /**/
+
+BOOST_PP_REPEAT(2, FUNCTION, nil)
+/*
+   expands to...
+
+   template<class T0> void f(T0 p0) { }
+   template<class T0, class T1> void f(T0 p0, T1 p1) { }
+*/
+
+ + diff --git a/doc/ref/enum_params.html b/doc/ref/enum_params.html new file mode 100644 index 0000000..af24b40 --- /dev/null +++ b/doc/ref/enum_params.html @@ -0,0 +1,58 @@ + + + BOOST_PP_ENUM_PARAMS + + + +
+ The BOOST_PP_ENUM_PARAMS macro generates a comma-separated list of parameters. +
+

Usage

+
+ BOOST_PP_ENUM_PARAMS(count, param) +
+

Arguments

+
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
param
+
+ The text of the parameter.  + BOOST_PP_ENUM_PARAMS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ param ## 0, param ## 1, ... param ## count - 1 +
+
+
+ To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_PARAMS_Z. +
+
+ Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  + This limitation no longer exists, as the library can automatically detect the next available repetition depth. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+BOOST_PP_ENUM_PARAMS(3, class T) // expands to class T0, class T1, class T2
+
+ + diff --git a/doc/ref/enum_params_with_a_default.html b/doc/ref/enum_params_with_a_default.html new file mode 100644 index 0000000..e46a3c7 --- /dev/null +++ b/doc/ref/enum_params_with_a_default.html @@ -0,0 +1,72 @@ + + + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT + + + +
+ The BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT macro generates a comma-separated list of parameters with a default argument. +
+

Usage

+
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(count, param, def) +
+

Arguments

+
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
param
+
+ The text of the parameter.  + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
def
+
+ The default value that trails each parameter. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ param ## 0 = def, param ## 1 = def, ... param ## count - 1 = def +
+
+
+ Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  + This limitation no longer exists, as the library can automatically detect the next available repetition depth. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_ENUM_BINARY_PARAMS with BOOST_PP_INTERCEPT instead: +
+ BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def BOOST_PP_INTERCEPT) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(3, class T, int)
+   // expands to T0 = int, T1 = int, T2 = int
+
+BOOST_PP_ENUM_BINARY_PARAMS(3, class T, = int BOOST_PP_INTERCEPT)
+   // expands to T0 = int, T1 = int, T2 = int
+
+ + diff --git a/doc/ref/enum_params_with_defaults.html b/doc/ref/enum_params_with_defaults.html new file mode 100644 index 0000000..334e7ec --- /dev/null +++ b/doc/ref/enum_params_with_defaults.html @@ -0,0 +1,73 @@ + + + BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS + + + +
+ The BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS macro generates a comma-separated list of parameters with default arguments. +
+

Usage

+
+ BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(count, param, def) +
+

Arguments

+
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
param
+
+ The text of the parameter.  + BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
def
+
+ The default value that trails each parameter. + BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS concatenates numbers ranging from 0 to count - 1 + to generate default arguments. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ param ## 0 = def ## 0, param ## 1 = def ## 1, ... param ## count - 1 = def ## count - 1 +
+
+
+ Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  + This limitation no longer exists, as the library can automatically detect the next available repetition depth. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_ENUM_BINARY_PARAMS instead: +
+ BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_params_with_defaults.hpp>
+
+BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(3, class T, U)
+   // expands to T0 = U0, T1 = U1, T2 = U2
+
+BOOST_PP_ENUM_BINARY_PARAMS(3, class T, = U)
+   // expands to T0 = U0, T1 = U1, T2 = U2
+
+ + diff --git a/doc/ref/enum_params_z.html b/doc/ref/enum_params_z.html new file mode 100644 index 0000000..c065e33 --- /dev/null +++ b/doc/ref/enum_params_z.html @@ -0,0 +1,71 @@ + + + BOOST_PP_ENUM_PARAMS_Z + + + +
+ The BOOST_PP_ENUM_PARAMS_Z macro generates a comma-separated list of parameters.  + It reenters BOOST_PP_REPEAT with maximum efficiency. +
+

Usage

+
+ BOOST_PP_ENUM_PARAMS_Z(z, count, param) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
param
+
+ The text of the parameter.  + BOOST_PP_ENUM_PARAMS_Z concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ param ## 0, param ## 1, ... param ## count - 1 +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define MACRO(z, n, _) \
+   template< \
+      BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(n), class T) \
+   > class X ## n { \
+      /* ... */ \
+   }; \
+   /**/
+
+BOOST_PP_REPEAT(2, MACRO, nil)
+/*
+   expands to...
+   template<class T0> class X0 { };
+   template<class T0, class T1> class X1 { };
+*/
+
+ + diff --git a/doc/ref/enum_shifted.html b/doc/ref/enum_shifted.html new file mode 100644 index 0000000..a44a929 --- /dev/null +++ b/doc/ref/enum_shifted.html @@ -0,0 +1,71 @@ + + + BOOST_PP_ENUM_SHIFTED + + + +
+ The BOOST_PP_ENUM_SHIFTED macro generates a comma-separated, shifted list. +
+

Usage

+
+ BOOST_PP_ENUM_SHIFTED(count, macro, data) +
+

Arguments

+
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_ENUM_SHIFTED with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ macro(z, 1, data), ... macro(z, count - 1, data) +
+
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_ENUM_SHIFTED_z. +
+
+ Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  + This limitation no longer exists, as the library can automatically detect the next available repetition depth. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+
+#define TYPE(z, n, type) type
+
+BOOST_PP_ENUM(5, TYPE, int) // expands to int, int, int, int, int
+BOOST_PP_ENUM_SHIFTED(5, TYPE, int) // expands to int, int, int, int
+
+ + diff --git a/doc/ref/enum_shifted_params.html b/doc/ref/enum_shifted_params.html new file mode 100644 index 0000000..03d921c --- /dev/null +++ b/doc/ref/enum_shifted_params.html @@ -0,0 +1,62 @@ + + + BOOST_PP_ENUM_SHIFTED_PARAMS + + + +
+ The BOOST_PP_ENUM_SHIFTED_PARAMS macro generates a comma-separated, shifted list of parameters. +
+

Usage

+
+ BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) +
+

Arguments

+
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
param
+
+ The text of the parameter.  + BOOST_PP_ENUM_SHIFTED_PARAMS concatenates numbers ranging from 1 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ param ## 1, ... param ## count - 1 +
+
+
+ This macro facilitates a typical usage of the library.  + Shifted parameter lists are common in template metaprograms. +
+
+ To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_SHIFTED_PARAMS_Z. +
+
+ Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  + This limitation no longer exists, as the library can automatically detect the next available repetition depth. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+BOOST_PP_ENUM_SHIFTED_PARAMS(3, class T) // expands to class T1, class T2
+
+ + diff --git a/doc/ref/enum_shifted_params_z.html b/doc/ref/enum_shifted_params_z.html new file mode 100644 index 0000000..3750336 --- /dev/null +++ b/doc/ref/enum_shifted_params_z.html @@ -0,0 +1,68 @@ + + + BOOST_PP_ENUM_SHIFTED_PARAMS_Z + + + +
+ The BOOST_PP_ENUM_SHIFTED_PARAMS_Z macro generates a comma-separated, shifted list of parameters.  + It reenters BOOST_PP_REPEAT with maximum efficiency. +
+

Usage

+
+ BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
param
+
+ The text of the parameter.  + BOOST_PP_ENUM_SHIFTED_PARAMS_Z concatenates numbers ranging from 1 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ param ## 1, ... param ## count - 1 +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+int add(void) {
+   return 0;
+}
+
+#define ADD_F(z, n, _) \
+   int add_f(BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(n), int p)) { \
+      return p0 + add_f(BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, BOOST_PP_INC(n), p)); \
+   } \
+   /**/
+
+BOOST_PP_REPEAT(5, ADD_F, nil)
+
+ + diff --git a/doc/ref/enum_shifted_z.html b/doc/ref/enum_shifted_z.html new file mode 100644 index 0000000..12e605c --- /dev/null +++ b/doc/ref/enum_shifted_z.html @@ -0,0 +1,82 @@ + + + BOOST_PP_ENUM_SHIFTED_z + + + +
+ The BOOST_PP_ENUM_SHIFTED_z macro represents a reentry into the BOOST_PP_ENUM_SHIFTED repetition construct. +
+

Usage

+
+ BOOST_PP_ENUM_SHIFTED_ ## z(count, macro, data) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_ENUM_SHIFTED with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, 1, data), ... macro(z, count - 1, data) +
+
+
+ At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  + This happens when the z value is a macro invocation itself.  + It needs a delay to allow it to expand.  + The syntax in such a scenario becomes: +
+ BOOST_PP_CAT(BOOST_PP_ENUM_SHIFTED_, z)(count, macro, data). +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define TEXT(z, n, text) text
+
+#define MACRO(z, n, data) \
+   ( \
+      BOOST_PP_ENUM_SHIFTED_ ## z( \
+         BOOST_PP_INC(n), \
+         TEXT, data \
+      ) \
+   ) \
+   /**/
+
+BOOST_PP_REPEAT(3, MACRO, class) // expands to () (class) (class, class)
+
+ + diff --git a/doc/ref/enum_trailing.html b/doc/ref/enum_trailing.html new file mode 100644 index 0000000..9346a2a --- /dev/null +++ b/doc/ref/enum_trailing.html @@ -0,0 +1,72 @@ + + + BOOST_PP_ENUM_TRAILING + + + +
+ The BOOST_PP_ENUM_TRAILING macro generates a comma-separated list with a leading comma. +
+

Usage

+
+ BOOST_PP_ENUM_TRAILING(count, macro, data) +
+

Arguments

+
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_ENUM with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ , macro(z, 0, data), macro(z, 1, data), ... macro(z, count - 1, data) +
+
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_ENUM_TRAILING_z. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_trailing.hpp>
+
+#define TEXT(z, n, text) text
+
+template<class BOOST_PP_ENUM_TRAILING(3, TEXT, class)>
+class X { };
+/*
+   expands to...
+
+template<class, class, class, class>
+class X { };
+*/
+
+ + diff --git a/doc/ref/enum_trailing_binary_params.html b/doc/ref/enum_trailing_binary_params.html new file mode 100644 index 0000000..5c871f0 --- /dev/null +++ b/doc/ref/enum_trailing_binary_params.html @@ -0,0 +1,72 @@ + + + BOOST_PP_ENUM_TRAILING_BINARY_PARAMS + + + +
+ The BOOST_PP_ENUM_TRAILING_BINARY_PARAMS macro generates a comma-separated list of binary parameters with a leading comma. +
+

Usage

+
+ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(count, p1, p2) +
+

Arguments

+
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
p1
+
+ The text of the first part of the parameter.  + BOOST_PP_ENUM_TRAILING_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
p2
+
+ The text of the first part of the parameter.  + BOOST_PP_ENUM_TRAILING_BINARY_PARAMS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ , p1 ## 0 p2 ## 0, p1 ## 1 p2 ## 1, ... p1 ## count - 1 p2 ## count - 1 +
+
+
+ To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/facilities/intercept.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
+
+template<class X BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(4, class A, = X BOOST_PP_INTERCEPT)>
+struct sample {
+   // ...
+};
+
+/* expands to...
+
+template<class X, class A0 = X, class A1 = X, class A2 = X, class A3 = X>
+struct sample {
+   // ...
+}
+*/
+
+ + diff --git a/doc/ref/enum_trailing_binary_params_z.html b/doc/ref/enum_trailing_binary_params_z.html new file mode 100644 index 0000000..ac9c88b --- /dev/null +++ b/doc/ref/enum_trailing_binary_params_z.html @@ -0,0 +1,56 @@ + + + BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z + + + +
+ The BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z macro generates a comma-separated list of binary parameters with a leading comma.  + It reenters BOOST_PP_REPEAT with maximum efficiency. +
+

Usage

+
+ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(z, count, p1, p2) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
p1
+
+ The text of the first part of the parameter.  + BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
p2
+
+ The text of the first part of the parameter.  + BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ , p1 ## 0 p2 ## 0, p1 ## 1 p2 ## 1, ... p1 ## count - 1 p2 ## count - 1 +
+
+

See Also

+ +

Requirements

+ + + diff --git a/doc/ref/enum_trailing_params.html b/doc/ref/enum_trailing_params.html new file mode 100644 index 0000000..ce3449b --- /dev/null +++ b/doc/ref/enum_trailing_params.html @@ -0,0 +1,55 @@ + + + BOOST_PP_ENUM_TRAILING_PARAMS + + + +
+ The BOOST_PP_ENUM_TRAILING_PARAMS macro generates a comma-separated list of parameters with a leading comma. +
+

Usage

+
+ BOOST_PP_ENUM_TRAILING_PARAMS(count, param) +
+

Arguments

+
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
param
+
+ The text of the parameter.  + BOOST_PP_ENUM_TRAILING_PARAMS concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ , param ## 0, param ## 1, ... param ## count - 1 +
+
+
+ To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_TRAILING_PARAMS_Z. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+
+class X BOOST_PP_ENUM_TRAILING_PARAMS(2, class T)
+   // expands to class X, class T0, class T1, class T2
+
+ + diff --git a/doc/ref/enum_trailing_params_z.html b/doc/ref/enum_trailing_params_z.html new file mode 100644 index 0000000..129b2e2 --- /dev/null +++ b/doc/ref/enum_trailing_params_z.html @@ -0,0 +1,70 @@ + + + BOOST_PP_ENUM_TRAILING_PARAMS_Z + + + +
+ The BOOST_PP_ENUM_TRAILING_PARAMS_Z macro generates a comma-separated list of parameters with a leading comma.  + It reenters BOOST_PP_REPEAT with maximum efficiency. +
+

Usage

+
+ BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of parameters to generate.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
param
+
+ The text of the parameter.  + BOOST_PP_ENUM_TRAILING_PARAMS_Z concatenates numbers ranging from 0 to count - 1 + to generate parameters. +
+
+

Remarks

+
+ This macro expands to the comma-separated sequence: +
+ , param ## 0, param ## 1, ... param ## count - 1 +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define MACRO(z, n, _) \
+   template< \
+      class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, class T) \
+   > class X ## n { \
+      /* ... */ \
+   }; \
+   /**/
+
+BOOST_PP_REPEAT(2, MACRO, nil)
+/*
+   expands to...
+   template<class> class X0 { };
+   template<class, class T0> class X1 { };
+*/
+
+ + diff --git a/doc/ref/enum_trailing_z.html b/doc/ref/enum_trailing_z.html new file mode 100644 index 0000000..c49131f --- /dev/null +++ b/doc/ref/enum_trailing_z.html @@ -0,0 +1,85 @@ + + + BOOST_PP_ENUM_TRAILING_z + + + +
+ The BOOST_PP_ENUM_TRAILING_z macro represents a reentry into the BOOST_PP_ENUM_TRAILING repetition construct. +
+

Usage

+
+ BOOST_PP_ENUM_TRAILING_ ## z(count, macro, data) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_ENUM with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ , macro(z, 0, data), macro(z, 1, data), ... macro(z, count - 1, data) +
+
+
+ At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  + This happens when the z value is a macro invocation itself.  + It needs a delay to allow it to expand.  + The syntax in such a scenario becomes: +
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)(count, macro, data) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_trailing.hpp>
+
+#define TEXT(z, n, text) text
+
+#define TTP(z, n, _) \
+   template< \
+      class BOOST_PP_ENUM_TRAILING_ ## z(n, TEXT, class) \
+   > \
+   class T ## n \
+   /**/
+
+BOOST_PP_ENUM(3, TTP, nil)
+   /*
+      expands to...
+      template<class> class T0,
+      template<class, class> class T1,
+      template<class, class, class> class T2
+   */
+
+ + diff --git a/doc/ref/enum_z.html b/doc/ref/enum_z.html new file mode 100644 index 0000000..9140126 --- /dev/null +++ b/doc/ref/enum_z.html @@ -0,0 +1,85 @@ + + + BOOST_PP_ENUM_z + + + +
+ The BOOST_PP_ENUM_z macro represents a reentry into the BOOST_PP_ENUM repetition construct. +
+

Usage

+
+ BOOST_PP_ENUM_ ## z(count, macro, data) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_ENUM with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, 0, data), macro(z, 1, data), ... macro(z, count - 1, data) +
+
+
+ At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  + This happens when the z value is a macro invocation itself.  + It needs a delay to allow it to expand.  + The syntax in such a scenario becomes: +
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)(count, macro, data) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+
+#define TEXT(z, n, text) text
+
+#define TTP(z, n, _) \
+   template< \
+      BOOST_PP_ENUM_ ## z(BOOST_PP_INC(n), TEXT, class) \
+   > \
+   class T ## n \
+   /**/
+
+BOOST_PP_ENUM(3, TTP, nil)
+   /*
+      expands to...
+      template<class> class T0,
+      template<class, class> class T1,
+      template<class, class, class> class T2
+   */
+
+ + diff --git a/doc/ref/equal.html b/doc/ref/equal.html new file mode 100644 index 0000000..87eb6ee --- /dev/null +++ b/doc/ref/equal.html @@ -0,0 +1,53 @@ + + + BOOST_PP_EQUAL + + + +
+ The BOOST_PP_EQUAL macro compares two values for equality. +
+

Usage

+
+ BOOST_PP_EQUAL(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is equal to y, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction because this macro no longer uses BOOST_PP_WHILE. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/equal.hpp>
+
+BOOST_PP_EQUAL(4, 3) // expands to 0
+BOOST_PP_EQUAL(5, 5) // expands to 1
+
+ + diff --git a/doc/ref/equal_d.html b/doc/ref/equal_d.html new file mode 100644 index 0000000..f2ae907 --- /dev/null +++ b/doc/ref/equal_d.html @@ -0,0 +1,58 @@ + + + BOOST_PP_EQUAL_D + + + +
+ The BOOST_PP_EQUAL_D macro compares two values for equality. +
+

Usage

+
+ BOOST_PP_EQUAL_D(d, x, y) +
+

Arguments

+
+
d
+
+ This argument is ignored. +
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is equal to y, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_EQUAL instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/equal.hpp>
+
+BOOST_PP_EQUAL_D(1, 4, 3) // expands to 0
+BOOST_PP_EQUAL_D(1, 5, 5) // expands to 1
+
+ + diff --git a/doc/ref/expand.html b/doc/ref/expand.html new file mode 100644 index 0000000..13d859c --- /dev/null +++ b/doc/ref/expand.html @@ -0,0 +1,56 @@ + + + BOOST_PP_EXPAND + + + +
+ The BOOST_PP_EXPAND macro performs a double macro-expansion on its argument. +
+

Usage

+
+ BOOST_PP_EXPAND(x) +
+

Arguments

+
+
x
+
+ The argument to be expanded twice. +
+
+

Remarks

+
+ This macro is useful when a delay is necessary to produce the correct semantics of a macro invocation.  + For example, when a macro expands to an argument list to another macro.  + This macro will expand the the argument list on the first pass, and then rescan to expand any more macros. +
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/facilities/expand.hpp>
+
+#define MACRO(a, b, c) (a)(b)(c)
+#define ARGS() (1, 2, 3)
+
+BOOST_PP_EXPAND(MACRO ARGS) // expands to (1)(2)(3)
+
+#define SAMPLE(n) \
+   BOOST_PP_EXPAND( \
+      MACRO, \
+      BOOST_PP_IF( \
+         n, \
+         (x, y, z), \
+         (a, b, c) \
+      ) \
+   ) \
+   /**/
+
+SAMPLE(0) // expands to (a)(b)(c)
+SAMPLE(1) // expands to (x)(y)(z)
+
+ + diff --git a/doc/ref/expr_if.html b/doc/ref/expr_if.html new file mode 100644 index 0000000..e9ab9e1 --- /dev/null +++ b/doc/ref/expr_if.html @@ -0,0 +1,59 @@ + + + BOOST_PP_EXPR_IF + + + +
+ The BOOST_PP_EXPR_IF macro expands to its second argument if its first argument is non-zero or expands to nothing otherwise. +
+

Usage

+
+ BOOST_PP_EXPR_IF(cond, expr) +
+

Arguments

+
+
cond
+
+ The condition that determines if the result is expr or nothing.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
expr
+
+ The result of the expansion if cond is non-zero. +
+
+

Remarks

+
+ This macro performs a boolean conversion on its first argument.  + If that conversion is unnecessary, use BOOST_PP_EXPR_IIF instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/control/expr_if.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define CV(n) \
+   BOOST_PP_EXPR_IF( \
+      n, \
+      BOOST_PP_TUPLE_ELEM( \
+         4, n, \
+         (..., const, volatile, const volatile) \
+      ) \
+   ) \
+   /**/
+
+CV(0) // expands to nothing
+CV(1) // expands to const
+
+ + diff --git a/doc/ref/expr_iif.html b/doc/ref/expr_iif.html new file mode 100644 index 0000000..dc4653d --- /dev/null +++ b/doc/ref/expr_iif.html @@ -0,0 +1,56 @@ + + + BOOST_PP_EXPR_IIF + + + +
+ The BOOST_PP_EXPR_IIF macro expands to its second argument if its first argument is 1 and expands to nothing if its first argument is 0. +
+

Usage

+
+ BOOST_PP_EXPR_IIF(bit, expr) +
+

Arguments

+
+
bit
+
+ The condition that determines if the result is expr or nothing.  + This value must expand to 0 or 1. +
+
expr
+
+ The result of the expansion if bit is 1. +
+
+

Remarks

+
+ This macro does not perform a boolean conversion on its first argument.  + If that conversion is necessary, use BOOST_PP_EXPR_IF instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/and.hpp>
+#include <boost/preprocessor/control/expr_iif.hpp>
+
+#define INSERT_AND(p, q, text) \
+   BOOST_PP_EXPR_IIF( \
+      BOOST_PP_AND(p, q), \
+      text \
+   ) \
+   /**/
+
+INSERT_AND(2, 3, abc) // expands to abc
+INSERT_AND(0, 7, xyz) // expands to nothing
+
+ + diff --git a/doc/ref/filename_x.html b/doc/ref/filename_x.html new file mode 100644 index 0000000..c7dcb1f --- /dev/null +++ b/doc/ref/filename_x.html @@ -0,0 +1,41 @@ + + + BOOST_PP_FILENAME_x + + + +
+ The BOOST_PP_FILENAME_x macro is a user-defined named external argument used by BOOST_PP_ITERATE.  + It denotes the file to be iterated over. +
+

Usage

+
+ #define BOOST_PP_FILENAME_x filename +
+

Arguments

+
+
x
+
+ The iteration depth of the next file-iteration.  + This value must be the current iteration depth + 1. +
+
filename
+
+ A quoted or angle-bracketed filename to used as the target of a file-iteration. +
+
+

Remarks

+
+ This macro is part of the secondary method of passing arguments to BOOST_PP_ITERATE.  + The other part is BOOST_PP_ITERATION_LIMITS. +
+
+ This macro is automatically undefined for reuse by a call to BOOST_PP_ITERATE. +
+

See Also

+ + + diff --git a/doc/ref/for.html b/doc/ref/for.html new file mode 100644 index 0000000..2f88afc --- /dev/null +++ b/doc/ref/for.html @@ -0,0 +1,94 @@ + + + BOOST_PP_FOR + + + +
+ The BOOST_PP_FOR macro represents a generalized horizontal repetition construct. +
+

Usage

+
+ BOOST_PP_FOR(state, pred, op, macro) +
+

Arguments

+
+
state
+
+ The initial state. +
+
pred
+
+ A binary predicate of the form pred(r, state).  + This macro must expand to an integer in the range of 0 to BOOST_PP_LIMIT_MAG.  + BOOST_PP_FOR repeatedly expands macro while this predicate returns non-zero.  + This macro is called with the next available BOOST_PP_FOR repetition and the current state. +
+
op
+
+ A binary operation of the form op(r, state).  + This operation is expanded by BOOST_PP_FOR with the next available BOOST_PP_FOR repetition and the current state.  + This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. +
+
macro
+
+ A binary macro of the form macro(r, state).  + This macro is expanded by BOOST_PP_FOR with the next available BOOST_PP_FOR repetition and the current state.  + This macro is is repeated by BOOST_PP_FOR until pred returns 0. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(r, state) macro(r, op(r, state)) ... macro(r, op(r, ... op(r, state) ... )) +
+
+
+ The r value that is passed to pred, op, and macro represents the next available BOOST_PP_FOR repetition.  + Other macros that have _R suffix variants internally use BOOST_PP_FOR--for example, BOOST_PP_LIST_FOR_EACH and BOOST_PP_LIST_FOR_EACH_R.  + Using these _R versions is not strictly necessary, but passing the r value (that is passed to pred, op, and macro) to these macros allows them to reenter BOOST_PP_FOR with maximum efficiency. +
+
+ To directly use this r value, rather than simply passing it to another macro, see BOOST_PP_FOR_r. +
+
+ Previously, this macro could not be used recursively inside BOOST_PP_FOR.  + This limitation no longer exists, as the library can automatically detect the next available BOOST_PP_FOR repetition. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/comparison/not_equal.hpp>
+#include <boost/preprocessor/repetition/for.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define PRED(r, state) \
+   BOOST_PP_NOT_EQUAL( \
+      BOOST_PP_TUPLE_ELEM(2, 0, state), \
+      BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2, 1, state)) \
+   ) \
+   /**/
+
+#define OP(r, state) \
+   ( \
+      BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2, 0, state)), \
+      BOOST_PP_TUPLE_ELEM(2, 1, state) \
+   ) \
+   /**/
+
+#define MACRO(r, state) BOOST_PP_TUPLE_ELEM(2, 0, state)
+
+BOOST_PP_FOR((5, 10), PRED, OP, MACRO) // expands to 5 6 7 8 9 10
+
+ + diff --git a/doc/ref/for_r.html b/doc/ref/for_r.html new file mode 100644 index 0000000..0a3f1f0 --- /dev/null +++ b/doc/ref/for_r.html @@ -0,0 +1,144 @@ + + + BOOST_PP_FOR_r + + + +
+ The BOOST_PP_FOR_r macro represents a reentry into the BOOST_PP_FOR repetition construct. +
+

Usage

+
+ BOOST_PP_FOR_ ## r(state, pred, op, macro) +
+

Arguments

+
+
r
+
+ The next available BOOST_PP_FOR repetition. +
+
state
+
+ The initial state. +
+
pred
+
+ A binary predicate of the form pred(r, state).  + This macro must expand to an integer in the range of 0 to BOOST_PP_LIMIT_MAG.  + BOOST_PP_FOR repeatedly expands macro while this predicate returns non-zero.  + This macro is called with the next available BOOST_PP_FOR repetition and the current state. +
+
op
+
+ A binary operation of the form op(r, state).  + This operation is expanded by BOOST_PP_FOR with the next available BOOST_PP_FOR repetition and the current state.  + This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. +
+
macro
+
+ A binary macro of the form macro(r, state).  + This macro is expanded by BOOST_PP_FOR with the next available BOOST_PP_FOR repetition and the current state.  + This macro is is repeated by BOOST_PP_FOR until pred returns 0. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(r, state) macro(r, op(r, state)) ... macro(r, op(r, ... op(r, state) ... )) +
+
+
+ At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  + This happens when the r value is a macro invocation itself.  + It needs a delay to allow it to expand.  + The syntax in such a scenario becomes: +
+ BOOST_PP_CAT(BOOST_PP_FOR_, r)(state, pred, op, macro) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/comparison/not_equal.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/repetition/for.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define PRED(r, state) \
+   BOOST_PP_NOT_EQUAL( \
+      BOOST_PP_TUPLE_ELEM(4, 0, state), \
+      BOOST_PP_INC( \
+         BOOST_PP_TUPLE_ELEM(4, 1, state) \
+      ) \
+   ) \
+   /**/
+
+#define OP(r, state) \
+   ( \
+      BOOST_PP_INC( \
+         BOOST_PP_TUPLE_ELEM(4, 0, state) \
+      ), \
+      BOOST_PP_TUPLE_ELEM(4, 1, state), \
+      BOOST_PP_TUPLE_ELEM(4, 2, state), \
+      BOOST_PP_INC( \
+         BOOST_PP_TUPLE_ELEM(4, 3, state) \
+      ) \
+   ) \
+   /**/
+
+#define MACRO(r, state) \
+   BOOST_PP_COMMA_IF( \
+      BOOST_PP_TUPLE_ELEM(4, 3, state) \
+   ) template< \
+      BOOST_PP_FOR_ ## r( \
+         (0, BOOST_PP_TUPLE_ELEM(4, 0, state), _, 0), \
+         PRED_2, OP, MACRO_2 \
+      ) \
+   > class BOOST_PP_CAT( \
+      BOOST_PP_TUPLE_ELEM(4, 2, state), \
+      BOOST_PP_TUPLE_ELEM(4, 0, state) \
+   ) \
+   /**/
+
+#define PRED_2(r, state) \
+   BOOST_PP_NOT_EQUAL( \
+      BOOST_PP_TUPLE_ELEM(4, 0, state), \
+      BOOST_PP_TUPLE_ELEM(4, 1, state) \
+   ) \
+   /**/
+
+#define MACRO_2(r, state) \
+   BOOST_PP_COMMA_IF( \
+      BOOST_PP_TUPLE_ELEM(4, 0, state) \
+   ) class \
+   /**/
+
+#define TEMPLATE_TEMPLATE(low, high, name) \
+   BOOST_PP_FOR( \
+      (low, high, name, 0), \
+      PRED, OP, MACRO \
+   ) \
+   /**/
+
+TEMPLATE_TEMPLATE(2, 4, T)
+/*
+   expands to...
+   template<class, class> class T2,
+   template<class, class, class> class T3,
+   template<class, class, class, class> class T4
+*/
+
+ + diff --git a/doc/ref/frame_finish.html b/doc/ref/frame_finish.html new file mode 100644 index 0000000..60fb6ee --- /dev/null +++ b/doc/ref/frame_finish.html @@ -0,0 +1,31 @@ + + + BOOST_PP_FRAME_FINISH + + + +
+ The BOOST_PP_FRAME_FINISH macro expands to the upper bound of an absolute file-iteration depth. +
+

Usage

+
+ BOOST_PP_FRAME_FINISH(i) +
+

Arguments

+
+
i
+
+ The absolute depth of the frame whose upper bound is to be retreived.  + Valid values range from 1 to BOOST_PP_ITERATION_DEPTH(). +
+
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+

Requirements

+ + + diff --git a/doc/ref/frame_flags.html b/doc/ref/frame_flags.html new file mode 100644 index 0000000..1024f6d --- /dev/null +++ b/doc/ref/frame_flags.html @@ -0,0 +1,31 @@ + + + BOOST_PP_FRAME_FLAGS + + + +
+ The BOOST_PP_FRAME_FLAGS macro expands to the flags associated with an absolute file-iteration depth. +
+

Usage

+
+ BOOST_PP_FRAME_FLAGS(i) +
+

Arguments

+
+
i
+
+ The absolute depth of the frame whose flags are to be retreived.  + Valid values range from 1 to BOOST_PP_ITERATION_DEPTH(). +
+
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+

Requirements

+ + + diff --git a/doc/ref/frame_iteration.html b/doc/ref/frame_iteration.html new file mode 100644 index 0000000..d73fff0 --- /dev/null +++ b/doc/ref/frame_iteration.html @@ -0,0 +1,62 @@ + + + BOOST_PP_FRAME_ITERATION + + + +
+ The BOOST_PP_FRAME_ITERATION macro expands to the iteration value of an absolute file-iteration depth. +
+

Usage

+
+ BOOST_PP_FRAME_ITERATION(i) +
+

Arguments

+
+
i
+
+ The absolute depth of the frame whose iteration value is to be retreived.  + Valid values range from 1 to BOOST_PP_ITERATION_DEPTH(). +
+
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
+   #include BOOST_PP_ITERATE()
+
+   #endif
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+   --
+   #define BOOST_PP_ITERATION_PARAMS_2 \
+      (3, (1, BOOST_PP_ITERATION(), "file.h"))   \
+      /**/
+
+   #include BOOST_PP_ITERATE()
+
+#else
+
+   outer: BOOST_PP_FRAME_ITERATION(1)
+   inner: BOOST_PP_FRAME_ITERATION(2)
+
+#endif
+
+ + diff --git a/doc/ref/frame_start.html b/doc/ref/frame_start.html new file mode 100644 index 0000000..5e67299 --- /dev/null +++ b/doc/ref/frame_start.html @@ -0,0 +1,31 @@ + + + BOOST_PP_FRAME_START + + + +
+ The BOOST_PP_FRAME_START macro expands to the lower bound of an absolute file-iteration depth. +
+

Usage

+
+ BOOST_PP_FRAME_START(i) +
+

Arguments

+
+
i
+
+ The absolute depth of the frame whose lower bound is to be retreived.  + Valid values range from 1 to BOOST_PP_ITERATION_DEPTH(). +
+
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+

Requirements

+ + + diff --git a/doc/ref/greater.html b/doc/ref/greater.html new file mode 100644 index 0000000..6062256 --- /dev/null +++ b/doc/ref/greater.html @@ -0,0 +1,54 @@ + + + BOOST_PP_GREATER + + + +
+ The BOOST_PP_GREATER macro compares two values for greater magnitude. +
+

Usage

+
+ BOOST_PP_GREATER(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is greater than y, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_GREATER_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/greater.hpp>
+
+BOOST_PP_GREATER(4, 3) // expands to 1
+BOOST_PP_GREATER(5, 5) // expands to 0
+
+ + diff --git a/doc/ref/greater_d.html b/doc/ref/greater_d.html new file mode 100644 index 0000000..59cadc2 --- /dev/null +++ b/doc/ref/greater_d.html @@ -0,0 +1,58 @@ + + + BOOST_PP_GREATER_D + + + +
+ The BOOST_PP_GREATER_D macro compares two values for greater magnitude.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_GREATER_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is greater than y, this macro expands to 1.  + Otherwise, it expands to 0. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/greater.hpp>
+#include <boost/preprocessor/list/filter.hpp>
+
+#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
+
+#define PRED(d, _, num) BOOST_PP_GREATER_D(d, num, 2)
+
+BOOST_PP_LIST_FILTER(PRED, nil, LIST) // expands to (3, (4, (5, BOOST_PP_NIL)))
+
+ + diff --git a/doc/ref/greater_equal.html b/doc/ref/greater_equal.html new file mode 100644 index 0000000..026d6b4 --- /dev/null +++ b/doc/ref/greater_equal.html @@ -0,0 +1,54 @@ + + + BOOST_PP_GREATER_EQUAL + + + +
+ The BOOST_PP_GREATER_EQUAL macro compares two values for equality or greater magnitude. +
+

Usage

+
+ BOOST_PP_GREATER_EQUAL(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is greater than or equal to y, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_GREATER_EQUAL_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/greater_equal.hpp>
+
+BOOST_PP_GREATER_EQUAL(4, 3) // expands to 1
+BOOST_PP_GREATER_EQUAL(5, 5) // expands to 1
+
+ + diff --git a/doc/ref/greater_equal_d.html b/doc/ref/greater_equal_d.html new file mode 100644 index 0000000..47e66e2 --- /dev/null +++ b/doc/ref/greater_equal_d.html @@ -0,0 +1,58 @@ + + + BOOST_PP_GREATER_EQUAL_D + + + +
+ The BOOST_PP_GREATER_EQUAL_D macro compares two values for equality or greater magnitude.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_GREATER_EQUAL_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is greater than or equal to y, this macro expands to 1.  + Otherwise, it expands to 0. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/greater_equal.hpp>
+#include <boost/preprocessor/list/filter.hpp>
+
+#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
+
+#define PRED(d, _, num) BOOST_PP_GREATER_EQUAL_D(d, num, 4)
+
+BOOST_PP_LIST_FILTER(PRED, nil, LIST) // expands to (4, (5, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/identity.html b/doc/ref/identity.html new file mode 100644 index 0000000..f73df30 --- /dev/null +++ b/doc/ref/identity.html @@ -0,0 +1,46 @@ + + + BOOST_PP_IDENTITY + + + +
+ The BOOST_PP_IDENTITY macro expands to its argument when invoked. +
+

Usage

+
+ BOOST_PP_IDENTITY(item)() +
+

Arguments

+
+
item
+
+ The result of the expansion. +
+
+

Remarks

+
+ This macro is designed to be used with BOOST_PP_IF and BOOST_PP_IIF when only one of the clauses needs to be invoked. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/facilities/identity.hpp>
+
+#define MACRO(n) BOOST_PP_IF(n, BOOST_PP_IDENTITY(x), BOOST_PP_EMPTY)()
+
+MACRO(0) // expands to nothing
+MACRO(1) // expands to x
+
+ + diff --git a/doc/ref/if.html b/doc/ref/if.html new file mode 100644 index 0000000..0819753 --- /dev/null +++ b/doc/ref/if.html @@ -0,0 +1,52 @@ + + + BOOST_PP_IF + + + +
+ The BOOST_PP_IF macro chooses between to values based on a logical condition. +
+

Usage

+
+ BOOST_PP_IF(cond, t, f) +
+

Arguments

+
+
cond
+
+ The condition that determines if the result is expr or nothing.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
t
+
+ The result of the expansion if cond is non-zero. +
+
f
+
+ The result of the expansion if cond is 0. +
+
+

Remarks

+
+ This macro performs a boolean conversion on its first argument.  + If that conversion is unnecessary, use BOOST_PP_IIF instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/control/if.hpp>
+
+BOOST_PP_IF(10, a, b) // expands to a
+BOOST_PP_IF(0, a, b) // expands to b
+
+ + diff --git a/doc/ref/iif.html b/doc/ref/iif.html new file mode 100644 index 0000000..3b6e796 --- /dev/null +++ b/doc/ref/iif.html @@ -0,0 +1,54 @@ + + + BOOST_PP_IIF + + + +
+ The BOOST_PP_IIF macro chooses between to values based on a bitwise condition. +
+

Usage

+
+ BOOST_PP_IIF(bit, t, f) +
+

Arguments

+
+
bit
+
+ The condition that determines if the result is expr or nothing.  + This value must expand to 0 or 1. +
+
t
+
+ The result of the expansion if bit is 1. +
+
f
+
+ The result of the expansion if bit is 0. +
+
+

Remarks

+
+ This macro does not perform a boolean conversion on its first argument.  + If that conversion is necessary, use BOOST_PP_IF instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/control/iif.hpp>
+
+#define OR_IF(p, q, t, f) BOOST_PP_IIF(BOOST_PP_OR(p, q), t, f)
+
+OR_IF(1, 0, abc, xyz) // expands to abc
+OF_IF(0, 0, abc, xyz) // expands to xyz
+
+ + diff --git a/doc/ref/inc.html b/doc/ref/inc.html new file mode 100644 index 0000000..521011a --- /dev/null +++ b/doc/ref/inc.html @@ -0,0 +1,43 @@ + + + BOOST_PP_INC + + + +
+ The BOOST_PP_INC macro expands to one more than its argument. +
+

Usage

+
+ BOOST_PP_INC(x) +
+

Arguments

+
+
x
+
+ The value to be incremented.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/inc.hpp>
+
+BOOST_PP_INC(BOOST_PP_INC(6)) // expands to 8
+BOOST_PP_INC(4) // expands to 5
+
+ + diff --git a/doc/ref/include_self.html b/doc/ref/include_self.html new file mode 100644 index 0000000..25053d9 --- /dev/null +++ b/doc/ref/include_self.html @@ -0,0 +1,90 @@ + + + BOOST_PP_INCLUDE_SELF + + + +
+ The BOOST_PP_INCLUDE_SELF macro includes a file indirectly. +
+

Usage

+
+ #include BOOST_PP_INCLUDE_SELF() +
+

Arguments

+
+
filename
+
+ A quoted or angle-bracketed filename to be included by BOOST_PP_INCLUDE_SELF. +
+
+

Remarks

+
+ BOOST_PP_INDIRECT_SELF must be defined prior to using this macro. +
+
+ Most preprocessors will not allow a file to directly include itself--even when the file protects itself from such a scenario.  + This macro, in combination with BOOST_PP_INDIRECT_SELF allows a file to include itself indirectly. +
+
+ While BOOST_PP_INDIRECT_SELF is being included, BOOST_PP_INCLUDE_SELF defines the macro BOOST_PP_IS_SELFISH to 1.  + When it returns from the inclusion, BOOST_PP_IS_SELFISH is undefined. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_SELFISH
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/self.hpp>
+
+   #define NAME X
+   struct NAME {
+      // ...
+      #define BOOST_PP_INDIRECT_SELF "file.h"
+      #include BOOST_PP_INCLUDE_SELF()
+   };
+
+   #define NAME Y
+   struct NAME {
+      // ...
+      #define BOOST_PP_INDIRECT_SELF "file.h"
+      #include BOOST_PP_INCLUDE_SELF()
+   };
+
+   #define NAME Z
+   struct NAME {
+      // ...
+      #define BOOST_PP_INDIRECT_SELF "file.h"
+      #include BOOST_PP_INCLUDE_SELF()
+   };
+
+   #endif
+
+#else
+
+      inline bool validate(NAME* p) {
+         return true;
+      }
+
+      template<class T> bool validate(T* p) {
+         return dynamic_cast<NAME*>(p);
+      }
+
+   #undef NAME
+
+#endif
+
+ + diff --git a/doc/ref/indirect_self.html b/doc/ref/indirect_self.html new file mode 100644 index 0000000..5cbd2a9 --- /dev/null +++ b/doc/ref/indirect_self.html @@ -0,0 +1,34 @@ + + + BOOST_PP_INDIRECT_SELF + + + +
+ The BOOST_PP_INDIRECT_SELF macro is a user-defined named external argument used by BOOST_PP_INCLUDE_SELF.  +
+

Usage

+
+ #define BOOST_PP_INDIRECT_SELF filename +
+

Arguments

+
+
filename
+
+ A quoted or angle-bracketed filename to be included by BOOST_PP_INCLUDE_SELF. +
+
+

Remarks

+
+ Most preprocessors will not allow a file to directly include itself--even when the file protects itself from such a scenario.  + This macro, in combination with BOOST_PP_INCLUDE_SELF allows a file to include itself indirectly. +
+
+ This macro is automatically undefined for reuse by a call to BOOST_PP_INCLUDE_SELF. +
+

See Also

+ + + diff --git a/doc/ref/intercept.html b/doc/ref/intercept.html new file mode 100644 index 0000000..90b8dd9 --- /dev/null +++ b/doc/ref/intercept.html @@ -0,0 +1,40 @@ + + + BOOST_PP_INTERCEPT + + + +
+ The BOOST_PP_INTERCEPT macro intercepts a numeric concatenation and expands to nothing. +
+

Usage

+
+ BOOST_PP_INTERCEPT +
+

Remarks

+
+ This macro is used to intercept concatenations performed by various other library constructs.  + It is typically used after other text to prevent eat the concatenation expand to nothing.  + This macro can only intercept integer constants in the range of 0 to BOOST_PP_LIMIT_MAG. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/facilities/intercept.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+BOOST_PP_ENUM_BINARY_PARAMS(3, class T, = U)
+// expands to class T0 = U0, class T1 = U1, class T2 = U2
+
+BOOST_PP_ENUM_BINARY_PARAMS(3, class T, = int BOOST_PP_INTERCEPT)
+// expands to class T0 = int, class T1 = int, class T2 = int
+
+ + diff --git a/doc/ref/is_iterating.html b/doc/ref/is_iterating.html new file mode 100644 index 0000000..64f3cab --- /dev/null +++ b/doc/ref/is_iterating.html @@ -0,0 +1,27 @@ + + + BOOST_PP_IS_ITERATING + + + + +
+ The BOOST_PP_IS_ITERATING macro is defined when a file-iteration is in progress. +
+

Usage

+
+ #if !defined(BOOST_PP_IS_ITERATING) // ... +
+

Remarks

+
+ If a file-iteration is in progress, this macro is defined as 1.  + This means that the following will also work: +
+ #if !BOOST_PP_IS_ITERATING // ... +
+
+
+ This macro is defined to guard a file from infinite inclusion. +
+ + diff --git a/doc/ref/is_selfish.html b/doc/ref/is_selfish.html new file mode 100644 index 0000000..9a3158d --- /dev/null +++ b/doc/ref/is_selfish.html @@ -0,0 +1,27 @@ + + + BOOST_PP_IS_SELFISH + + + + +
+ The BOOST_PP_IS_SELFISH macro is defined when a self-inclusion is in progress. +
+

Usage

+
+ #if !defined(BOOST_PP_IS_SELFISH) // ... +
+

Remarks

+
+ If a self-inclusion is in progress, this macro is defined as 1.  + This means that the following will also work: +
+ #if !BOOST_PP_IS_SELFISH // ... +
+
+
+ This macro is defined to guard a file from infinite inclusion. +
+ + diff --git a/doc/ref/iterate.html b/doc/ref/iterate.html new file mode 100644 index 0000000..d2e5c13 --- /dev/null +++ b/doc/ref/iterate.html @@ -0,0 +1,72 @@ + + + BOOST_PP_ITERATE + + + +
+ The BOOST_PP_ITERATE macro initiates a file-iteration. +
+

Usage

+
+ #include BOOST_PP_ITERATE() +
+

Remarks

+
+ Arguments to this macro are passed as external named arguments in one of two + ways--either through BOOST_PP_FILENAME_x and BOOST_PP_ITERATION_LIMITS or + through BOOST_PP_ITERATION_PARAMS_x.  +
+
+ Three pieces of information are required to perform a file-iteration.  + First, the name of a file to iterate over.  + This is passed via BOOST_PP_FILENAME_x or as part of BOOST_PP_ITERATION_PARAMS_x.  + The file-iteration mechanism will repeatedly include this file with iteration values ranging from a lower bound to an upper bound--the second and third required parameters.  + These two boundaries are either passed through BOOST_PP_ITERATION_LIMITS or as part of BOOST_PP_ITERATION_PARAMS_x. +
+
+ Optionally, a fourth parameter may be passed that associates flags with an iteration.  + These flags are primarily useful to distinguish one iteration from another in the same file.  + This parameter can only be passed through BOOST_PP_ITERATION_PARAMS_x. +
+
+ While a file-iteration is in progress, BOOST_PP_IS_ITERATING is defined as 1. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
+   #include BOOST_PP_ITERATE()
+
+   #define BOOST_PP_FILENAME_1 "file.h"
+   #define BOOST_PP_ITERATION_LIMITS (11, 20)
+   #include BOOST_PP_ITERATE()
+
+   #endif
+
+#else
+
+   current iteration value is BOOST_PP_ITERATION()
+
+#endif
+
+ + diff --git a/doc/ref/iteration.html b/doc/ref/iteration.html new file mode 100644 index 0000000..7b2136c --- /dev/null +++ b/doc/ref/iteration.html @@ -0,0 +1,44 @@ + + + BOOST_PP_ITERATION + + + +
+ The BOOST_PP_ITERATION macro expands to the iteration value of the current file-iteration depth. +
+

Usage

+
+ BOOST_PP_ITERATION() +
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 3, "file.h"))
+   #include BOOST_PP_ITERATE()
+
+   #endif
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+   value == BOOST_PP_ITERATION()
+
+#endif
+
+ + diff --git a/doc/ref/iteration_depth.html b/doc/ref/iteration_depth.html new file mode 100644 index 0000000..3a39c21 --- /dev/null +++ b/doc/ref/iteration_depth.html @@ -0,0 +1,57 @@ + + + BOOST_PP_ITERATION_DEPTH + + + +
+ The BOOST_PP_ITERATION_DEPTH macro expands to the current file-iteration depth. +
+

Usage

+
+ BOOST_PP_ITERATION_DEPTH() +
+

Remarks

+
+ If a file-iteration is not in progress, this macro expands to 0.  + Otherwise, it expands to the current depth of file-iteration. +
+

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 3, "file.h"))
+   #include BOOST_PP_ITERATE()
+
+   #endif
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+   + depth BOOST_PP_ITERATION_DEPTH()
+   // ...
+
+   #define BOOST_PP_ITERATION_PARAMS_2 \
+      (3, (1, BOOST_PP_ITERATION(), "file.h")) \
+      /**/
+
+   #include BOOST_PP_ITERATE()
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+   - depth BOOST_PP_ITERATION_DEPTH()
+   // ...
+
+#endif
+
+ + diff --git a/doc/ref/iteration_finish.html b/doc/ref/iteration_finish.html new file mode 100644 index 0000000..28d543a --- /dev/null +++ b/doc/ref/iteration_finish.html @@ -0,0 +1,46 @@ + + + BOOST_PP_ITERATION_FINISH + + + +
+ The BOOST_PP_ITERATION_FINISH macro expands to the upper bound of the current file-iteration depth. +
+

Usage

+
+ BOOST_PP_ITERATION_FINISH() +
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
+   #include BOOST_PP_ITERATE()
+
+   #endif
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+   start -> BOOST_PP_ITERATION_START()
+   iteration -> BOOST_PP_ITERATION()
+   finish -> BOOST_PP_ITERATION_FINISH()
+
+#endif
+
+ + diff --git a/doc/ref/iteration_flags.html b/doc/ref/iteration_flags.html new file mode 100644 index 0000000..ccd8b86 --- /dev/null +++ b/doc/ref/iteration_flags.html @@ -0,0 +1,57 @@ + + + BOOST_PP_ITERATION_FLAGS + + + +
+ The BOOST_PP_ITERATION_FLAGS macro retrieves flags associated with the current file-iteration depth. +
+

Usage

+
+ BOOST_PP_ITERATION_FLAGS() +
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   // 1st iteration:
+   #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 10, "file.h", 0x0001))
+   #include BOOST_PP_ITERATE()
+
+   // 2nd iteration:
+   #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 10, "file.h", 0x0002))
+   #include BOOST_PP_ITERATE()
+
+   #endif
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1 \
+   && BOOST_PP_ITERATION_FLAGS() == 0x0001 \
+   /**/
+
+   { 1st }
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1 \
+   && BOOST_PP_ITERATION_FLAGS() == 0x0002 \
+   /**/
+
+   { 2nd }
+
+#endif
+
+ + diff --git a/doc/ref/iteration_limits.html b/doc/ref/iteration_limits.html new file mode 100644 index 0000000..54af2a2 --- /dev/null +++ b/doc/ref/iteration_limits.html @@ -0,0 +1,48 @@ + + + BOOST_PP_ITERATION_LIMITS + + + + +
+ The BOOST_PP_ITERATION_LIMITS macro is a user-defined named external argument used by BOOST_PP_ITERATE.  + It denotes the lower and upper bounds of a file-iteration. +
+

Usage

+
+ #define BOOST_PP_ITERATION_LIMITS (start, finish) +
+

Arguments

+
+
start
+
+ The lower bound (inclusive) of a file-iteration.  + Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. +
+
finish
+
+ The upper bound (inclusive) of a file-iteration.  + Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. +
+
+

Remarks

+
+ Note that there is a whitespace character after the macro identifier. +
+
+ This macro is part of the secondary method of passing arguments to BOOST_PP_ITERATE.  + The other part is BOOST_PP_FILENAME_x. Both start and finish are evaluated parameters.  + This implies that they may include simple arithmetic. +
+
+ This macro is automatically undefined for reuse by a call to BOOST_PP_ITERATE. +
+

See Also

+ + + diff --git a/doc/ref/iteration_params_x.html b/doc/ref/iteration_params_x.html new file mode 100644 index 0000000..ea38437 --- /dev/null +++ b/doc/ref/iteration_params_x.html @@ -0,0 +1,66 @@ + + + BOOST_PP_ITERATION_PARAMS_x + + + + +
+ The BOOST_PP_ITERATION_PARAMS_x macro is a user-defined named external argument used by BOOST_PP_ITERATE.  + It denotes the lower bound, upper bound, and the filename of a file-iteration. It can optionally denote flags associated with a file-iteration as well. +
+

Usage

+
+ #define BOOST_PP_ITERATION_PARAMS_x (c, (start, finish, filename [, flags])) +
+

Arguments

+
+
x
+
+ The iteration depth of the next file-iteration.  + This value must be the current iteration depth + 1. +
+
c
+
+ The number of parameters.  + If flags is specified, this value must be 4.  + Otherwise, it must be 3. +
+
start
+
+ The lower bound (inclusive) of a file-iteration.  + Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. +
+
finish
+
+ The upper bound (inclusive) of a file-iteration.  + Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. +
+
filename
+
+ A quoted or angle-bracketed filename to used as the target of a file-iteration. +
+
[flags]
+
+ A quoted or angle-bracketed filename to used as the target of a file-iteration. +
+
+

Remarks

+
+ Note that there is a whitespace character after the macro identifier. +
+
+ This macro is must be defined as an array of arguments in one of the two formats above (with or without flags). + It is the primary method of passing arguments to BOOST_PP_ITERATE.  + Both start and finish are evaluated parameters, which implies that simple arithmetic can be used. +
+
+ This macro is automatically undefined for reuse by a call to BOOST_PP_ITERATE. +
+

See Also

+ + + diff --git a/doc/ref/iteration_start.html b/doc/ref/iteration_start.html new file mode 100644 index 0000000..770f4e1 --- /dev/null +++ b/doc/ref/iteration_start.html @@ -0,0 +1,46 @@ + + + BOOST_PP_ITERATION_START + + + +
+ The BOOST_PP_ITERATION_START macro expands to the lower bound of the current file-iteration depth. +
+

Usage

+
+ BOOST_PP_ITERATION_START() +
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
+   #include BOOST_PP_ITERATE()
+
+   #endif
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+   start -> BOOST_PP_ITERATION_START()
+   iteration -> BOOST_PP_ITERATION()
+   finish -> BOOST_PP_ITERATION_FINISH()
+
+#endif
+
+ + diff --git a/doc/ref/less.html b/doc/ref/less.html new file mode 100644 index 0000000..835b950 --- /dev/null +++ b/doc/ref/less.html @@ -0,0 +1,54 @@ + + + BOOST_PP_LESS + + + +
+ The BOOST_PP_LESS macro compares two values for lesser magnitude. +
+

Usage

+
+ BOOST_PP_LESS(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is less than y, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LESS_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/less.hpp>
+
+BOOST_PP_LESS(4, 3) // expands to 0
+BOOST_PP_LESS(3, 4) // expands to 1
+
+ + diff --git a/doc/ref/less_d.html b/doc/ref/less_d.html new file mode 100644 index 0000000..68aa2fc --- /dev/null +++ b/doc/ref/less_d.html @@ -0,0 +1,59 @@ + + + BOOST_PP_LESS_D + + + +
+ The BOOST_PP_LESS_D macro compares two values for lesser magnitude.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LESS_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is less than y, this macro expands to 1.  + Otherwise, it expands to 0. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/less.hpp>
+#include <boost/preprocessor/list/filter.hpp>
+
+#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
+
+#define PRED(d, _, num) BOOST_PP_LESS_D(d, num, 3)
+
+BOOST_PP_LIST_FILTER(PRED, nil, LIST)
+   // expands to (1, (2, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/less_equal.html b/doc/ref/less_equal.html new file mode 100644 index 0000000..964a3a0 --- /dev/null +++ b/doc/ref/less_equal.html @@ -0,0 +1,54 @@ + + + BOOST_PP_LESS_EQUAL + + + +
+ The BOOST_PP_LESS_EQUAL macro compares two values for equality or lesser magnitude. +
+

Usage

+
+ BOOST_PP_LESS_EQUAL(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is lesser than or equal to y, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LESS_EQUAL_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/less_equal.hpp>
+
+BOOST_PP_LESS_EQUAL(4, 3) // expands to 0
+BOOST_PP_LESS_EQUAL(5, 5) // expands to 1
+
+ + diff --git a/doc/ref/less_equal_d.html b/doc/ref/less_equal_d.html new file mode 100644 index 0000000..ef35b8c --- /dev/null +++ b/doc/ref/less_equal_d.html @@ -0,0 +1,59 @@ + + + BOOST_PP_LESS_EQUAL_D + + + +
+ The BOOST_PP_LESS_EQUAL_D macro compares two values for equality or lesser magnitude.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LESS_EQUAL_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is less than or equal to y, this macro expands to 1.  + Otherwise, it expands to 0. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/less_equal.hpp>
+#include <boost/preprocessor/list/filter.hpp>
+
+#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
+
+#define PRED(d, _, num) BOOST_PP_LESS_EQUAL_D(d, num, 4)
+
+BOOST_PP_LIST_FILTER(PRED, nil, LIST)
+   // expands to (1, (2, (3, (4, BOOST_PP_NIL))))
+
+ + diff --git a/doc/ref/limit_dim.html b/doc/ref/limit_dim.html new file mode 100644 index 0000000..23feed7 --- /dev/null +++ b/doc/ref/limit_dim.html @@ -0,0 +1,24 @@ + + + BOOST_PP_LIMIT_DIM + + + + +
+ The BOOST_PP_LIMIT_DIM macro defines the maximum number of available BOOST_PP_REPEAT dimensions. +
+

Usage

+
+ BOOST_PP_LIMIT_DIM +
+

Remarks

+
+ This macro currently expands to 3. +
+

Requirements

+ + + diff --git a/doc/ref/limit_for.html b/doc/ref/limit_for.html new file mode 100644 index 0000000..8753f01 --- /dev/null +++ b/doc/ref/limit_for.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_FOR + + + +
+ The BOOST_PP_LIMIT_FOR macro defines the maximum number of BOOST_PP_FOR repetitions. +
+

Usage

+
+ BOOST_PP_LIMIT_FOR +
+

Remarks

+
+ This macro currently expands to 256. +
+

Requirements

+ + + diff --git a/doc/ref/limit_iteration.html b/doc/ref/limit_iteration.html new file mode 100644 index 0000000..c73538c --- /dev/null +++ b/doc/ref/limit_iteration.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_ITERATION + + + +
+ The BOOST_PP_LIMIT_ITERATION macro defines the maximum number of local and file iterations. +
+

Usage

+
+ BOOST_PP_LIMIT_ITERATION +
+

Remarks

+
+ This macro currently expands to 256. +
+

Requirements

+ + + diff --git a/doc/ref/limit_iteration_dim.html b/doc/ref/limit_iteration_dim.html new file mode 100644 index 0000000..99cbe5e --- /dev/null +++ b/doc/ref/limit_iteration_dim.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_ITERATION_DIM + + + +
+ The BOOST_PP_LIMIT_ITERATION_DIM macro defines the maximum depth of file-iteration. +
+

Usage

+
+ BOOST_PP_LIMIT_ITERATION_DIM +
+

Remarks

+
+ This macro currently expands to 5. +
+

Requirements

+ + + diff --git a/doc/ref/limit_mag.html b/doc/ref/limit_mag.html new file mode 100644 index 0000000..4ed10e4 --- /dev/null +++ b/doc/ref/limit_mag.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_MAG + + + +
+ The BOOST_PP_LIMIT_MAG macro defines the maximum input and result magnitudes of arithmetic. +
+

Usage

+
+ BOOST_PP_LIMIT_MAG +
+

Remarks

+
+ This macro currently expands to 256. +
+

Requirements

+ + + diff --git a/doc/ref/limit_repeat.html b/doc/ref/limit_repeat.html new file mode 100644 index 0000000..59906bb --- /dev/null +++ b/doc/ref/limit_repeat.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_REPEAT + + + +
+ The BOOST_PP_LIMIT_REPEAT macro defines the maximum number of repetitions supported by each BOOST_PP_REPEAT dimension. +
+

Usage

+
+ BOOST_PP_LIMIT_REPEAT +
+

Remarks

+
+ This macro current expands to 256. +
+

Requirements

+ + + diff --git a/doc/ref/limit_slot_count.html b/doc/ref/limit_slot_count.html new file mode 100644 index 0000000..0f99311 --- /dev/null +++ b/doc/ref/limit_slot_count.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_SLOT_COUNT + + + +
+ The BOOST_PP_LIMIT_SLOT_COUNT macro defines the number of available evaluated slots. +
+

Usage

+
+ BOOST_PP_LIMIT_SLOT_COUNT +
+

Remarks

+
+ This macro currently expands to 5. +
+

Requirements

+ + + diff --git a/doc/ref/limit_slot_sig.html b/doc/ref/limit_slot_sig.html new file mode 100644 index 0000000..2fe5f39 --- /dev/null +++ b/doc/ref/limit_slot_sig.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_SLOT_SIG + + + +
+ The BOOST_PP_LIMIT_SLOT_SIG macro defines the number of significant base-10 digits that can be evaluated by the slot mechanism. +
+

Usage

+
+ BOOST_PP_LIMIT_SLOT_SIG +
+

Remarks

+
+ This macro currently expands to 10. +
+

Requirements

+ + + diff --git a/doc/ref/limit_tuple.html b/doc/ref/limit_tuple.html new file mode 100644 index 0000000..cf6f0f9 --- /dev/null +++ b/doc/ref/limit_tuple.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_TUPLE + + + +
+ The BOOST_PP_LIMIT_TUPLE macro defines the maximum tuple size supported by the library. +
+

Usage

+
+ BOOST_PP_LIMIT_TUPLE +
+

Remarks

+
+ This macro currently expands to 25. +
+

Requirements

+ + + diff --git a/doc/ref/limit_while.html b/doc/ref/limit_while.html new file mode 100644 index 0000000..940d151 --- /dev/null +++ b/doc/ref/limit_while.html @@ -0,0 +1,23 @@ + + + BOOST_PP_LIMIT_WHILE + + + +
+ The BOOST_PP_LIMIT_WHILE macro defines the maximum number of BOOST_PP_WHILE iterations. +
+

Usage

+
+ BOOST_PP_LIMIT_WHILE +
+

Remarks

+
+ This macro currently expands to 256. +
+

Requirements

+ + + diff --git a/doc/ref/line.html b/doc/ref/line.html new file mode 100644 index 0000000..227d15b --- /dev/null +++ b/doc/ref/line.html @@ -0,0 +1,101 @@ + + + BOOST_PP_LINE + + + +
+ The BOOST_PP_LINE macro places notes encoded as line directives in the preprocessing output. +
+

Usage

+
+ #line BOOST_PP_LINE(line, file) +
+

Arguments

+
+
line
+
+ The new line number of the trailing line.  + The predefined macro __LINE__ is commonly used. +
+
file
+
+ Typically the name of the current file.  + However, any informative text will work.  + This text is internally stringized, so quotation marks are unnecessary. +
+
+

Remarks

+
+ If the macro BOOST_PP_CONFIG_EXTENDED_LINE_INFO is defined as 1 and a file-iteration + is in progress, this macro will automatically insert debugging information about the state of file-iteration.  + This information will show the all of the current iteration values with the inner most iteration last. +
+
+ This information is useful when errors might be spanning multiple iterations of the same source text.  + Finding any errors is sometimes less than straightforward.  + Use of this macro can provide information to make this much easier.  + For example, instead of getting several errors like this: +
+ "file.hpp", line 2: error: expected a ";"
+ "file.hpp", line 4: error: improperly terminated macro invocation
+
+ You might get something like this instead.... +
+ "file.hpp [1]", line 2: error: expected a ";"
+ "file.hpp [5]", line 4: error: improperly terminated macro invocation
+
+ It is immediately evident that this error is spanning multiple iterations of the same source text.  + If it wasn't, the same errors would occur on each iteration. +
+
+ It must be noted however, that some compilers don't like filenames that aren't actually files.  + Those compilers typically issues warnings about the bad filename.  + This makes it a good idea to only define BOOST_PP_CONFIG_EXTENDED_LINE_INFO to 1 only when debugging. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+// sample.cpp
+#if !defined(BOOST_PP_IS_ITERATING)
+
+   #define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 1
+
+   #include <boost/preprocessor/arithmetic/dec.hpp>
+   #include <boost/preprocessor/cat.hpp>
+   #include <boost/preprocessor/debug/line.hpp>
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   namespace sample {
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 5, "sample.cpp"))
+   #include BOOST_PP_ITERATE()
+
+   } // sample
+
+   int main(void) {
+      return 0;
+   }
+
+#else
+
+   #line BOOST_PP_LINE(1, sample.cpp)
+
+   int BOOST_PP_CAT(x, BOOST_PP_ITERATION())); // extra parenthesis
+   
+   struct BOOST_PP_CAT(s, BOOST_PP_DEC(BOOST_PP_ITERATION()) {
+      // missing a parenthesis
+      // ...
+   };
+
+#endif
+
+ + diff --git a/doc/ref/list_append.html b/doc/ref/list_append.html new file mode 100644 index 0000000..e7670ef --- /dev/null +++ b/doc/ref/list_append.html @@ -0,0 +1,58 @@ + + + BOOST_PP_LIST_APPEND + + + +
+ The BOOST_PP_LIST_APPEND macro appends two lists. +
+

Usage

+
+ BOOST_PP_LIST_APPEND(a, b) +
+

Arguments

+
+
a
+
+ The first list. +
+
b
+
+ The second list. +
+
+

Remarks

+
+ This macro appends two lists.  + For example, if a is (1, (2, (3, BOOST_PP_NIL))) and b is (4, (5, BOOST_PP_NIL)), + this macro will expand to: +
+ (1, (2, (3, (4, (5, BOOST_PP_NIL))))) +
+
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_APPEND_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/append.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (x, (y, (z, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_APPENDe(L1, L2)
+   // expands to (a, (b, (c, (x, (y, (z, BOOST_PP_NIL))))))
+
+ + diff --git a/doc/ref/list_append_d.html b/doc/ref/list_append_d.html new file mode 100644 index 0000000..ffb3f47 --- /dev/null +++ b/doc/ref/list_append_d.html @@ -0,0 +1,85 @@ + + + BOOST_PP_LIST_APPEND_D + + + +
+ The BOOST_PP_LIST_APPEND_D macro appends two lists.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_APPEND_D(d, a, b) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
a
+
+ The first list. +
+
b
+
+ The second list. +
+
+

Remarks

+
+ This macro appends two lists.  + For example, if a is (1, (2, (3, BOOST_PP_NIL))) and b is (4, (5, BOOST_PP_NIL)), + this macro will expand to: +
+ (1, (2, (3, (4, (5, BOOST_PP_NIL))))) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/list/append.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define LIST (1, (2, (3, BOOST_PP_NIL)))
+
+#define PRED(d, state) BOOST_PP_TUPLE_ELEM(3, 1, state)
+
+#define OP(d, state) \
+   ( \
+      BOOST_PP_LIST_APPEND_D( \
+         d, BOOST_PP_TUPLE_ELEM(3, 0, state), \
+         BOOST_PP_TUPLE_ELEM(3, 2, state) \
+      ), \
+      BOOST_PP_DEC( \
+         BOOST_PP_TUPLE_ELEM(3, 1, state) \
+      ), \
+      BOOST_PP_TUPLE_ELEM(3, 2, state) \
+   ) \
+   /**/
+
+#define LIST_MULTIPLY(c, list) \
+   BOOST_PP_TUPLE_ELEM( \
+      3, 0, \
+      BOOST_PP_WHILE( \
+         PRED, OP, \
+         (BOOST_PP_NIL, c, list) \
+      ) \
+   ) \
+   /**/
+
+LIST_MULTIPLY(3, LIST)
+   // expands to (1, (2, (3, (1, (2, (3, (1, (2, (3, BOOST_PP_NIL)))))))))
+
+ + diff --git a/doc/ref/list_at.html b/doc/ref/list_at.html new file mode 100644 index 0000000..1011ce6 --- /dev/null +++ b/doc/ref/list_at.html @@ -0,0 +1,50 @@ + + + BOOST_PP_LIST_AT + + + +
+ The BOOST_PP_LIST_AT macro extracts an element in a list. +
+

Usage

+
+ BOOST_PP_LIST_AT(list, index) +
+

Arguments

+
+
list
+
+ The list from which a element is to be extracted.  + This list must have at least index + 1 elements. +
+
index
+
+ The zero-based position in the list of the element to be extracted. +
+
+

Remarks

+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_AT_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/at.hpp>
+
+#define LIST (a, (b, (c, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_AT(LIST, 0) // expands to a
+BOOST_PP_LIST_AT(LIST, 2) // expands to c
+
+ + diff --git a/doc/ref/list_at_d.html b/doc/ref/list_at_d.html new file mode 100644 index 0000000..d21bce3 --- /dev/null +++ b/doc/ref/list_at_d.html @@ -0,0 +1,52 @@ + + + BOOST_PP_LIST_AT_D + + + +
+ The BOOST_PP_LIST_AT_D macro extracts an element in a list.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_AT_D(d, list, index) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
list
+
+ The list from which a element is to be extracted.  + This list must have at least index + 1 elements. +
+
index
+
+ The zero-based position in the list of the element to be extracted. +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/list/at.hpp>
+
+#define LIST (7, (2, (0, (1, BOOST_PP_NIL))))
+
+#define PRED(d, state) BOOST_PP_LIST_AT_D(d, state, 0)
+#define OP(d, state) BOOST_PP_LIST_REST(state)
+
+BOOST_PP_WHILE(PRED, OP, LIST) // expands to (0, (1, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/list_cat.html b/doc/ref/list_cat.html new file mode 100644 index 0000000..69a8323 --- /dev/null +++ b/doc/ref/list_cat.html @@ -0,0 +1,47 @@ + + + BOOST_PP_LIST_CAT + + + +
+ The BOOST_PP_LIST_CAT macro concatenates all elements in a list. +
+

Usage

+
+ BOOST_PP_LIST_CAT(list) +
+

Arguments

+
+
list
+
+ The list whose elements are to be concatenated. +
+
+

Remarks

+
+ Elements are concatenated left-to-right starting with index 0. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_CAT_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/cat.hpp>
+
+#define LIST (a, (b, (c, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_CAT(LIST) // expands to abc
+
+ + diff --git a/doc/ref/list_cat_d.html b/doc/ref/list_cat_d.html new file mode 100644 index 0000000..9c9821e --- /dev/null +++ b/doc/ref/list_cat_d.html @@ -0,0 +1,56 @@ + + + BOOST_PP_LIST_CAT_D + + + +
+ The BOOST_PP_LIST_CAT_D macro concatenates all elements in a list.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_CAT_D(d, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
list
+
+ The list whose elements are to be concatenated. +
+
+

Remarks

+
+ Elements are concatenated left-to-right starting with index 0. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/cat.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
+
+#define LISTS \
+   ((a, (b, BOOST_PP_NIL)), \
+      ((d, (e, BOOST_PP_NIL)), \
+         ((e, (f, BOOST_PP_NIL)), \
+            BOOST_PP_NIL))) \
+   /**/
+
+#define OP(d, state, x) BOOST_PP_CAT(state, BOOST_PP_LIST_CAT_D(d, x))
+
+BOOST_PP_LIST_FOLD_LEFT(OP, _, LISTS) // expands to _abcdef
+
+ + diff --git a/doc/ref/list_cons.html b/doc/ref/list_cons.html new file mode 100644 index 0000000..85cdf7e --- /dev/null +++ b/doc/ref/list_cons.html @@ -0,0 +1,76 @@ + + + BOOST_PP_LIST_CONS + + + +
+ The BOOST_PP_LIST_CONS macro is a list constructor. +
+

Usage

+
+ BOOST_PP_LIST_CONS(head, tail) +
+

Arguments

+
+
head
+
+ An element in a list. +
+
tail
+
+ Either a list, BOOST_PP_LIST_NIL, or BOOST_PP_NIL. +
+
+

Remarks

+
+ This macro appends a new head to an existing list or creates a list from BOOST_PP_LIST_NIL. +
+
+ This macro is no longer necessary.  + For example... +
+ BOOST_PP_LIST_CONS(a, BOOST_PP_LIST_CONS(b, BOOST_PP_LIST_NIL))) +
+ ...is just an explicit way of writing the following: +
+ (a, (b, BOOST_PP_NIL)) +
+ Because of this, this macro is deprecated. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+
+#define OLD \
+   BOOST_PP_LIST_CONS( \
+      a, \
+      BOOST_PP_LIST_CONS( \
+         b, \
+         BOOST_PP_LIST_CONS( \
+            c, \
+            BOOST_PP_LIST_NIL \
+         ) \
+      ) \
+   ) \
+   /**/
+
+#define NEW (a, (b, (c, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
+   // expands to a == a
+
+BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_REST(NEW)
+   // expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/list_enum.html b/doc/ref/list_enum.html new file mode 100644 index 0000000..cb810ef --- /dev/null +++ b/doc/ref/list_enum.html @@ -0,0 +1,51 @@ + + + BOOST_PP_LIST_ENUM + + + +
+ The BOOST_PP_LIST_ENUM macro converts a list to a comma-separated list. +
+

Usage

+
+ BOOST_PP_LIST_ENUM(list) +
+

Arguments

+
+
list
+
+ The list to be converted. +
+
+

Remarks

+
+ If list is, for example, (a, (b, (c, BOOST_PP_NIL))), + this macro will produce: +
+ a, b, c +
+
+
+ Previously, this macro could not be used inside BOOST_PP_FOR.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_ENUM_R in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/enum.hpp>
+
+#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
+
+BOOST_PP_LIST_ENUM(LIST) // expands to w, x, y, z
+
+ + diff --git a/doc/ref/list_enum_r.html b/doc/ref/list_enum_r.html new file mode 100644 index 0000000..9ee0391 --- /dev/null +++ b/doc/ref/list_enum_r.html @@ -0,0 +1,58 @@ + + + BOOST_PP_LIST_ENUM_R + + + +
+ The BOOST_PP_LIST_ENUM_R macro converts a list to a comma-separated list.  + It reenters BOOST_PP_FOR with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_ENUM_R(r, list) +
+

Arguments

+
+
r
+
+ The next available BOOST_PP_FOR repetition. +
+
list
+
+ The list to be converted. +
+
+

Remarks

+
+ If list is, for example, (a, (b, (c, BOOST_PP_NIL))), + this macro will produce: +
+ a, b, c +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+#include <boost/preprocessor/repetition/for.hpp>
+#include <boost/preprocessor/list/enum.hpp>
+
+#define LIST (x, (y, (z, BOOST_PP_NIL)))
+
+#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
+#define OP(r, state) BOOST_PP_LIST_REST(state)
+#define MACRO(r, state) [ BOOST_PP_LIST_ENUM_R(r, state) ]
+
+BOOST_PP_FOR(LIST, PRED, OP, MACRO)
+   // expands to [x, y, z] [y, z] [z]
+
+ + diff --git a/doc/ref/list_filter.html b/doc/ref/list_filter.html new file mode 100644 index 0000000..e8166fc --- /dev/null +++ b/doc/ref/list_filter.html @@ -0,0 +1,65 @@ + + + BOOST_PP_LIST_FILTER + + + +
+ The BOOST_PP_LIST_FILTER macro filters a list according to a supplied criterion. +
+

Usage

+
+ BOOST_PP_LIST_FILTER(pred, data, list) +
+

Arguments

+
+
pred
+
+ A ternary predicate of the form pred(d, data, elem).  + This predicate is expanded by BOOST_PP_LIST_FILTER for each element in list with the next available BOOST_PP_WHILE iteration, + the auxiliary data, and the current element in list.  + This macro must return a integral value in the range of 0 to BOOST_PP_LIMIT_MAG.  + If this predicate expands to non-zero for a certain element, that element is included in the resulting list. +
+
data
+
+ Auxiliary data passed to pred. +
+
list
+
+ The list to be filtered. +
+
+

Remarks

+
+ This macro expands pred for each element in list.  + It builds a new list out of each element for which pred returns non-zero. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_FILTER_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/less_equal.hpp>
+#include <boost/preprocessor/list/filter.hpp>
+
+#define LIST (1, (3, (2, (5, BOOST_PP_NIL))))
+
+#define PRED(d, data, elem) BOOST_PP_LESS_EQUAL(elem, data)
+
+BOOST_PP_LIST_FILTER(PRED, 3, LIST)
+   // expands to (1, (3, (2, BOOST_PP_NIL)))
+
+ + diff --git a/doc/ref/list_filter_d.html b/doc/ref/list_filter_d.html new file mode 100644 index 0000000..2ccda15 --- /dev/null +++ b/doc/ref/list_filter_d.html @@ -0,0 +1,75 @@ + + + BOOST_PP_LIST_FILTER_D + + + +
+ The BOOST_PP_LIST_FILTER_D macro filters a list according to a supplied criterion.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FILTER_D(d, pred, data, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
pred
+
+ A ternary predicate of the form pred(d, data, elem).  + This predicate is expanded by BOOST_PP_LIST_FILTER for each element in list with the next available BOOST_PP_WHILE iteration, + the auxiliary data, and the current element in list.  + This macro must return a integral value in the range of 0 to BOOST_PP_LIMIT_MAG.  + If this predicate expands to non-zero for a certain element, that element is included in the resulting list. +
+
data
+
+ Auxiliary data passed to pred. +
+
list
+
+ The list to be filtered. +
+
+

Remarks

+
+ This macro expands pred for each element in list.  + It builds a new list out of each element for which pred returns non-zero. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/less_equal.hpp>
+#include <boost/preprocessor/list/filter.hpp>
+#include <boost/preprocessor/list/fold_right.hpp>
+
+#define A (1, (2, (3, (4, BOOST_PP_NIL))))
+#define B (A, (A, (A, (A, BOOST_PP_NIL))))
+
+#define PRED(d, data, x) BOOST_PP_LESS_EQUAL(x, data)
+#define OP(d, state, x) (BOOST_PP_LIST_FILTER_D(d, PRED, 2, x), state)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, B)
+/*
+   expands to:
+   ((1, (2, BOOST_PP_NIL)), 
+   ((1, (2, BOOST_PP_NIL)), 
+   ((1, (2, BOOST_PP_NIL)), 
+   ((1, (2, BOOST_PP_NIL)), 
+      BOOST_PP_NIL))))
+*/
+
+ + diff --git a/doc/ref/list_first.html b/doc/ref/list_first.html new file mode 100644 index 0000000..7b10152 --- /dev/null +++ b/doc/ref/list_first.html @@ -0,0 +1,51 @@ + + + BOOST_PP_LIST_FIRST + + + +
+ The BOOST_PP_LIST_FIRST macro expands to the head of a list. +
+

Usage

+
+ BOOST_PP_LIST_FIRST(list) +
+

Arguments

+
+
list
+
+ A non-nil list. +
+
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+
+#define OLD \
+   BOOST_PP_LIST_CONS( \
+      a, \
+      BOOST_PP_LIST_CONS( \
+         b, \
+         BOOST_PP_LIST_CONS( \
+            c, \
+            BOOST_PP_LIST_NIL \
+         ) \
+      ) \
+   ) \
+   /**/
+
+#define NEW (a, (b, (c, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
+   // expands to a == a
+
+BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_REST(NEW)
+   // expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/list_first_n.html b/doc/ref/list_first_n.html new file mode 100644 index 0000000..6aa3cc2 --- /dev/null +++ b/doc/ref/list_first_n.html @@ -0,0 +1,51 @@ + + + BOOST_PP_LIST_FIRST_N + + + +
+ The BOOST_PP_LIST_FIRST_N macro expands to a list of the first count elements of a list. +
+

Usage

+
+ BOOST_PP_LIST_FIRST_N(count, list) +
+

Arguments

+
+
count
+
+ The number of elements to extract. +
+
list
+
+ The list from which the elements are extracted. +
+
+

Remarks

+
+ This macro extracts count elements from the beginning of list and returns them as a list +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_FIRST_N_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/first_n.hpp>
+
+#define LIST (a, (b, (c, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_FIRST_N(2, LIST) // expands to (a, (b, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/list_first_n_d.html b/doc/ref/list_first_n_d.html new file mode 100644 index 0000000..d8eb277 --- /dev/null +++ b/doc/ref/list_first_n_d.html @@ -0,0 +1,60 @@ + + + BOOST_PP_LIST_FIRST_N_D + + + +
+ The BOOST_PP_LIST_FIRST_N_D macro expands to a list of the first count elements of a list.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FIRST_N_D(d, count, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
count
+
+ The number of elements to extract. +
+
list
+
+ The list from which the elements are extracted. +
+
+

Remarks

+
+ This macro extracts count elements from the beginning of list and returns them as a list +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/first_n.hpp>
+#include <boost/preprocessor/list/fold_right.hpp>
+
+#define L1 (a, (b, (c, (d, BOOST_PP_NIL))))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_FIRST_N_D(d, 2, x), state)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to...
+   ((a, (b, BOOST_PP_NIL)), ((a, (b, BOOST_PP_NIL)),
+   ((a, (b, BOOST_PP_NIL)) , BOOST_PP_NIL )))
+*/
+
+ + diff --git a/doc/ref/list_fold_left.html b/doc/ref/list_fold_left.html new file mode 100644 index 0000000..ca8a314 --- /dev/null +++ b/doc/ref/list_fold_left.html @@ -0,0 +1,64 @@ + + + BOOST_PP_LIST_FOLD_LEFT + + + +
+ The BOOST_PP_LIST_FOLD_LEFT macro folds (or accumulates) the elements of a list left-to-right. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_LEFT(op, state, list) +
+

Arguments

+
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 0), 1), 2) +
+
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_FOLD_LEFT_d in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
+
+#define LIST (a, (b, (c, BOOST_PP_NIL)))
+
+#define OP(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_LEFT(OP, _, LIST) // expands to _abc
+
+ + diff --git a/doc/ref/list_fold_left_2nd.html b/doc/ref/list_fold_left_2nd.html new file mode 100644 index 0000000..7284430 --- /dev/null +++ b/doc/ref/list_fold_left_2nd.html @@ -0,0 +1,64 @@ + + + BOOST_PP_LIST_FOLD_LEFT_2ND + + + +
+ The BOOST_PP_LIST_FOLD_LEFT_2ND macro folds (or accumulates) the elements of a list left-to-right. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_LEFT_2ND(op, state, list) +
+

Arguments

+
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 0), 1), 2) +
+
+
+ This macro is deprecated.  + Use BOOST_PP_LIST_FOLD_LEFT_d instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
+
+#define LIST (a, (b, (c, BOOST_PP_NIL)))
+
+#define OP(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_LEFT_2ND(OP, _, LIST) // expands to _abc
+
+ + diff --git a/doc/ref/list_fold_left_2nd_d.html b/doc/ref/list_fold_left_2nd_d.html new file mode 100644 index 0000000..3a5a597 --- /dev/null +++ b/doc/ref/list_fold_left_2nd_d.html @@ -0,0 +1,75 @@ + + + BOOST_PP_LIST_FOLD_LEFT_2ND_D + + + +
+ The BOOST_PP_LIST_FOLD_LEFT_2ND_D macro folds (or accumulates) the elements of a list left-to-right.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_LEFT_2ND_D(d, op, state, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 0), 1), 2) +
+
+
+ This macro has been superceded by BOOST_PP_LIST_FOLD_LEFT_d and is deprecated.  + It only allows a single reentry into BOOST_PP_LIST_FOLD_LEFT. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_FOLD_LEFT_2ND_D(d, OP_2, _, x), state)
+#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_LEFT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to:
+   (_abc , (_abc , (_abc , BOOST_PP_NIL)))
+*/
+
+ + diff --git a/doc/ref/list_fold_left_d.html b/doc/ref/list_fold_left_d.html new file mode 100644 index 0000000..d24e5e7 --- /dev/null +++ b/doc/ref/list_fold_left_d.html @@ -0,0 +1,70 @@ + + + BOOST_PP_LIST_FOLD_LEFT_d + + + +
+ The BOOST_PP_LIST_FOLD_LEFT_d macro folds (or accumulates) the elements of a list left-to-right.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_LEFT_ ## d(op, state, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 0), 1), 2) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_FOLD_LEFT_ ## d(OP_2, _, x), state)
+#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_LEFT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to:
+   (_abc, (_abc, (_abc, BOOST_PP_NIL)))
+*/
+
+ + diff --git a/doc/ref/list_fold_left_d_old.html b/doc/ref/list_fold_left_d_old.html new file mode 100644 index 0000000..d56d4e4 --- /dev/null +++ b/doc/ref/list_fold_left_d_old.html @@ -0,0 +1,75 @@ + + + BOOST_PP_LIST_FOLD_LEFT_D + + + +
+ The BOOST_PP_LIST_FOLD_LEFT_D macro folds (or accumulates) the elements of a list left-to-right.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_LEFT_D(d, op, state, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_LEFT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 0), 1), 2) +
+
+
+ This macro has been superceded by BOOST_PP_LIST_FOLD_LEFT_d and is deprecated.  + It only allows a single reentry into BOOST_PP_LIST_FOLD_LEFT. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_FOLD_LEFT_D(d, OP_2, _, x), state)
+#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_LEFT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to:
+   (_abc, (_abc, (_abc, BOOST_PP_NIL)))
+*/
+
+ + diff --git a/doc/ref/list_fold_right.html b/doc/ref/list_fold_right.html new file mode 100644 index 0000000..991b41f --- /dev/null +++ b/doc/ref/list_fold_right.html @@ -0,0 +1,68 @@ + + + BOOST_PP_LIST_FOLD_RIGHT + + + +
+ The BOOST_PP_LIST_FOLD_RIGHT macro folds (or accumulates) the elements of a list right-to-left. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_RIGHT(op, state, list) +
+

Arguments

+
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ This macro does not have the same signature as it previously did.  + The arguments have been swapped to provide a uniform interface with BOOST_PP_LIST_FOLD_LEFT. +
+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 2), 1), 0) +
+
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_FOLD_RIGHT_d in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_right.hpp>
+
+#define LIST (a, (b, (c, BOOST_PP_NIL)))
+
+#define OP(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, _, LIST) // expands to _cba
+
+ + diff --git a/doc/ref/list_fold_right_2nd.html b/doc/ref/list_fold_right_2nd.html new file mode 100644 index 0000000..7bcaee2 --- /dev/null +++ b/doc/ref/list_fold_right_2nd.html @@ -0,0 +1,68 @@ + + + BOOST_PP_LIST_FOLD_RIGHT_2ND + + + +
+ The BOOST_PP_LIST_FOLD_RIGHT_2ND macro folds (or accumulates) the elements of a list right-to-left. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_RIGHT_2ND(op, state, list) +
+

Arguments

+
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ This macro does not have the same signature as it previously did.  + The arguments have been swapped to provide a uniform interface with BOOST_PP_LIST_FOLD_LEFT. +
+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 0), 1), 2) +
+
+
+ This macro is deprecated.  + Use BOOST_PP_LIST_FOLD_RIGHT_d instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_right.hpp>
+
+#define LIST (a, (b, (c, BOOST_PP_NIL)))
+
+#define OP(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_RIGHT_2ND(OP, _, LIST) // expands to _cba
+
+ + diff --git a/doc/ref/list_fold_right_2nd_d.html b/doc/ref/list_fold_right_2nd_d.html new file mode 100644 index 0000000..ece48e1 --- /dev/null +++ b/doc/ref/list_fold_right_2nd_d.html @@ -0,0 +1,75 @@ + + + BOOST_PP_LIST_FOLD_RIGHT_2ND_D + + + +
+ The BOOST_PP_LIST_FOLD_RIGHT_2ND_D macro folds (or accumulates) the elements of a list right-to-left.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_RIGHT_2ND_D(d, op, state, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 0), 1), 2) +
+
+
+ This macro has been superceded by BOOST_PP_LIST_FOLD_RIGHT_d and is deprecated.  + It only allows a single reentry into BOOST_PP_LIST_FOLD_RIGHT. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_right.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_FOLD_RIGHT_2ND_D(d, OP_2, _, x), state)
+#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to:
+   (_cba , (_cba , (_cba , BOOST_PP_NIL)))
+*/
+
+ + diff --git a/doc/ref/list_fold_right_d.html b/doc/ref/list_fold_right_d.html new file mode 100644 index 0000000..9555498 --- /dev/null +++ b/doc/ref/list_fold_right_d.html @@ -0,0 +1,70 @@ + + + BOOST_PP_LIST_FOLD_RIGHT_d + + + +
+ The BOOST_PP_LIST_FOLD_RIGHT_d macro folds (or accumulates) the elements of a list right-to-left.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_RIGHT_ ## d(op, state, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 2), 1), 0) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_right.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_FOLD_RIGHT_ ## d(OP_2, _, x), state)
+#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to:
+   (_cba, (_cba, (_cba, BOOST_PP_NIL)))
+*/
+
+ + diff --git a/doc/ref/list_fold_right_d_old.html b/doc/ref/list_fold_right_d_old.html new file mode 100644 index 0000000..c13256f --- /dev/null +++ b/doc/ref/list_fold_right_d_old.html @@ -0,0 +1,79 @@ + + + BOOST_PP_LIST_FOLD_RIGHT_D + + + +
+ The BOOST_PP_LIST_FOLD_RIGHT_D macro folds (or accumulates) the elements of a list right-to-left.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOLD_RIGHT_D(d, op, state, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
op
+
+ A ternary operation of the form op(d, state, elem).  + This macro is called for each element in list--each time returning a new state.  + This operation is expanded by BOOST_PP_LIST_FOLD_RIGHT with the next available BOOST_PP_WHILE iteration, + the current state, and the current element. +
+
state
+
+ The initial state of the fold. +
+
list
+
+ The list to be folded. +
+
+

Remarks

+
+ This macro does not have the same signature as it previously did.  + The arguments have been swapped to provide a uniform interface with BOOST_PP_LIST_FOLD_LEFT. +
+
+ For the list, (0, (1, (2, BOOST_PP_NIL))), this macro expands to: +
+ op(d, op(d, op(d, state, 2), 1), 0) +
+
+
+ This macro has been superceded by BOOST_PP_LIST_FOLD_RIGHT_d and is deprecated.  + It only allows a single reentry into BOOST_PP_LIST_FOLD_RIGHT. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/fold_right.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_FOLD_RIGHT_D(d, OP_2, _, x), state)
+#define OP_2(d, state, x) BOOST_PP_CAT(state, x)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to:
+   (_cba, (_cba, (_cba, BOOST_PP_NIL)))
+*/
+
+ + diff --git a/doc/ref/list_for_each.html b/doc/ref/list_for_each.html new file mode 100644 index 0000000..0ac7953 --- /dev/null +++ b/doc/ref/list_for_each.html @@ -0,0 +1,64 @@ + + + BOOST_PP_LIST_FOR_EACH + + + +
+ The BOOST_PP_LIST_FOR_EACH macro repeats a macro for each element in a list. +
+

Usage

+
+ BOOST_PP_LIST_FOR_EACH(macro, data, list) +
+

Arguments

+
+
macro
+
+ A ternary macro of the form macro(r, data, elem).  + This macro is expanded by BOOST_PP_LIST_FOR_EACH with each element in list.  + It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, and the current element. +
+
data
+
+ Auxiliary data passed to macro. +
+
list
+
+ The list for which macro will be invoked on each element. +
+
+

Remarks

+
+ This macro is a repetition construct.  + If list is (a, (b, (c, BOOST_PP_NIL))), it expands to the sequence: +
+ macro(r, data, a) macro(r, data, b) macro(r, data, c) +
+
+
+ Previously, this macro could not be used inside BOOST_PP_FOR.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_FOR_EACH_R in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/for_each.hpp>
+
+#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
+
+#define MACRO(r, data, elem) BOOST_PP_CAT(elem, data)
+
+BOOST_PP_LIST_FOR_EACH(MACRO, _, LIST) // expands to w_ x_ y_ z_
+
+ + diff --git a/doc/ref/list_for_each_i.html b/doc/ref/list_for_each_i.html new file mode 100644 index 0000000..99a5464 --- /dev/null +++ b/doc/ref/list_for_each_i.html @@ -0,0 +1,64 @@ + + + BOOST_PP_LIST_FOR_EACH_I + + + +
+ The BOOST_PP_LIST_FOR_EACH_I macro repeats a macro for each element in a list. +
+

Usage

+
+ BOOST_PP_LIST_FOR_EACH_I(macro, data, list) +
+

Arguments

+
+
macro
+
+ A macro of the form macro(r, data, i, elem).  + This macro is expanded by BOOST_PP_LIST_FOR_EACH with each element in list.  + It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, the index of the current element, and the current element. +
+
data
+
+ Auxiliary data passed to macro. +
+
list
+
+ The list for which macro will be invoked on each element. +
+
+

Remarks

+
+ This macro is a repetition construct.  + If list is (a, (b, (c, BOOST_PP_NIL))), it expands to the sequence: +
+ macro(r, data, 0, a) macro(r, data, 1, b) macro(r, data, 2, c) +
+
+
+ Previously, this macro could not be used inside BOOST_PP_FOR.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_FOR_EACH_I_R in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/for_each_i.hpp>
+
+#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
+
+#define MACRO(r, data, i, elem) BOOST_PP_CAT(elem, BOOST_PP_CAT(data, i))
+
+BOOST_PP_LIST_FOR_EACH_I(MACRO, _, LIST) // expands to w_0 x_1 y_2 z_3
+
+ + diff --git a/doc/ref/list_for_each_i_r.html b/doc/ref/list_for_each_i_r.html new file mode 100644 index 0000000..5bf0b33 --- /dev/null +++ b/doc/ref/list_for_each_i_r.html @@ -0,0 +1,71 @@ + + + BOOST_PP_LIST_FOR_EACH_I_R + + + +
+ The BOOST_PP_LIST_FOR_EACH_I_R macro repeats a macro for each element in a list.  + It reenters BOOST_PP_FOR with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) +
+

Arguments

+
+
r
+
+ The next available BOOST_PP_FOR repetition. +
+
macro
+
+ A macro of the for macro(r, data, i, elem).  + This macro is expanded by BOOST_PP_LIST_FOR_EACH_I with each element in list.  + It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, the index of the current element, and the current element. +
+
data
+
+ Auxiliary data passed to macro. +
+
list
+
+ The list for which macro will be invoked on each element. +
+
+

Remarks

+
+ This macro is a repetition construct.  + If list is (a, (b, (c, BOOST_PP_NIL))), it expands to the sequence: +
+ macro(r, data, 0, a) macro(r, data, 1, b) macro(r, data, 2, c) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/list/adt.hpp>
+#include <boost/preprocessor/list/for_each_i.hpp>
+#include <boost/preprocessor/repetition/for.hpp>
+
+#define LIST (x, (y, (z, BOOST_PP_NIL)))
+
+#define MACRO_2(r, data, i, elem) BOOST_PP_CAT(elem, i)
+
+#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
+#define OP(r, state) BOOST_PP_LIST_REST(state)
+#define MACRO(r, state) [ BOOST_PP_LIST_FOR_EACH_I_R(r, MACRO_2, _, state) ]
+
+BOOST_PP_FOR(LIST, PRED, OP, MACRO)
+   // expands to [x0 y1 z2] [y0 z1] [z0]
+
+ + diff --git a/doc/ref/list_for_each_product.html b/doc/ref/list_for_each_product.html new file mode 100644 index 0000000..8b67736 --- /dev/null +++ b/doc/ref/list_for_each_product.html @@ -0,0 +1,75 @@ + + + BOOST_PP_LIST_FOR_EACH_PRODUCT + + + +
+ The BOOST_PP_LIST_FOR_EACH_PRODUCT macro repeats a macro for each cartesian product of several lists. +
+

Usage

+
+ BOOST_PP_LIST_FOR_EACH_PRODUCT(macro, size, tuple) +
+

Arguments

+
+
macro
+
+ The binary macro of the form macro(r, product).  + This macro is expanded by BOOST_PP_FOR_EACH_PRODUCT with each cartesian product in tuple.  + It is expanded with the next available BOOST_PP_FOR repetition and a tuple containing a cartesian product.  + This tuple will have size elements. +
+
size
+
+ The size of tuple. +
+
tuple
+
+ A tuple of lists from which cartesian products are obtained. +
+
+

Remarks

+
+ This macro is a repetition construct.  + If two lists are (a, (b, (c, BOOST_PP_NIL))) and (x, (y, (z, BOOST_PP_NIL))), + this macro will produce the following sequence: +
+ macro(r, (a, x)) + macro(r, (a, y)) + macro(r, (a, z))
+ macro(r, (b, x)) + macro(r, (b, y)) + macro(r, (b, z))
+ macro(r, (c, x)) + macro(r, (c, y)) + macro(r, (c, z)) +
+
+
+ Previously, this macro could not be used inside BOOST_PP_FOR.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_FOR_EACH_PRODUCT_R in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/for_each_product.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (x, (y, (z, BOOST_PP_NIL)))
+
+#define MACRO(r, product) product
+
+BOOST_PP_LIST_FOR_EACH_PRODUCT(MACRO, 2, (L1, L2))
+   // expands to (a, x) (a, y) (a, z) (b, x) (b, y) (b, z) (c, x) (c, y) (c, z)
+
+ + diff --git a/doc/ref/list_for_each_product_r.html b/doc/ref/list_for_each_product_r.html new file mode 100644 index 0000000..7fcd84e --- /dev/null +++ b/doc/ref/list_for_each_product_r.html @@ -0,0 +1,107 @@ + + + BOOST_PP_LIST_FOR_EACH_PRODUCT_R + + + +
+ The BOOST_PP_LIST_FOR_EACH_PRODUCT_R macro repeats a macro for each cartesian product of several lists.  + It reenters BOOST_PP_FOR with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOR_EACH_PRODUCT_R(r, macro, size, tuple) +
+

Arguments

+
+
r
+
+ The next available BOOST_PP_FOR repetition. +
+
macro
+
+ The binary macro of the form macro(r, product).  + This macro is expanded by BOOST_PP_FOR_EACH_PRODUCT with each cartesian product in tuple.  + It is expanded with the next available BOOST_PP_FOR repetition and a tuple containing a cartesian product.  + This tuple will have size elements. +
+
size
+
+ The size of tuple. +
+
tuple
+
+ A tuple of lists from which cartesian products are obtained. +
+
+

Remarks

+
+ This macro is a repetition construct.  + If two lists are (a, (b, (c, BOOST_PP_NIL))) and (x, (y, (z, BOOST_PP_NIL))), + this macro will produce the following sequence: +
+ macro(r, (a, x)) + macro(r, (a, y)) + macro(r, (a, z))
+ macro(r, (b, x)) + macro(r, (b, y)) + macro(r, (b, z))
+ macro(r, (c, x)) + macro(r, (c, y)) + macro(r, (c, z)) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/list/for_each_product.hpp>
+#include <boost/preprocessor/repetition/for.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define L1 (a, (b, BOOST_PP_NIL))
+#define L2 (x, (y, BOOST_PP_NIL))
+
+#define PRED(r, state) BOOST_PP_TUPLE_ELEM(2, 0, state)
+
+#define OP(r, state) \
+   ( \
+      BOOST_PP_DEC( \
+         BOOST_PP_TUPLE_ELEM(2, 0, state) \
+      ), \
+      BOOST_PP_TUPLE_ELEM(2, 1, state) \
+   ) \
+   /**/
+
+#define MACRO(r, state) \
+   MACRO_I( \
+      r, \
+      BOOST_PP_TUPLE_ELEM(2, 0, state), \
+      BOOST_PP_TUPLE_ELEM(2, 1, state) \
+   ) \
+   /**/
+
+#define MACRO_I(r, c, t) \
+   BOOST_PP_LIST_FOR_EACH_PRODUCT_R( \
+      r, MACRO_P, 2, \
+      ( \
+         BOOST_PP_TUPLE_ELEM(2, BOOST_PP_DEC(c), t), \
+         BOOST_PP_TUPLE_ELEM(2, BOOST_PP_DEC(c), t) \
+      ) \
+   ) \
+   /**/
+
+#define MACRO_P(r, product) product
+
+BOOST_PP_FOR((2, (L1, L2)), PRED, OP, MACRO)
+   // expands to (x, x) (x, y) (y, x) (y, y) (a, a) (a, b) (b, a) (b, b)
+
+ + diff --git a/doc/ref/list_for_each_r.html b/doc/ref/list_for_each_r.html new file mode 100644 index 0000000..53e5f3b --- /dev/null +++ b/doc/ref/list_for_each_r.html @@ -0,0 +1,70 @@ + + + BOOST_PP_LIST_FOR_EACH_R + + + +
+ The BOOST_PP_LIST_FOR_EACH_R macro repeats a macro for each element in a list.  + It reenters BOOST_PP_FOR with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_FOR_EACH_R(r, macro, data, list) +
+

Arguments

+
+
r
+
+ The next available BOOST_PP_FOR repetition. +
+
macro
+
+ A ternary macro of the form macro(r, data, elem).  + This macro is expanded by BOOST_PP_LIST_FOR_EACH with each element in list.  + It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, and the current element. +
+
data
+
+ Auxiliary data passed to macro. +
+
list
+
+ The list for which macro will be invoked on each element. +
+
+

Remarks

+
+ This macro is a repetition construct.  + If list is (a, (b, (c, BOOST_PP_NIL))), it expands to the sequence: +
+ macro(r, data, a) macro(r, data, b) macro(r, data, c) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+#include <boost/preprocessor/list/for_each.hpp>
+#include <boost/preprocessor/repetition/for.hpp>
+
+#define LIST (x, (y, (z, BOOST_PP_NIL)))
+
+#define MACRO_2(r, data, elem) elem
+
+#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
+#define OP(r, state) BOOST_PP_LIST_REST(state)
+#define MACRO(r, state) [ BOOST_PP_LIST_FOR_EACH_R(r, MACRO_2, _, state) ]
+
+BOOST_PP_FOR(LIST, PRED, OP, MACRO)
+   // expands to [x y z] [y z] [z]
+
+ + diff --git a/doc/ref/list_is_cons.html b/doc/ref/list_is_cons.html new file mode 100644 index 0000000..4638218 --- /dev/null +++ b/doc/ref/list_is_cons.html @@ -0,0 +1,40 @@ + + + BOOST_PP_LIST_IS_CONS + + + +
+ The BOOST_PP_LIST_IS_CONS macro is a predicate that determines if a list not nil. +
+

Usage

+
+ BOOST_PP_LIST_IS_CONS(list) +
+

Arguments

+
+
list
+
+ A list. +
+
+

Remarks

+
+ If list is non-nil, this macro expands to 1.  + Otherwise, it expands to 0. +
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+
+#define LIST (a, BOOST_PP_NIL)
+
+BOOST_PP_LIST_IS_CONS(LIST) // expands to 1
+BOOST_PP_LIST_IS_CONS(BOOST_PP_LIST_REST(LIST)) // expands to 0
+
+ + diff --git a/doc/ref/list_is_nil.html b/doc/ref/list_is_nil.html new file mode 100644 index 0000000..47d4ba6 --- /dev/null +++ b/doc/ref/list_is_nil.html @@ -0,0 +1,40 @@ + + + BOOST_PP_LIST_IS_NIL + + + +
+ The BOOST_PP_LIST_IS_NIL macro is a predicate that determines if a list is nil. +
+

Usage

+
+ BOOST_PP_LIST_IS_NIL(list) +
+

Arguments

+
+
list
+
+ A list. +
+
+

Remarks

+
+ If list is nil, this macro expands to 1.  + Otherwise, it expands to 0. +
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+
+#define LIST (a, BOOST_PP_NIL)
+
+BOOST_PP_LIST_IS_NIL(LIST) // expands to 0
+BOOST_PP_LIST_IS_NIL(BOOST_PP_LIST_REST(LIST)) // expands to 1
+
+ + diff --git a/doc/ref/list_nil.html b/doc/ref/list_nil.html new file mode 100644 index 0000000..5400964 --- /dev/null +++ b/doc/ref/list_nil.html @@ -0,0 +1,57 @@ + + + BOOST_PP_LIST_NIL + + + +
+ The BOOST_PP_LIST_NIL macro is a nil list constructor. +
+

Usage

+
+ BOOST_PP_LIST_NIL +
+

Remarks

+
+ This macro represents the end of a list. +
+
+ This macro is no longer necessary.  + It simply expands to BOOST_PP_NIL.  + Because of this, this macro is deprecated. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+
+#define OLD \
+   BOOST_PP_LIST_CONS( \
+      a, \
+      BOOST_PP_LIST_CONS( \
+         b, \
+         BOOST_PP_LIST_CONS( \
+            c, \
+            BOOST_PP_LIST_NIL \
+         ) \
+      ) \
+   ) \
+   /**/
+
+#define NEW (a, (b, (c, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
+   // expands to a == a
+
+BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_RESTK(NEW)
+   // expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/list_rest.html b/doc/ref/list_rest.html new file mode 100644 index 0000000..d26f3cb --- /dev/null +++ b/doc/ref/list_rest.html @@ -0,0 +1,51 @@ + + + BOOST_PP_LIST_REST + + + +
+ The BOOST_PP_LIST_REST macro expands to the tail of a list. +
+

Usage

+
+ BOOST_PP_LIST_REST(list) +
+

Arguments

+
+
list
+
+ A non-nil list. +
+
+

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+
+#define OLD \
+   BOOST_PP_LIST_CONS( \
+      a, \
+      BOOST_PP_LIST_CONS( \
+         b, \
+         BOOST_PP_LIST_CONS( \
+            c, \
+            BOOST_PP_LIST_NIL \
+         ) \
+      ) \
+   ) \
+   /**/
+
+#define NEW (a, (b, (c, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
+   // expands to a == a
+
+BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_REST(NEW)
+   // expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/list_rest_n.html b/doc/ref/list_rest_n.html new file mode 100644 index 0000000..097ae2d --- /dev/null +++ b/doc/ref/list_rest_n.html @@ -0,0 +1,51 @@ + + + BOOST_PP_LIST_REST_N + + + +
+ The BOOST_PP_LIST_REST_N macro expands to a list of all but the first count elements of a list. +
+

Usage

+
+ BOOST_PP_LIST_REST_N(count, list) +
+

Arguments

+
+
count
+
+ The number of elements to remove from the beginning of list. +
+
list
+
+ The list from which the elements are extracted. +
+
+

Remarks

+
+ This macro removes count elements from the beginning of list and returns the remainder as a list +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_REST_N_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/rest_n.hpp>
+
+#define LIST (a, (b, (c, (d, BOOST_PP_NIL))))
+
+BOOST_PP_LIST_REST_N(2, LIST) // expands to (c, (d, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/list_rest_n_d.html b/doc/ref/list_rest_n_d.html new file mode 100644 index 0000000..b241f75 --- /dev/null +++ b/doc/ref/list_rest_n_d.html @@ -0,0 +1,60 @@ + + + BOOST_PP_LIST_REST_N_D + + + +
+ The BOOST_PP_LIST_REST_N_D macro expands to a list of all but the first count elements of a list.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_REST_N_D(d, count, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
count
+
+ The number of elements to remove from the beginning of list. +
+
list
+
+ The list from which the elements are extracted. +
+
+

Remarks

+
+ This macro removes count elements from the beginning of list and returns the remainder as a list +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/fold_right.hpp>
+#include <boost/preprocessor/list/rest_n.hpp>
+
+#define L1 (a, (b, (c, (d, BOOST_PP_NIL))))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_REST_N_D(d, 2, x), state)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to...
+   ((c, (d, BOOST_PP_NIL)), ((c, (d, BOOST_PP_NIL)),
+   ((c, (d, BOOST_PP_NIL)), BOOST_PP_NIL)))
+*/
+
+ + diff --git a/doc/ref/list_reverse.html b/doc/ref/list_reverse.html new file mode 100644 index 0000000..c4bf9bb --- /dev/null +++ b/doc/ref/list_reverse.html @@ -0,0 +1,44 @@ + + + BOOST_PP_LIST_REVERSE + + + +
+ The BOOST_PP_LIST_REVERSE macro expands to the reverse a list. +
+

Usage

+
+ BOOST_PP_LIST_REVERSE(list) +
+

Arguments

+
+
list
+
+ A list to be reversed. +
+
+

Remarks

+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_REVERSE_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/reverse.hpp>
+
+#define LIST (0, (1, (2, (3, BOOST_PP_NIL))))
+
+BOOST_PP_LIST_REVERSE(LIST) // expands to (3, (2, (1, (0, BOOST_PP_NIL))))
+
+ + diff --git a/doc/ref/list_reverse_d.html b/doc/ref/list_reverse_d.html new file mode 100644 index 0000000..e3e0e91 --- /dev/null +++ b/doc/ref/list_reverse_d.html @@ -0,0 +1,52 @@ + + + BOOST_PP_LIST_REVERSE_D + + + +
+ The BOOST_PP_LIST_REVERSE_D macro expands to the reverse a list.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_REVERSE_D(d, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
list
+
+ A list to be reversed. +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/fold_right.hpp>
+#include <boost/preprocessor/list/reverse.hpp>
+
+#define L1 (a, (b, (c, (d, BOOST_PP_NIL))))
+#define L2 (L1, (L1, (L1, BOOST_PP_NIL)))
+
+#define OP(d, state, x) (BOOST_PP_LIST_REVERSE_D(d, x), state)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, L2)
+/*
+   expands to...
+   ((d, (c, (b, (a, BOOST_PP_NIL)))), ((d, (c, (b, (a, BOOST_PP_NIL)))),
+   ((d, (c, (b, (a, BOOST_PP_NIL)))), BOOST_PP_NIL)))
+*/
+
+ + diff --git a/doc/ref/list_size.html b/doc/ref/list_size.html new file mode 100644 index 0000000..1f0d4f9 --- /dev/null +++ b/doc/ref/list_size.html @@ -0,0 +1,44 @@ + + + BOOST_PP_LIST_SIZE + + + +
+ The BOOST_PP_LIST_SIZE macro expands to the size of a list. +
+

Usage

+
+ BOOST_PP_LIST_SIZE(list) +
+

Arguments

+
+
list
+
+ A list whose size is to be calculated. +
+
+

Remarks

+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_SIZE_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/size.hpp>
+
+#define LIST (0, (1, (2, (3, BOOST_PP_NIL))))
+
+BOOST_PP_LIST_SIZE(LIST) // expands to 4
+
+ + diff --git a/doc/ref/list_size_d.html b/doc/ref/list_size_d.html new file mode 100644 index 0000000..e912356 --- /dev/null +++ b/doc/ref/list_size_d.html @@ -0,0 +1,56 @@ + + + BOOST_PP_LIST_SIZE_D + + + +
+ The BOOST_PP_LIST_SIZE_D macro expands to the size of a list.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_SIZE_D(d, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
list
+
+ A list whose size is to be calculated. +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/add.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
+#include <boost/preprocessor/list/size.hpp>
+
+#define L1 (a, (b, (c, BOOST_PP_NIL)))
+#define L2 (x, (y, BOOST_PP_NIL))
+#define L3 (p, (q, BOOST_PP_NIL))
+
+#define LIST (L1, (L2, (L3, BOOST_PP_NIL)))
+
+#define OP(d, state, x) \
+   BOOST_PP_ADD_D( \
+      d, state, \
+      BOOST_PP_LIST_SIZE_D(d, x) \
+   ) \
+   /**/
+
+BOOST_PP_LIST_FOLD_LEFT(OP, 0, LIST) // expands to 7
+
+ + diff --git a/doc/ref/list_to_tuple.html b/doc/ref/list_to_tuple.html new file mode 100644 index 0000000..e93574c --- /dev/null +++ b/doc/ref/list_to_tuple.html @@ -0,0 +1,51 @@ + + + BOOST_PP_LIST_TO_TUPLE + + + +
+ The BOOST_PP_LIST_TO_TUPLE macro converts a list to a tuple. +
+

Usage

+
+ BOOST_PP_LIST_TO_TUPLE(list) +
+

Arguments

+
+
list
+
+ The list to be converted. +
+
+

Remarks

+
+ If list is, for example, (a, (b, (c, BOOST_PP_NIL))), + this macro will produce: +
+ (a, b, c) +
+
+
+ Previously, this macro could not be used inside BOOST_PP_FOR.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_TO_TUPLE_R in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/to_tuple.hpp>
+
+#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
+
+BOOST_PP_LIST_TO_TUPLE(LIST) // expands to (w, x, y, z)
+
+ + diff --git a/doc/ref/list_to_tuple_r.html b/doc/ref/list_to_tuple_r.html new file mode 100644 index 0000000..402b980 --- /dev/null +++ b/doc/ref/list_to_tuple_r.html @@ -0,0 +1,58 @@ + + + BOOST_PP_LIST_TO_TUPLE_R + + + +
+ The BOOST_PP_LIST_TO_TUPLE_R macro converts a list to a tuple.  + It reenters BOOST_PP_FOR with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_TO_TUPLE_R(r, list) +
+

Arguments

+
+
r
+
+ The next available BOOST_PP_FOR repetition. +
+
list
+
+ The list to be converted. +
+
+

Remarks

+
+ If list is, for example, (a, (b, (c, BOOST_PP_NIL))), + this macro will produce: +
+ (a, b, c) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+#include <boost/preprocessor/list/to_tuple.hpp>
+#include <boost/preprocessor/repetition/for.hpp>
+
+#define LIST (x, (y, (z, BOOST_PP_NIL)))
+
+#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
+#define OP(r, state) BOOST_PP_LIST_REST(state)
+#define MACRO(r, state) BOOST_PP_LIST_TO_TUPLE_R(r, state)
+
+BOOST_PP_FOR(LIST, PRED, OP, MACRO)
+   // expands to (x, y, z) (y, z) (z)
+
+ + diff --git a/doc/ref/list_transform.html b/doc/ref/list_transform.html new file mode 100644 index 0000000..41e1422 --- /dev/null +++ b/doc/ref/list_transform.html @@ -0,0 +1,67 @@ + + + BOOST_PP_LIST_TRANSFORM + + + +
+ The BOOST_PP_LIST_TRANSFORM macro transforms each element in a list according to a supplied transformation. +
+

Usage

+
+ BOOST_PP_LIST_TRANSFORM(op, data, list) +
+

Arguments

+
+
op
+
+ A ternary predicate of the form op(d, data, elem).  + This transformation is expanded by BOOST_PP_LIST_TRANSFORM for each element in list with the next available BOOST_PP_WHILE iteration, + the auxiliary data, and the current element in list.  +
+
data
+
+ Auxiliary data passed to pred. +
+
list
+
+ The list to be transformed. +
+
+

Remarks

+
+ This macro expands op for each element in list.  + It builds a new list out of the results of each call.  + If, for example, list is (a, (b, (c, BOOST_PP_NIL))), + this macro expands to... +
+ (op(d, data, a), (op(d, data, b), (op(d, data, c), BOOST_PP_NIL))) +
+
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_LIST_TRANSFORM_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/list/transform.hpp>
+
+#define LIST (1, (3, (2, (5, BOOST_PP_NIL))))
+
+#define OP(d, data, elem) BOOST_PP_DEC(elem)
+
+BOOST_PP_LIST_TRANSFORM(OP, 3, LIST)
+   // expands to (0, (2, (1, (4, BOOST_PP_NIL))))
+
+ + diff --git a/doc/ref/list_transform_d.html b/doc/ref/list_transform_d.html new file mode 100644 index 0000000..62ebd9f --- /dev/null +++ b/doc/ref/list_transform_d.html @@ -0,0 +1,75 @@ + + + BOOST_PP_LIST_TRANSFORM_D + + + +
+ The BOOST_PP_LIST_TRANSFORM_D macro transforms each element in a list according to a supplied transformation.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
op
+
+ A ternary predicate of the form op(d, data, elem).  + This transformation is expanded by BOOST_PP_LIST_TRANSFORM for each element in list with the next available BOOST_PP_WHILE iteration, + the auxiliary data, and the current element in list.  +
+
data
+
+ Auxiliary data passed to pred. +
+
list
+
+ The list to be transformed. +
+
+

Remarks

+
+ This macro expands op for each element in list.  + It builds a new list out of the results of each call.  + If, for example, list is (a, (b, (c, BOOST_PP_NIL))), + this macro expands to... +
+ (op(d, data, a), (op(d, data, b), (op(d, data, c), BOOST_PP_NIL))) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/list/fold_right.hpp>
+#include <boost/preprocessor/list/transform.hpp>
+
+#define A (1, (2, (3, (4, BOOST_PP_NIL))))
+#define B (A, (A, (A, (A, BOOST_PP_NIL))))
+
+#define OP_T(d, data, x) BOOST_PP_INC(x)
+#define OP(d, state, x) (BOOST_PP_LIST_TRANSFORM_D(d, OP_T, 2, x), state)
+
+BOOST_PP_LIST_FOLD_RIGHT(OP, BOOST_PP_NIL, B)
+/*
+   expands to:
+   ((2, (3, (4, (5, BOOST_PP_NIL)))), ((2, (3, (4, (5, BOOST_PP_NIL)))),
+   ((2, (3, (4, (5, BOOST_PP_NIL)))), ((2, (3, (4, (5, BOOST_PP_NIL)))),
+   BOOST_PP_NIL))))
+*/
+
+ + diff --git a/doc/ref/local_iterate.html b/doc/ref/local_iterate.html new file mode 100644 index 0000000..fdf3a0e --- /dev/null +++ b/doc/ref/local_iterate.html @@ -0,0 +1,51 @@ + + + BOOST_PP_LOCAL_ITERATE + + + +
+ The BOOST_PP_LOCAL_ITERATE macro initiates a local-iteration. +
+

Usage

+
+ #include BOOST_PP_LOCAL_ITERATE() +
+

Remarks

+
+ This macro causes the user-defined macro BOOST_PP_LOCAL_MACRO to be expanded vertically with values in the range specified by BOOST_PP_LOCAL_LIMITS. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/iteration/local.hpp>
+
+template<int> struct sample;
+
+#define BOOST_PP_LOCAL_MACRO(n) \
+   template<> struct sample<n> { \
+      enum { value = n }; \
+   }; \
+   /**/
+
+#define BOOST_PP_LOCAL_LIMITS (1, 5)
+
+#include BOOST_PP_LOCAL_ITERATE()
+/* expands to...
+template<> struct sample<1> { enum { value = 1 }; };
+template<> struct sample<2> { enum { value = 2 }; };
+template<> struct sample<3> { enum { value = 3 }; };
+template<> struct sample<4> { enum { value = 4 }; };
+template<> struct sample<5> { enum { value = 5 }; };
+*/
+
+ + diff --git a/doc/ref/local_limits.html b/doc/ref/local_limits.html new file mode 100644 index 0000000..cba4785 --- /dev/null +++ b/doc/ref/local_limits.html @@ -0,0 +1,69 @@ + + + BOOST_PP_LOCAL_LIMITS + + + +
+ The BOOST_PP_LOCAL_LIMITS macro is a user-defined named external argument used by BOOST_PP_LOCAL_ITERATE. +
+

Usage

+
+ #define BOOST_PP_LOCAL_LIMITS (start, finish) +
+

Arguments

+
+
start
+
+ The lower bound (inclusive) of a local iteration.  + Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. +
+
finish
+
+ The upper bound (inclusive) of a local iteration.  + Valid values range from 0 to BOOST_PP_LIMIT_ITERATION. +
+
+

Remarks

+
+ Note that there is a whitespace character after the macro identifier. +
+
+ This macro must expand to a 2-element tuple.  + The elements of this tuple represent the lower and upper boundaries of a local iteration.  + Both start and finish are evaluated parameters.  + This implies that they can include simple arithmetic expressions (such as 1 + 3), etc.. +
+
+ This macro is automatically undefined for reuse by a call to BOOST_PP_LOCAL_ITERATE. +
+

See Also

+ +

Sample Code

+
+#include <boost/preprocessor/iteration/local.hpp>
+
+template<int> struct sample;
+
+#define BOOST_PP_LOCAL_MACRO(n) \
+   template<> struct sample<n> { \
+      enum { value = n }; \
+   }; \
+   /**/
+
+#define BOOST_PP_LOCAL_LIMITS (1, 5)
+
+#include BOOST_PP_LOCAL_ITERATE()
+/* expands to...
+template<> struct sample<1> { enum { value = 1 }; };
+template<> struct sample<2> { enum { value = 2 }; };
+template<> struct sample<3> { enum { value = 3 }; };
+template<> struct sample<4> { enum { value = 4 }; };
+template<> struct sample<5> { enum { value = 5 }; };
+*/
+
+ + diff --git a/doc/ref/local_macro.html b/doc/ref/local_macro.html new file mode 100644 index 0000000..92019c6 --- /dev/null +++ b/doc/ref/local_macro.html @@ -0,0 +1,53 @@ + + + BOOST_PP_LOCAL_MACRO + + + +
+ The BOOST_PP_LOCAL_MACRO macro is a user-defined named external argument used by BOOST_PP_LOCAL_ITERATE. +
+

Usage

+
+ #define BOOST_PP_LOCAL_MACRO(n) ... +
+

Arguments

+
+
n
+
+ The current iteration value received from the local-iteration mechanism. +
+
+

Remarks

+
+ This macro is automatically undefined for reuse by a call to BOOST_PP_LOCAL_ITERATE. +
+

See Also

+ +

Sample Code

+
+#include <boost/preprocessor/iteration/local.hpp>
+
+template<int> struct sample;
+
+#define BOOST_PP_LOCAL_MACRO(n) \
+   template<> struct sample<n> { \
+      enum { value = n }; \
+   }; \
+   /**/
+
+#define BOOST_PP_LOCAL_LIMITS (1, 5)
+
+#include BOOST_PP_LOCAL_ITERATE()
+/* expands to...
+template<> struct sample<1> { enum { value = 1 }; };
+template<> struct sample<2> { enum { value = 2 }; };
+template<> struct sample<3> { enum { value = 3 }; };
+template<> struct sample<4> { enum { value = 4 }; };
+template<> struct sample<5> { enum { value = 5 }; };
+*/
+
+ + diff --git a/doc/ref/lparen.html b/doc/ref/lparen.html new file mode 100644 index 0000000..e7f1d08 --- /dev/null +++ b/doc/ref/lparen.html @@ -0,0 +1,41 @@ + + + BOOST_PP_LPAREN + + + +
+ The BOOST_PP_LPAREN macro expands to a left parenthesis. +
+

Usage

+
+ BOOST_PP_LPAREN() +
+

Remarks

+
+ The preprocessor interprets parentheses as delimiters in macro invocations.  + Because of this, parentheses require special handling. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/punctuation/paren.hpp>
+
+#define X(x) x
+#define MACRO(p, x) X p x )
+
+MACRO(BOOST_PP_LPAREN(), abc) // expands to abc
+
+#define Y(x)
+
+MACRO((10) Y BOOST_PP_LPAREN(), result) // expands to 10
+
+ + diff --git a/doc/ref/lparen_if.html b/doc/ref/lparen_if.html new file mode 100644 index 0000000..729fb28 --- /dev/null +++ b/doc/ref/lparen_if.html @@ -0,0 +1,50 @@ + + + BOOST_PP_LPAREN_IF + + + +
+ The BOOST_PP_LPAREN_IF macro conditionally expands to a left parenthesis. +
+

Usage

+
+ BOOST_PP_LPAREN_IF(cond) +
+

Arguments

+
+
cond
+
+ The condition that determines if a the macro expands to a left parenthesis or nothing.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If cond expands to 0, this macro expands to nothing.  + Otherwise, it expands to a left parenthesis. +
+
+ The preprocessor interprets parentheses as delimiters in macro invocations.  + Because of this, parentheses require special handling. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/punctuation/paren_if.hpp>
+
+#define MACRO(c, x) BOOST_PP_LPAREN_IF(c) x BOOST_PP_RPAREN_IF(c)
+
+MACRO(0, text) // expands to text
+MACRO(1, text) // expands to (text)
+
+ + diff --git a/doc/ref/max.html b/doc/ref/max.html new file mode 100644 index 0000000..08e473b --- /dev/null +++ b/doc/ref/max.html @@ -0,0 +1,53 @@ + + + BOOST_PP_MAX + + + +
+ The BOOST_PP_MAX macro expands to the greater of its two arguments. +
+

Usage

+
+ BOOST_PP_MAX(x, y) +
+

Arguments

+
+
x
+
+ The first operand.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The second operand.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ This macro returns the greater of its two arguments or the value of both arguments if they are equal. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_MAX_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/selection/max.hpp>
+
+BOOST_PP_MAX(5, 7) // expands to 7
+BOOST_PP_MAX(3, 3) // expands to 3
+
+ + diff --git a/doc/ref/max_d.html b/doc/ref/max_d.html new file mode 100644 index 0000000..24bf134 --- /dev/null +++ b/doc/ref/max_d.html @@ -0,0 +1,59 @@ + + + BOOST_PP_MAX_D + + + +
+ The BOOST_PP_MAX_D macro expands to the greater of its second and third arguments.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_MAX_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The first operand.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The second operand.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ This macro returns the greater of its first and second arguments or the value of both arguments if they are equal. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/fold_left.hpp>
+#include <boost/preprocessor/selection/max.hpp>
+
+#define LIST (1, (3, (5, (2, (4, BOOST_PP_NIL)))))
+
+#define OP(d, state, x) BOOST_PP_MAX_D(d, state, x)
+
+#define LIST_MAX(list) BOOST_PP_LIST_FOLD_LEFT(OP, 0, LIST)
+
+LIST_MAX(LIST) // expands to 5
+
+ + diff --git a/doc/ref/min.html b/doc/ref/min.html new file mode 100644 index 0000000..d480f51 --- /dev/null +++ b/doc/ref/min.html @@ -0,0 +1,53 @@ + + + BOOST_PP_MIN + + + +
+ The BOOST_PP_MIN macro expands to the lesser of its two arguments. +
+

Usage

+
+ BOOST_PP_MIN(x, y) +
+

Arguments

+
+
x
+
+ The first operand.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The second operand.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ This macro returns the lesser of its two arguments or the value of both arguments if they are equal. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_MIN_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/selection/min.hpp>
+
+BOOST_PP_MIN(5, 7) // expands to 5
+BOOST_PP_MIN(3, 3) // expands to 3
+
+ + diff --git a/doc/ref/min_d.html b/doc/ref/min_d.html new file mode 100644 index 0000000..b833e77 --- /dev/null +++ b/doc/ref/min_d.html @@ -0,0 +1,59 @@ + + + BOOST_PP_MIN_D + + + +
+ The BOOST_PP_MIN_D macro expands to the lesser of its second and third arguments.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_MIN_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The first operand.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The second operand.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ This macro returns the lesser of its first and second arguments or the value of both arguments if they are equal. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/list/fold_left.hpp>
+#include <boost/preprocessor/selection/min.hpp>
+
+#define LIST (1, (3, (5, (2, (4, BOOST_PP_NIL)))))
+
+#define OP(d, state, x) BOOST_PP_MIN_D(d, state, x)
+
+#define LIST_MAX(list) BOOST_PP_LIST_FOLD_LEFT(OP, 20, LIST)
+
+LIST_MIN(LIST) // expands to 1
+
+ + diff --git a/doc/ref/mod.html b/doc/ref/mod.html new file mode 100644 index 0000000..6bc3ca5 --- /dev/null +++ b/doc/ref/mod.html @@ -0,0 +1,52 @@ + + + BOOST_PP_MOD + + + +
+ The BOOST_PP_MOD macro expands to the modulus of its arguments. +
+

Usage

+
+ BOOST_PP_MOD(x, y) +
+

Arguments

+
+
x
+
+ The dividend (numerator) of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The divisor (denominator) of the operation.  + Valid values range from 1 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_MOD_D in such a situation. +
+
+ If y is 0, the result is undefined. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/mod.hpp>
+
+BOOST_PP_MOD(11, 5) // expands to 1
+
+ + diff --git a/doc/ref/mod_d.html b/doc/ref/mod_d.html new file mode 100644 index 0000000..3614ab3 --- /dev/null +++ b/doc/ref/mod_d.html @@ -0,0 +1,64 @@ + + + BOOST_PP_MOD_D + + + +
+ The BOOST_PP_MOD_D macro expands to the modulus of its second and third arguments.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_MOD_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The dividend (numerator) of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The divisor (denominator) of the operation.  + Valid values range from 1 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If y is 0, the result is undefined. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/mod.hpp>
+#include <boost/preprocessor/list/filter.hpp>
+#include <boost/preprocessor/logical/not.hpp>
+
+#define LIST (1, (2, (3, (4, (5, BOOST_PP_NIL)))))
+
+#define EVEN_P(d, _, num) BOOST_PP_NOT(BOOST_PP_MOD_D(d, num, 2))
+#define EVEN(list) BOOST_PP_LIST_FILTER(EVEN_P, nil, list)
+
+EVEN(LIST) // expands to (2, (4, BOOST_PP_NIL))
+
+#define ODD_P(d, _, num) BOOST_PP_MOD_D(d, num, 2)
+#define ODD(list) BOOST_PP_LIST_FILTER(ODD_P, nil, list)
+
+ODD(LIST) // expands to (1, (3, (5, BOOST_PP_NIL)))
+
+ + diff --git a/doc/ref/mul.html b/doc/ref/mul.html new file mode 100644 index 0000000..175f23d --- /dev/null +++ b/doc/ref/mul.html @@ -0,0 +1,57 @@ + + + BOOST_PP_MUL + + + +
+ The BOOST_PP_MUL macro expands to the product of its arguments. +
+

Usage

+
+ BOOST_PP_MUL(x, y) +
+

Arguments

+
+
x
+
+ The multiplicand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The multiplier of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If the product of x and y is greater than BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_MUL_D in such a situation. +
+
+ This macro is the most efficient when x is less than or equal to y.  + However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.  + In other words, x should be the value that is most likely to be the largest of the two operands. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/mul.hpp>
+
+BOOST_PP_MUL(4, 4) // expands to 16
+
+ + diff --git a/doc/ref/mul_d.html b/doc/ref/mul_d.html new file mode 100644 index 0000000..b726cc0 --- /dev/null +++ b/doc/ref/mul_d.html @@ -0,0 +1,80 @@ + + + BOOST_PP_MUL_D + + + +
+ The BOOST_PP_MUL_D macro expands to the product of its second and third arguments.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_MUL_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The multiplicand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The multiplier of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If the product of x and y is greater than BOOST_PP_LIMIT_MAG, the result is saturated to BOOST_PP_LIMIT_MAG. +
+
+ This macro is the most efficient when x is less than or equal to y.  + However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.  + In other words, x should be the value that is most likely to be the largest of the two operands. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/arithmetic/mul.hpp>
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define PRED(d, data) BOOST_PP_TUPLE_ELEM(3, 0, data)
+
+#define OP(d, data) \
+   ( \
+      BOOST_PP_DEC( \
+         BOOST_PP_TUPLE_ELEM(3, 0, data) \
+      ), \
+      BOOST_PP_TUPLE_ELEM(3, 1, data), \
+      BOOST_PP_MUL_D( \
+         d, \
+         BOOST_PP_TUPLE_ELEM(3, 2, data), \
+         BOOST_PP_TUPLE_ELEM(3, 1, data) \
+      ) \
+   ) \
+   /**/
+
+// raise 'x' to the 'n'-th power
+#define EXP(x, n) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE(PRED, OP, (n, x, 1)))
+
+EXP(4, 2) // expands to 16
+EXP(2, 3) // expands to 8
+
+ + diff --git a/doc/ref/nil.html b/doc/ref/nil.html new file mode 100644 index 0000000..bdbe847 --- /dev/null +++ b/doc/ref/nil.html @@ -0,0 +1,30 @@ + + + BOOST_PP_NIL + + + +
+ The BOOST_PP_NIL identifier is reserved by the library to indicate a non-macro. +
+

Usage

+
+ BOOST_PP_NIL +
+

Remarks

+
+ This identifier is not defined.  + Its purpose is to not be a macro.  + It is also used to terminate a list. +
+

Sample Code

+
+#include <boost/preprocessor/list/adt.hpp>
+
+#define LIST (x, (y, (z, BOOST_PP_NIL)))
+
+BOOST_PP_LIST_FIRST(x) // expands to x
+BOOST_PP_LIST_REST(x) // expands to (y, (z, BOOST_PP_NIL))
+
+ + diff --git a/doc/ref/nor.html b/doc/ref/nor.html new file mode 100644 index 0000000..dd8d7cf --- /dev/null +++ b/doc/ref/nor.html @@ -0,0 +1,53 @@ + + + BOOST_PP_NOR + + + +
+ The BOOST_PP_NOR macro expands to the logical NOR of its operands. +
+

Usage

+
+ BOOST_PP_NOR(p, q) +
+

Arguments

+
+
p
+
+ The left operand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
q
+
+ The right operand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If both p and q are both 0, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro performs a boolean conversion on each operand before performing the logical NOR operation.  + If that conversion is not necessary, use BOOST_PP_BITNOR instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/nor.hpp>
+
+BOOST_PP_NOR(4, 0) // expands to 0
+BOOST_PP_NOR(0, 0) // expands to 1
+
+ + diff --git a/doc/ref/not.html b/doc/ref/not.html new file mode 100644 index 0000000..063d18e --- /dev/null +++ b/doc/ref/not.html @@ -0,0 +1,48 @@ + + + BOOST_PP_NOT + + + +
+ The BOOST_PP_NOT macro performs a logical NOT on its operand. +
+

Usage

+
+ BOOST_PP_NOT(x) +
+

Arguments

+
+
x
+
+ The value to be converted.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is non-zero, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro performs a boolean conversion on its operand before performing the logical NOT operation.  + If that conversion is not necessary, use BOOST_PP_COMPL instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/not.hpp>
+
+BOOST_PP_NOT(55) // expands to 0
+BOOST_PP_NOT(0) // expands to 1
+
+ + diff --git a/doc/ref/not_equal.html b/doc/ref/not_equal.html new file mode 100644 index 0000000..b5c4d16 --- /dev/null +++ b/doc/ref/not_equal.html @@ -0,0 +1,53 @@ + + + BOOST_PP_NOT_EQUAL + + + +
+ The BOOST_PP_NOT_EQUAL macro compares two values for inequality. +
+

Usage

+
+ BOOST_PP_NOT_EQUAL(x, y) +
+

Arguments

+
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is equal to y, this macro expands to 0.  + Otherwise, it expands to 1. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction because this macro no longer uses BOOST_PP_WHILE. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/not_equal.hpp>
+
+BOOST_PP_NOT_EQUAL(4, 3) // expands to 1
+BOOST_PP_NOT_EQUAL(5, 5) // expands to 0
+
+ + diff --git a/doc/ref/not_equal_d.html b/doc/ref/not_equal_d.html new file mode 100644 index 0000000..31eb0d0 --- /dev/null +++ b/doc/ref/not_equal_d.html @@ -0,0 +1,58 @@ + + + BOOST_PP_NOT_EQUAL_D + + + +
+ The BOOST_PP_NOT_EQUAL_D macro compares two values for inequality. +
+

Usage

+
+ BOOST_PP_NOT_EQUAL_D(d, x, y) +
+

Arguments

+
+
d
+
+ This argument is ignored. +
+
x
+
+ The left operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The right operand of the comparison.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If x is equal to y, this macro expands to 0.  + Otherwise, it expands to 1. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_NOT_EQUAL instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/comparison/equal.hpp>
+
+BOOST_PP_NOT_EQUAL_D(1, 4, 3) // expands to 1
+BOOST_PP_NOT_EQUAL_D(1, 5, 5) // expands to 0
+
+ + diff --git a/doc/ref/or.html b/doc/ref/or.html new file mode 100644 index 0000000..a8706f8 --- /dev/null +++ b/doc/ref/or.html @@ -0,0 +1,53 @@ + + + BOOST_PP_OR + + + +
+ The BOOST_PP_OR macro expands to the logical OR of its operands. +
+

Usage

+
+ BOOST_PP_OR(p, q) +
+

Arguments

+
+
p
+
+ The left operand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
q
+
+ The right operand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If either p or q is non-zero, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro performs a boolean conversion on each operand before performing the logical OR operation.  + If that conversion is not necessary, use BOOST_PP_BITOR instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/or.hpp>
+
+BOOST_PP_OR(4, 3) // expands to 1
+BOOST_PP_OR(5, 0) // expands to 1
+
+ + diff --git a/doc/ref/relative_finish.html b/doc/ref/relative_finish.html new file mode 100644 index 0000000..a56afcc --- /dev/null +++ b/doc/ref/relative_finish.html @@ -0,0 +1,35 @@ + + + BOOST_PP_RELATIVE_FINISH + + + + +
+ The BOOST_PP_RELATIVE_FINISH macro expands to the upper bound of a file-iteration depth relative to the current depth. +
+

Usage

+
+ BOOST_PP_RELATIVE_FINISH(i) +
+

Arguments

+
+
i
+
+ The relative depth of the frame whose upper bound is to be retreived.  + Valid values range from 0 to BOOST_PP_ITERATION_DEPTH() - 1. +
+
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+
+ The argument i is interpreted as the number of frames outward from the current frame. +
+

Requirements

+ + + diff --git a/doc/ref/relative_flags.html b/doc/ref/relative_flags.html new file mode 100644 index 0000000..7d51aa6 --- /dev/null +++ b/doc/ref/relative_flags.html @@ -0,0 +1,35 @@ + + + BOOST_PP_RELATIVE_FLAGS + + + + +
+ The BOOST_PP_RELATIVE_FLAGS macro expands to the flags associated with a file-iteration depth relative to the current depth. +
+

Usage

+
+ BOOST_PP_RELATIVE_FLAGS(i) +
+

Arguments

+
+
i
+
+ The relative depth of the frame whose flags are to be retreived.  + Valid values range from 0 to BOOST_PP_ITERATION_DEPTH() - 1. +
+
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+
+ The argument i is interpreted as the number of frames outward from the current frame. +
+

Requirements

+ + + diff --git a/doc/ref/relative_iteration.html b/doc/ref/relative_iteration.html new file mode 100644 index 0000000..d6e5556 --- /dev/null +++ b/doc/ref/relative_iteration.html @@ -0,0 +1,90 @@ + + + BOOST_PP_RELATIVE_ITERATION + + + +
+ The BOOST_PP_RELATIVE_ITERATION macro expands to the iteration value of a file-iteration depth relative to the current depth. +
+

Usage

+
+ BOOST_PP_RELATIVE_ITERATION(i) +
+

Arguments

+
+
i
+
+ The relative depth of the frame whose iteration value is to be retreived.  + Valid values range from 0 to BOOST_PP_ITERATION_DEPTH() - 1. +
+
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+
+ The argument i is interpreted as the number of frames outward from the current frame.  + Therefore, BOOST_PP_RELATIVE_ITERATION(0) is equivalent to BOOST_PP_ITERATION(). +
+

Requirements

+ +

Sample Code

+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H_
+   #define FILE_H_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+1st iteration:
+   #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, 3, "file.h", 0x0001))
+   #include BOOST_PP_ITERATE()
+
+2nd iteration:
+   #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 10, "file.h", 0x0002))
+   #include BOOST_PP_ITERATE()
+
+   #endif
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1 \
+   && BOOST_PP_ITERATION_FLAGS() == 0x0001 \
+   /**/
+
+   --
+   #define BOOST_PP_ITERATION_PARAMS_2 (3, (1, 10, "file.h"))
+   #include BOOST_PP_ITERATE()
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1 \
+   && BOOST_PP_ITERATION_FLAGS() == 0x0002 \
+   /**/
+
+   --
+   #define BOOST_PP_ITERATION_PARAMS_2 \
+      (3, (1, BOOST_PP_ITERATION(), "file.h")) \
+      /**/
+   #include BOOST_PP_ITERATE()
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2 \
+   && BOOST_PP_FRAME_FLAGS(1) == 0x0001 \
+   /**/
+
+   --
+   #define BOOST_PP_ITERATION_PARAMS_3 \
+      (3, (1, BOOST_PP_ITERATION(), "file.h")) \
+      /**/
+   #include BOOST_PP_ITERATE()
+
+#else // used by both
+
+   previous: BOOST_PP_RELATIVE_ITERATION(1)
+   current: BOOST_PP_ITERATION()
+
+#endif
+
+ + diff --git a/doc/ref/relative_start.html b/doc/ref/relative_start.html new file mode 100644 index 0000000..d0c9593 --- /dev/null +++ b/doc/ref/relative_start.html @@ -0,0 +1,35 @@ + + + BOOST_PP_RELATIVE_START + + + + +
+ The BOOST_PP_RELATIVE_START macro expands to the lower bound of a file-iteration depth relative to the current depth. +
+

Usage

+
+ BOOST_PP_RELATIVE_START(i) +
+

Arguments

+
+
i
+
+ The relative depth of the frame whose lower bound is to be retreived.  + Valid values range from 0 to BOOST_PP_ITERATION_DEPTH() - 1. +
+
+

Remarks

+
+ This macro is only valid when a file-iteration is in progress. +
+
+ The argument i is interpreted as the number of frames outward from the current frame. +
+

Requirements

+ + + diff --git a/doc/ref/repeat.html b/doc/ref/repeat.html new file mode 100644 index 0000000..a1c9559 --- /dev/null +++ b/doc/ref/repeat.html @@ -0,0 +1,69 @@ + + + BOOST_PP_REPEAT + + + +
+ The BOOST_PP_REPEAT macro represents a fast horizontal repetition construct. +
+

Usage

+
+ BOOST_PP_REPEAT(count, macro, data) +
+

Arguments

+
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) +
+
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_z. +
+
+ Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  + This limitation no longer exists, as the library can automatically detect the next available repetition depth. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define DECL(z, n, text) text ## n = n;
+
+BOOST_PP_REPEAT(5, DECL, int x)
+
+ + diff --git a/doc/ref/repeat_1st.html b/doc/ref/repeat_1st.html new file mode 100644 index 0000000..adca32c --- /dev/null +++ b/doc/ref/repeat_1st.html @@ -0,0 +1,71 @@ + + + BOOST_PP_REPEAT_1ST + + + +
+ The BOOST_PP_REPEAT_1ST macro represents the first dimension of BOOST_PP_REPEAT. +
+

Usage

+
+ BOOST_PP_REPEAT_1ST(count, macro, data) +
+

Arguments

+
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT_1ST with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) +
+
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_z. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_REPEAT instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define DECL(z, n, text) text ## n = n;
+
+BOOST_PP_REPEAT_1ST(5, DECL, int x)
+
+ + diff --git a/doc/ref/repeat_2nd.html b/doc/ref/repeat_2nd.html new file mode 100644 index 0000000..a2eda1e --- /dev/null +++ b/doc/ref/repeat_2nd.html @@ -0,0 +1,71 @@ + + + BOOST_PP_REPEAT_2ND + + + +
+ The BOOST_PP_REPEAT_2ND macro represents the second dimension of BOOST_PP_REPEAT. +
+

Usage

+
+ BOOST_PP_REPEAT_2ND(count, macro, data) +
+

Arguments

+
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT_2ND with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) +
+
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_z. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_REPEAT instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define DECL(z, n, text) text ## n = n;
+
+BOOST_PP_REPEAT_2ND(5, DECL, int x)
+
+ + diff --git a/doc/ref/repeat_3rd.html b/doc/ref/repeat_3rd.html new file mode 100644 index 0000000..ffb4c46 --- /dev/null +++ b/doc/ref/repeat_3rd.html @@ -0,0 +1,71 @@ + + + BOOST_PP_REPEAT_3RD + + + +
+ The BOOST_PP_REPEAT_3RD macro represents the third dimension of BOOST_PP_REPEAT. +
+

Usage

+
+ BOOST_PP_REPEAT_3RD(count, macro, data) +
+

Arguments

+
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT_3RD with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) +
+
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_z. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_REPEAT instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define DECL(z, n, text) text ## n = n;
+
+BOOST_PP_REPEAT_3RD(5, DECL, int x)
+
+ + diff --git a/doc/ref/repeat_from_to.html b/doc/ref/repeat_from_to.html new file mode 100644 index 0000000..b15a82d --- /dev/null +++ b/doc/ref/repeat_from_to.html @@ -0,0 +1,91 @@ + + + BOOST_PP_REPEAT_FROM_TO + + + +
+ The BOOST_PP_REPEAT_FROM_TO macro represents a fast horizontal repetition construct. +
+

Usage

+
+ BOOST_PP_REPEAT_FROM_TO(first, last, macro, data) +
+

Arguments

+
+
first
+
+ The lower bound of the repetition.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
last
+
+ The upper bound of the repetition. + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) +
+
+
+ The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. +
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_z. +
+
+ Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.  + This limitation no longer exists, as the library can automatically detect the next available repetition depth. +
+
+ This macro also uses BOOST_PP_WHILE.  + Because of this, there are also two variants of this macro for ideal reentrance into BOOST_PP_WHILE, + BOOST_PP_REPEAT_FROM_TO_D and BOOST_PP_REPEAT_FROM_TO_D_z. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+#define DECL(z, n, text) BOOST_PP_CAT(text, n) = n;
+
+BOOST_PP_REPEAT_FROM_TO(5, 10, DECL, int x)
+   /*
+      expands to:
+      int x5 = 5; int x6 = 6; int x7 = 7;
+      int x8 = 8; int x9 = 9;
+   */
+
+ + diff --git a/doc/ref/repeat_from_to_1st.html b/doc/ref/repeat_from_to_1st.html new file mode 100644 index 0000000..a153233 --- /dev/null +++ b/doc/ref/repeat_from_to_1st.html @@ -0,0 +1,80 @@ + + + BOOST_PP_REPEAT_FROM_TO_1ST + + + +
+ The BOOST_PP_REPEAT_FROM_TO_1ST macro represents the first dimension of BOOST_PP_REPEAT_FROM_TO. +
+

Usage

+
+ BOOST_PP_REPEAT_FROM_TO_1ST(first, last, macro, data) +
+

Arguments

+
+
first
+
+ The lower bound of the repetition.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
last
+
+ The upper bound of the repetition. + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT_FROM_TO_1ST with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) +
+
+
+ The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. +
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_z. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_REPEAT_FROM_TO instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+#define MACRO(z, n, data) (n)
+
+BOOST_PP_REPEAT_FROM_TO_1ST(1, 6, MACRO, nil)
+   // expands to (1) (2) (3) (4) (5)
+
+ + diff --git a/doc/ref/repeat_from_to_2nd.html b/doc/ref/repeat_from_to_2nd.html new file mode 100644 index 0000000..5102b7d --- /dev/null +++ b/doc/ref/repeat_from_to_2nd.html @@ -0,0 +1,80 @@ + + + BOOST_PP_REPEAT_FROM_TO_2ND + + + +
+ The BOOST_PP_REPEAT_FROM_TO_2ND macro represents the second dimension of BOOST_PP_REPEAT_FROM_TO. +
+

Usage

+
+ BOOST_PP_REPEAT_FROM_TO_2ND(first, last, macro, data) +
+

Arguments

+
+
first
+
+ The lower bound of the repetition.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
last
+
+ The upper bound of the repetition. + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT_FROM_TO_2ND with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) +
+
+
+ The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. +
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_z. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_REPEAT_FROM_TO instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+#define MACRO(z, n, data) (n)
+
+BOOST_PP_REPEAT_FROM_TO_2ND(1, 6, MACRO, nil)
+   // expands to (1) (2) (3) (4) (5)
+
+ + diff --git a/doc/ref/repeat_from_to_3rd.html b/doc/ref/repeat_from_to_3rd.html new file mode 100644 index 0000000..13d5258 --- /dev/null +++ b/doc/ref/repeat_from_to_3rd.html @@ -0,0 +1,80 @@ + + + BOOST_PP_REPEAT_FROM_TO_3RD + + + +
+ The BOOST_PP_REPEAT_FROM_TO_3RD macro represents the third dimension of BOOST_PP_REPEAT_FROM_TO. +
+

Usage

+
+ BOOST_PP_REPEAT_FROM_TO_3RD(first, last, macro, data) +
+

Arguments

+
+
first
+
+ The lower bound of the repetition.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
last
+
+ The upper bound of the repetition. + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT_FROM_TO_3RD with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) +
+
+
+ The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. +
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_z. +
+
+ This macro is deprecated.  + It only exists for backward compatibility.  + Use BOOST_PP_REPEAT_FROM_TO instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+#define MACRO(z, n, data) (n)
+
+BOOST_PP_REPEAT_FROM_TO_3RD(1, 6, MACRO, nil)
+   // expands to (1) (2) (3) (4) (5)
+
+ + diff --git a/doc/ref/repeat_from_to_d.html b/doc/ref/repeat_from_to_d.html new file mode 100644 index 0000000..5354a0d --- /dev/null +++ b/doc/ref/repeat_from_to_d.html @@ -0,0 +1,72 @@ + + + BOOST_PP_REPEAT_FROM_TO_D + + + +
+ The BOOST_PP_REPEAT_FROM_TO_D macro represents a fast horizontal repetition construct.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_REPEAT_FROM_TO_D(d, first, last, macro, data) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
first
+
+ The lower bound of the repetition.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
last
+
+ The upper bound of the repetition. + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) +
+
+
+ The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. +
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+
+ To directly use this z value, rather than simply passing it to another macro, see BOOST_PP_REPEAT_FROM_TO_D_z. +
+

See Also

+ +

Requirements

+ + + diff --git a/doc/ref/repeat_from_to_d_z.html b/doc/ref/repeat_from_to_d_z.html new file mode 100644 index 0000000..186763a --- /dev/null +++ b/doc/ref/repeat_from_to_d_z.html @@ -0,0 +1,73 @@ + + + BOOST_PP_REPEAT_FROM_TO_D_z + + + +
+ The BOOST_PP_REPEAT_FROM_TO_D_z macro represents a fast horizontal repetition construct.  + It reenters both BOOST_PP_REPEAT and BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_REPEAT_FROM_TO_D_z(d, first, last, macro, data) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
first
+
+ The lower bound of the repetition.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
last
+
+ The upper bound of the repetition. + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) +
+
+
+ The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. +
+
+ The z value that is passed to macro represents the next available repetition dimension.  + Other macros that have _Z suffix variants internally use BOOST_PP_REPEAT--for example, BOOST_PP_ENUM_PARAMS and BOOST_PP_ENUM_PARAMS_Z.  + Using these _Z versions is not strictly necessary, but passing the z value (that is passed to macro) to these macros allows them to reenter BOOST_PP_REPEAT with maximum efficiency. +
+

See Also

+ +

Requirements

+ + + diff --git a/doc/ref/repeat_from_to_z.html b/doc/ref/repeat_from_to_z.html new file mode 100644 index 0000000..3467529 --- /dev/null +++ b/doc/ref/repeat_from_to_z.html @@ -0,0 +1,94 @@ + + + BOOST_PP_REPEAT_FROM_TO_z + + + +
+ The BOOST_PP_REPEAT_FROM_TO_z macro represents a reentry into the BOOST_PP_REPEAT_FROM_TO repetition construct. +
+

Usage

+
+ BOOST_PP_REPEAT_FROM_TO_ ## z(first, last, macro, data) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
first
+
+ The lower bound of the repetition.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
last
+
+ The upper bound of the repetition. + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, first, data) macro(z, first + 1, data) ... macro(z, last - 1, data) +
+
+
+ The number of repetitions (i.e. last - first) must not exceed BOOST_PP_LIMIT_REPEAT. +
+
+ At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  + This happens when the z value is a macro invocation itself.  + It needs a delay to allow it to expand.  + The syntax in such a scenario becomes: +
+ BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, z)(count, macro, data). +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+#define TEXT(z, n, data) n data
+
+#define MACRO(z, n, data) \
+  ( \
+     BOOST_PP_REPEAT_FROM_TO_ ## z( \
+        1, 4, \
+        TEXT, xyz \
+     ) \
+  ) \
+  /**/
+
+BOOST_PP_REPEAT(3, MACRO, _)
+   /*
+      expands to:
+      (1 xyz 2 xyz 3 xyz)
+      (1 xyz 2 xyz 3 xyz)
+      (1 xyz 2 xyz 3 xyz)
+   */
+
+ + diff --git a/doc/ref/repeat_z.html b/doc/ref/repeat_z.html new file mode 100644 index 0000000..b157bd5 --- /dev/null +++ b/doc/ref/repeat_z.html @@ -0,0 +1,89 @@ + + + BOOST_PP_REPEAT_z + + + +
+ The BOOST_PP_REPEAT_z macro represents a reentry into the BOOST_PP_REPEAT repetition construct. +
+

Usage

+
+ BOOST_PP_REPEAT_ ## z(count, macro, data) +
+

Arguments

+
+
z
+
+ The next available BOOST_PP_REPEAT dimension. +
+
count
+
+ The number of repetitious calls to macro.  + Valid values range from 0 to BOOST_PP_LIMIT_REPEAT. +
+
macro
+
+ A ternary operation of the form macro(z, n, data).  + This macro is expanded by BOOST_PP_REPEAT with the next available repetition depth, + the current repetition number, and the auxiliary data argument.  +
+
data
+
+ Auxiliary data passed to macro. +
+
+

Remarks

+
+ This macro expands to the sequence: +
+ macro(z, 0, data) macro(z, 1, data) ... macro(z, count - 1, data) +
+
+
+ At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  + This happens when the z value is a macro invocation itself.  + It needs a delay to allow it to expand.  + The syntax in such a scenario becomes: +
+ BOOST_PP_CAT(BOOST_PP_REPEAT_, z)(count, macro, data) +
+
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define TEXT(z, n, text) BOOST_PP_COMMA_IF(n) text
+
+#define TEMPLATE(z, n, _) \
+   BOOST_PP_COMMA_IF(n) \
+   template< \
+      BOOST_PP_REPEAT_ ## z( \
+         BOOST_PP_INC(n), \
+         TEXT, class \
+      ) \
+   > class T ## n \
+   /**/
+
+BOOST_PP_REPEAT(3, TEMPLATE, nil)
+   /*
+   expands to:
+      template<class> class T0,
+      template<class, class> class T1,
+      template<class, class, class> class T2
+   */
+
+ + diff --git a/doc/ref/rparen.html b/doc/ref/rparen.html new file mode 100644 index 0000000..a833ae8 --- /dev/null +++ b/doc/ref/rparen.html @@ -0,0 +1,42 @@ + + + BOOST_PP_RPAREN + + + +
+ The BOOST_PP_RPAREN macro expands to a right parenthesis. +
+

Usage

+
+ BOOST_PP_RPAREN() +
+

Remarks

+
+ The preprocessor interprets parentheses as delimiters in macro invocations.  + Because of this, parentheses require special handling. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/punctuation/paren.hpp>
+
+#define X(x) x
+#define MACRO(x, p) X ( x p
+
+MACRO(abc, BOOST_PP_RPAREN()) // expands to abc
+
+#define Y(x)
+
+MACRO(BOOST_PP_EMPTY BOOST_PP_RPAREN()(), 10) // expands to 10
+
+ + diff --git a/doc/ref/rparen_if.html b/doc/ref/rparen_if.html new file mode 100644 index 0000000..db195b4 --- /dev/null +++ b/doc/ref/rparen_if.html @@ -0,0 +1,50 @@ + + + BOOST_PP_RPAREN_IF + + + +
+ The BOOST_PP_RPAREN_IF macro conditionally expands to a right parenthesis. +
+

Usage

+
+ BOOST_PP_RPAREN_IF(cond) +
+

Arguments

+
+
cond
+
+ The condition that determines if a the macro expands to a right parenthesis or nothing.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If cond expands to 0, this macro expands to nothing.  + Otherwise, it expands to a right parenthesis. +
+
+ The preprocessor interprets parentheses as delimiters in macro invocations.  + Because of this, parentheses require special handling. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/punctuation/paren_if.hpp>
+
+#define MACRO(c, x) BOOST_PP_LPAREN_IF(c) x BOOST_PP_RPAREN_IF(c)
+
+MACRO(0, text) // expands to text
+MACRO(1, text) // expands to (text)
+
+ + diff --git a/doc/ref/slot.html b/doc/ref/slot.html new file mode 100644 index 0000000..1455477 --- /dev/null +++ b/doc/ref/slot.html @@ -0,0 +1,49 @@ + + + BOOST_PP_SLOT + + + +
+ The BOOST_PP_SLOT macro retrieves a value previously evaluated by BOOST_PP_ASSIGN_SLOT. +
+

Usage

+
+ #include BOOST_PP_SLOT(i) +
+

Arguments

+
+
i
+
+ The slot index to be retrieved.  + This value must be in the range of 1 to BOOST_PP_LIMIT_SLOT_COUNT. +
+
+

Remarks

+
+ Prior to use, the slot at index i must have been assigned with BOOST_PP_ASSIGN_SLOT. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/slot/slot.hpp>
+
+#define X() 4
+
+#define BOOST_PP_VALUE 1 + 2 + 3 + X()
+#include BOOST_PP_ASSIGN_SLOT(1)
+
+#undef X
+
+BOOST_PP_SLOT(1) // expands to 10
+
+ + diff --git a/doc/ref/stringize.html b/doc/ref/stringize.html new file mode 100644 index 0000000..160ff14 --- /dev/null +++ b/doc/ref/stringize.html @@ -0,0 +1,39 @@ + + + BOOST_PP_STRINGIZE + + + +
+ The BOOST_PP_STRINGIZE macro stringizes its argument after it has been expanded. +
+

Usage

+
+ BOOST_PP_STRINGIZE(text) +
+

Arguments

+
+
text
+
+ The text to be converted to a string literal. +
+
+

Remarks

+
+ The preprocessor stringizing operator (#) prevents arguments from expanding.  + This macro allows its argument to expand before it is stringized. +
+ +

Requirements

+ +

Sample Code

+ + + diff --git a/doc/ref/sub.html b/doc/ref/sub.html new file mode 100644 index 0000000..7030124 --- /dev/null +++ b/doc/ref/sub.html @@ -0,0 +1,52 @@ + + + BOOST_PP_SUB + + + +
+ The BOOST_PP_SUB macro expands to the difference between its arguments. +
+

Usage

+
+ BOOST_PP_SUB(x, y) +
+

Arguments

+
+
x
+
+ The minuend of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The subtrahend of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If the difference between x and y is less than 0, the result is saturated to 0. +
+
+ Previously, this macro could not be used inside BOOST_PP_WHILE.  + There is no longer any such restriction.  + It is more efficient, however, to use BOOST_PP_SUB_D in such a situation. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/sub.hpp>
+
+BOOST_PP_SUB(4, 3) // expands to 1
+
+ + diff --git a/doc/ref/sub_d.html b/doc/ref/sub_d.html new file mode 100644 index 0000000..11db2e2 --- /dev/null +++ b/doc/ref/sub_d.html @@ -0,0 +1,74 @@ + + + BOOST_PP_SUB_D + + + +
+ The BOOST_PP_SUB_D macro expands to the difference between its second and third arguments.  + It reenters BOOST_PP_WHILE with maximum efficiency. +
+

Usage

+
+ BOOST_PP_SUB_D(d, x, y) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration.  +
+
x
+
+ The minuend of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
y
+
+ The subtrahend of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If the difference between x and y is less than 0, the result is saturated to 0. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define PRED(d, data) BOOST_PP_TUPLE_ELEM(2, 0, data)
+
+#define OP(d, data) \
+   ( \
+      BOOST_PP_DEC( \
+         BOOST_PP_TUPLE_ELEM(2, 0, data) \
+      ), \
+      BOOST_PP_SUB_D( \
+         d, \
+         BOOST_PP_TUPLE_ELEM(2, 1, data), \
+         2 \
+      ) \
+   ) \
+   /**/
+
+// decrement 'x' by 2 'n' times
+#define STRIDE(x, n) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_WHILE(PRED, OP, (n, x)))
+
+STRIDE(10, 2) // expands to 6
+STRIDE(14, 6) // expands to 2
+
+ + diff --git a/doc/ref/tuple_eat.html b/doc/ref/tuple_eat.html new file mode 100644 index 0000000..ac2b0f4 --- /dev/null +++ b/doc/ref/tuple_eat.html @@ -0,0 +1,47 @@ + + + BOOST_PP_TUPLE_EAT + + + +
+ The BOOST_PP_TUPLE_EAT macro expands to a macro that eats a tuple of the specified size. +
+

Usage

+
+ BOOST_PP_TUPLE_EAT(size) +
+

Arguments

+
+
size
+
+ The size of the tuple to be eaten.  + Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  +
+
+

Remarks

+
+ The size argument must be the actual size of the tuple. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+
+#define OP(a, b) (a b)
+
+#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT(2))(1, 2)
+
+MACRO(0) // expands to nothing
+MACRO(1) // expands to (1, 2)
+
+ + diff --git a/doc/ref/tuple_elem.html b/doc/ref/tuple_elem.html new file mode 100644 index 0000000..b561e74 --- /dev/null +++ b/doc/ref/tuple_elem.html @@ -0,0 +1,54 @@ + + + BOOST_PP_TUPLE_ELEM + + + +
+ The BOOST_PP_TUPLE_ELEM macro extracts an element from a tuple. +
+

Usage

+
+ BOOST_PP_TUPLE_ELEM(size, i, tuple) +
+

Arguments

+
+
size
+
+ The size of the tuple.  + Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  +
+
i
+
+ The zero-based index into the tuple of the element to be extracted.  + Valid values range from 0 to size - 1. +
+
tuple
+
+ The tuple from which an element is to be extracted. +
+
+

Remarks

+
+ The size argument must be the actual size of the tuple, + and i must be less than the size of the tuple. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define TUPLE (a, b, c, d)
+
+BOOST_PP_TUPLE_ELEM(4, 0, TUPLE) // expands to a
+BOOST_PP_TUPLE_ELEM(4, 3, TUPLE) // expands to d
+
+ + diff --git a/doc/ref/tuple_rem.html b/doc/ref/tuple_rem.html new file mode 100644 index 0000000..779fbd4 --- /dev/null +++ b/doc/ref/tuple_rem.html @@ -0,0 +1,41 @@ + + + BOOST_PP_TUPLE_REM + + + +
+ The BOOST_PP_TUPLE_REM macro expands to a macro that removes the parentheses from a tuple of the specified size. +
+

Usage

+
+ BOOST_PP_TUPLE_REM(size) +
+

Arguments

+
+
size
+
+ The size of the tuple from which the parentheses are to be removed.  + Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  +
+
+

Remarks

+
+ The size argument must be the actual size of the tuple. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/tuple/rem.hpp>
+
+BOOST_PP_TUPLE_REM(3)(x, y, z) // expands to x, y, z
+
+ + diff --git a/doc/ref/tuple_reverse.html b/doc/ref/tuple_reverse.html new file mode 100644 index 0000000..3db79b6 --- /dev/null +++ b/doc/ref/tuple_reverse.html @@ -0,0 +1,45 @@ + + + BOOST_PP_TUPLE_REVERSE + + + +
+ The BOOST_PP_TUPLE_REVERSE macro reverses a tuple of the specified size. +
+

Usage

+
+ BOOST_PP_TUPLE_REVERSE(size, tuple) +
+

Arguments

+
+
size
+
+ The size of the tuple to be reversed.  + Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  +
+
tuple
+
+ The tuple to be reversed. +
+
+

Remarks

+
+ The size argument must be the actual size of the tuple. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/tuple/reverse.hpp>
+
+BOOST_PP_TUPLE_REVERSE(3, (x, y, z)) // expands to (z, y, x)
+
+ + diff --git a/doc/ref/tuple_to_list.html b/doc/ref/tuple_to_list.html new file mode 100644 index 0000000..1104f7f --- /dev/null +++ b/doc/ref/tuple_to_list.html @@ -0,0 +1,46 @@ + + + BOOST_PP_TUPLE_TO_LIST + + + +
+ The BOOST_PP_TUPLE_TO_LIST macro converts a tuple to a list. +
+

Usage

+
+ BOOST_PP_TUPLE_TO_LIST(size, tuple) +
+

Arguments

+
+
size
+
+ The size of the tuple to be converted.  + Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE.  +
+
tuple
+
+ The tuple to be converted. +
+
+

Remarks

+
+ The size argument must be the actual size of the tuple. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/tuple/to_list.hpp>
+
+BOOST_PP_TUPLE_TO_LIST(3, (x, y, z))
+   // expands to (x, (y, (z, BOOST_PP_NIL)))
+
+ + diff --git a/doc/ref/value.html b/doc/ref/value.html new file mode 100644 index 0000000..df87afa --- /dev/null +++ b/doc/ref/value.html @@ -0,0 +1,26 @@ + + + BOOST_PP_VALUE + + + +
+ The BOOST_PP_VALUE macro is a user-defined named external argument to BOOST_PP_ASSIGN_SLOT. +
+

Usage

+
+ #define BOOST_PP_VALUE value +
+

Arguments

+
+
value
+
+ An intergral constant expression to be evaluated by BOOST_PP_ASSIGN_SLOT. +
+
+

See Also

+ + + diff --git a/doc/ref/while.html b/doc/ref/while.html new file mode 100644 index 0000000..4536003 --- /dev/null +++ b/doc/ref/while.html @@ -0,0 +1,105 @@ + + + BOOST_PP_WHILE + + + +
+ The BOOST_PP_WHILE macro represents a looping construct. +
+

Usage

+
+ BOOST_PP_WHILE(pred, op, state) +
+

Arguments

+
+
pred
+
+ A binary predicate of the form pred(d, state).  + This predicate is expanded by BOOST_PP_WHILE with the next available + iteration d and the current state.  + This predicate must expand to value in the range of 0 to BOOST_PP_LIMIT_MAG. + The construct continues to loop until this predicate returns 0.  + When this predicate returns 0, BOOST_PP_WHILE returns the current state. +
+
op
+
+ A binary operation of the form op(d, state).  + This operation is expanded by BOOST_PP_WHILE with the next available + iteration d and the current state.  + This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. +
+
state
+
+ The initial state.  + Often this argument is a tuple. +
+
+

Remarks

+
+ This macro iterates op(d, state) while pred(d, state) is non-zero.  + In other words expands to: +
+ op(d, ... op(d, op(d, state)) ... ). +
+
+
+ The d value that is passed to both pred and op represents the next available iteration.  + Other macros that have _D suffix variants internally use BOOST_PP_WHILE--for example, BOOST_PP_ADD and BOOST_PP_ADD_D.  + Using these _D versions is not strictly necessary, but passing the d value (that passed to pred or op) to these macros allows them to reenter BOOST_PP_WHILE with maximum efficiency. +
+
+ To directly use this d value, rather than simply passing it to another macro, see BOOST_PP_WHILE_d. +
+
+ Previously, this macro could not be used recursively inside BOOST_PP_WHILE.  + This limitation no longer exists, as the library can automatically detect the next available iteration. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/add.hpp>
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define PRED(n, state) BOOST_PP_TUPLE_ELEM(2, 1, state)
+
+#define OP(d, state) \
+   OP_D( \
+      d, \
+      BOOST_PP_TUPLE_ELEM(2, 0, state), \
+      BOOST_PP_TUPLE_ELEM(2, 1, state) \
+   ) \
+   /**/
+
+#define OP_D(d, res, c) \
+   ( \
+      BOOST_PP_ADD_D( \
+         d, \
+         res, \
+         BOOST_PP_DEC(c) \
+      ), \
+      BOOST_PP_DEC(c) \
+   ) \
+   /**/
+
+#define SUMMATION(n) \
+   BOOST_PP_TUPLE_ELEM( \
+      2, 0, \
+      BOOST_PP_WHILE(PRED, OP, (n, n)) \
+   ) \
+   /**/
+
+SUMMATION(3) // expands to 6
+SUMMATION(4) // expands to 10
+
+ + diff --git a/doc/ref/while_d.html b/doc/ref/while_d.html new file mode 100644 index 0000000..a186c2d --- /dev/null +++ b/doc/ref/while_d.html @@ -0,0 +1,118 @@ + + + BOOST_PP_WHILE_d + + + +
+ The BOOST_PP_WHILE_d macro represents a reentry into the BOOST_PP_WHILE looping construct. +
+

Usage

+
+ BOOST_PP_WHILE_ ## d(pred, op, state) +
+

Arguments

+
+
d
+
+ The next available BOOST_PP_WHILE iteration. +
+
pred
+
+ A binary predicate of the form pred(d, state).  + This predicate is expanded by BOOST_PP_WHILE with the next available + iteration d and the current state.  + This predicate must expand to value in the range of 0 to BOOST_PP_LIMIT_MAG. + The construct continues to loop until this predicate returns 0.  + When this predicate returns 0, BOOST_PP_WHILE returns the current state. +
+
op
+
+ A binary operation of the form op(d, state).  + This operation is expanded by BOOST_PP_WHILE with the next available + iteration d and the current state.  + This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. +
+
state
+
+ The initial state.  + Often this argument is a tuple. +
+
+

Remarks

+
+ This macro iterates op(d, state) while pred(d, state) is non-zero.  + In other words expands to: +
+ op(d, ... op(d, op(d, state)) ... ). +
+
+
+ At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  + This happens when the d value is a macro invocation itself.  + It needs a delay to allow it to expand.  + The syntax in such a scenario becomes: +
+ BOOST_PP_CAT(BOOST_PP_WHILE_, d)(pred, op, state). +
+
+
+ Previously, it was possible to concatenate d directly to BOOST_PP_WHILE (without the trailing underscore).  + This is no longer supported. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/arithmetic/add.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/array/elem.hpp>
+#include <boost/preprocessor/array/size.hpp>
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define PRED(d, data) BOOST_PP_TUPLE_ELEM(3, 1, data)
+
+#define OP(d, data) \
+   OP_D( \
+      d, \
+      BOOST_PP_TUPLE_ELEM(3, 0, data), \
+      BOOST_PP_TUPLE_ELEM(3, 1, data), \
+      BOOST_PP_TUPLE_ELEM(3, 2, data) \
+   ) \
+   /**/
+
+#define OP_D(d, res, i, array) \
+   ( \
+      BOOST_PP_ADD_D( \
+         d, res, \
+         BOOST_PP_ARRAY_ELEM(BOOST_PP_DEC(i), array)), \
+      BOOST_PP_DEC(i), \
+      array \
+   ) \
+   /**/
+
+#define ACCUMULATE_D(d, array) \
+   BOOST_PP_TUPLE_ELEM( \
+      3, 0, \
+      BOOST_PP_WHILE_ ## d( \
+         PRED, OP, \
+         (0, BOOST_PP_ARRAY_SIZE(array), array) \
+      ) \
+   ) \
+   /**/
+
+#define ARRAY (4, (1, 2, 3, 4))
+
+ACCUMULATE_D(1, ARRAY)// expands to 10
+
+ + diff --git a/doc/ref/xor.html b/doc/ref/xor.html new file mode 100644 index 0000000..84141e0 --- /dev/null +++ b/doc/ref/xor.html @@ -0,0 +1,53 @@ + + + BOOST_PP_XOR + + + +
+ The BOOST_PP_XOR macro expands to the logical XOR of its operands. +
+

Usage

+
+ BOOST_PP_XOR(p, q) +
+

Arguments

+
+
p
+
+ The left operand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
q
+
+ The right operand of the operation.  + Valid values range from 0 to BOOST_PP_LIMIT_MAG. +
+
+

Remarks

+
+ If either p or q is non-zero exclusively, this macro expands to 1.  + Otherwise, it expands to 0. +
+
+ This macro performs a boolean conversion on each operand before performing the logical XOR operation.  + If that conversion is not necessary, use BOOST_PP_BITXOR instead. +
+

See Also

+ +

Requirements

+ +

Sample Code

+
+#include <boost/preprocessor/logical/xor.hpp>
+
+BOOST_PP_XOR(4, 3) // expands to 0
+BOOST_PP_XOR(5, 0) // expands to 1
+
+ + diff --git a/doc/resources.html b/doc/resources.html new file mode 100644 index 0000000..5945b32 --- /dev/null +++ b/doc/resources.html @@ -0,0 +1,15 @@ + + + resources.html + + + + +

Resources [back]

+ + + diff --git a/doc/styles.css b/doc/styles.css new file mode 100644 index 0000000..47d780e --- /dev/null +++ b/doc/styles.css @@ -0,0 +1,79 @@ +a { + color: black; + font-weight: normal; +} +a.na:link, a.na:visited { + color: #dddddd; + text-decoration: line-through; +} +a:link, a:visited, a:active { + color: gray; + text-decoration: none; +} +a.local { + font-weight: bold; +} +a:hover, a.na:hover { + color: blue; +} +body { + color: black; background-color: white; +} +.code { + color: black; background-color: #dddddd; + letter-spacing: 1px; + border: 1px solid; border-color: black; + padding-left: 12px; padding-right: 12px; padding-top: 5px; padding-bottom: 5px; + margin-left: 20px; +} +dd { + padding-left: 40px; + margin-left: 0px; margin-bottom: 10px; +} +div { + margin-top: 10px; margin-bottom: 10px; margin-left: 20px; +} +dl { + margin-top: 0px; margin-bottom: 0px; +} +dt { + font-style: italic; + padding-left: 20px; + margin-top: 10px; +} +h4, h5 { + margin-top: 10px; margin-bottom: 10px; +} +hr { + margin-top: 0px; margin-bottom: 0px; +} +.incompatibility { + color: red; +} +.indent { + margin-top: 0px; margin-bottom: 0px; +} +pre { + letter-spacing: 1px; + padding: 0px; + margin: 0px; +} +pre a:hover { + color: orange; +} +s { + color: #dddddd; +} +.sig { + font-style: italic; + color: #aaaaaa; + text-align: right; +} +span { + display: block; + margin: 0px; +} +ul { + margin-top: 10px; margin-bottom: 10px; margin-left: 20px; + padding-left: 17px; +} diff --git a/doc/syntax.html b/doc/syntax.html new file mode 100644 index 0000000..a50651d --- /dev/null +++ b/doc/syntax.html @@ -0,0 +1,215 @@ + + + syntax.html + + + +

Identifiers for Syntax Highlighting

+
+ADD
+ADD_D
+AND
+APPLY
+ARRAY_DATA
+ARRAY_ELEM
+ARRAY_SIZE
+ASSERT
+ASSERT_MSG
+ASSIGN_SLOT
+ +BITAND
+BITNOR
+BITOR
+BITXOR
+BOOL
+ +CAT
+COMMA
+COMMA_IF
+COMPL
+CONFIG_EXTENDED_LINE_INFO
+ +DEC
+DEDUCE_D
+DEDUCE_R
+DEDUCE_Z
+DIV
+DIV_D
+ +EMPTY
+ENUM
+ENUM_BINARY_PARAMS
+ENUM_BINARY_PARAMS_Z
+ENUM_PARAMS
+ENUM_PARAMS_WITH_A_DEFAULT
+ENUM_PARAMS_WITH_DEFAULTS
+ENUM_PARAMS_Z
+ENUM_SHIFTED
+ENUM_SHIFTED_PARAMS
+ENUM_SHIFTED_PARAMS_Z
+ENUM_SHIFTED_
+ENUM_TRAILING
+ENUM_TRAILING_BINARY_PARAMS
+ENUM_TRAILING_BINARY_PARAMS_Z
+ENUM_TRAILING_PARAMS
+ENUM_TRAILING_PARAMS_Z
+ENUM_TRAILING_
+ENUM_
+EQUAL
+EQUAL_D
+EXPAND
+EXPR_IF
+EXPR_IIF
+ +FILENAME_x
+FOR
+FOR_
+FRAME_FINISH
+FRAME_FLAGS
+FRAME_ITERATION
+FRAME_START
+ +GREATER
+GREATER_D
+GREATER_EQUAL
+GREATER_EQUAL_D
+ +IDENTITY
+IF
+IIF
+INC
+INCLUDE_SELF
+INDIRECT_SELF
+INTERCEPT
+IS_ITERATING
+IS_SELFISH
+ITERATE
+ITERATION
+ITERATION_DEPTH
+ITERATION_FINISH
+ITERATION_FLAGS
+ITERATION_LIMITS
+ITERATION_PARAMS_x
+ITERATION_START
+ +LESS
+LESS_D
+LESS_EQUAL
+LESS_EQUAL_D
+LIMIT_DIM
+LIMIT_FOR
+LIMIT_ITERATION
+LIMIT_ITERATION_DIM
+LIMIT_MAG
+LIMIT_REPEAT
+LIMIT_SLOT_COUNT
+LIMIT_SLOT_SIG
+LIMIT_TUPLE
+LIMIT_WHILE
+LINE
+LIST_APPEND
+LIST_APPEND_D
+LIST_AT
+LIST_AT_D
+LIST_CAT
+LIST_CAT_D
+LIST_CONS
+LIST_ENUM
+LIST_ENUM_R
+LIST_FILTER
+LIST_FILTER_D
+LIST_FIRST
+LIST_FIRST_N
+LIST_FIRST_N_D
+LIST_FOLD_LEFT
+LIST_FOLD_LEFT_2ND
+LIST_FOLD_LEFT_2ND_D
+LIST_FOLD_LEFT_
+LIST_FOLD_LEFT_D
+LIST_FOLD_RIGHT
+LIST_FOLD_RIGHT_2ND
+LIST_FOLD_RIGHT_2ND_D
+LIST_FOLD_RIGHT_
+LIST_FOLD_RIGHT_D
+LIST_FOR_EACH
+LIST_FOR_EACH_I
+LIST_FOR_EACH_I_R
+LIST_FOR_EACH_PRODUCT
+LIST_FOR_EACH_PRODUCT_R
+LIST_FOR_EACH_R
+LIST_IS_CONS
+LIST_IS_NIL
+LIST_NIL
+LIST_REST
+LIST_REST_N
+LIST_REST_N_D
+LIST_REVERSE
+LIST_REVERSE_D
+LIST_SIZE
+LIST_SIZE_D
+LIST_TO_TUPLE
+LIST_TO_TUPLE_R
+LIST_TRANSFORM
+LIST_TRANSFORM_D
+LOCAL_ITERATE
+LOCAL_LIMITS
+LOCAL_MACRO
+LPAREN
+LPAREN_IF
+ +MAX
+MAX_D
+MIN
+MIN_D
+MOD
+MOD_D
+MUL
+MUL_D
+ +NIL
+NOR
+NOT
+NOT_EQUAL
+NOT_EQUAL_D
+ +OR
+ +RELATIVE_FINISH
+RELATIVE_FLAGS
+RELATIVE_ITERATION
+RELATIVE_START
+REPEAT
+REPEAT_1ST
+REPEAT_2ND
+REPEAT_3RD
+REPEAT_FROM_TO
+REPEAT_FROM_TO_1ST
+REPEAT_FROM_TO_2ND
+REPEAT_FROM_TO_3RD
+REPEAT_FROM_TO_D
+REPEAT_FROM_TO_D_
+REPEAT_FROM_TO_
+REPEAT_
+RPAREN
+RPAREN_IF
+ +SLOT
+STRINGIZE
+SUB
+SUB_D
+ +TUPLE_EAT
+TUPLE_ELEM
+TUPLE_REM
+TUPLE_REVERSE
+TUPLE_TO_LIST
+ +VALUE
+ +WHILE
+WHILE_
+ +XOR
+
+ + diff --git a/doc/terms.html b/doc/terms.html new file mode 100644 index 0000000..d5e6f79 --- /dev/null +++ b/doc/terms.html @@ -0,0 +1,14 @@ + + + terms.html + + + + +

Terminology [back]

+ + + diff --git a/doc/terms/evaluated.html b/doc/terms/evaluated.html new file mode 100644 index 0000000..11507c3 --- /dev/null +++ b/doc/terms/evaluated.html @@ -0,0 +1,16 @@ + + + Evaluated Parameter + + + +

Evaluated Parameter

+
+ An evaluated parameter is a numeric value that is evaluated by the library as a constant expression.  + This means that the expression can include simple arithmetic, logical, and condition expressions.  + It also means that the value of the parameter no longer depends on the source of the parameter.  + In other words, if the value is dependent on some macro, it will no longer be dependent on that macro after it is evaluated.  + This disables the lazy-evaluation that the preprocessor normallly uses. +
+ + diff --git a/doc/terms/named_external.html b/doc/terms/named_external.html new file mode 100644 index 0000000..e1faf39 --- /dev/null +++ b/doc/terms/named_external.html @@ -0,0 +1,14 @@ + + + Named External Argument + + + +

Named External Argument

+
+ A named external argument is an argument to a macro that is included.  + There is no way to pass arguments to a file directly, so they must be passed to files in the form of macros with known names that are defined by the user.  + Every time that the library uses this idiom, the file that is included automatically undefines the macro in order to better simulate normal parameters. +
+ + diff --git a/doc/top.html b/doc/top.html new file mode 100644 index 0000000..e061a5b --- /dev/null +++ b/doc/top.html @@ -0,0 +1,27 @@ + + + top.html + + + + + + + + +
+ The Boost Library
+ Preprocessor Subset for C/C++ +
+ + diff --git a/doc/topics.html b/doc/topics.html new file mode 100644 index 0000000..76b938c --- /dev/null +++ b/doc/topics.html @@ -0,0 +1,20 @@ + + + topics.html + + + + +

Topics [back]

+ + + diff --git a/doc/topics/evaluated_slots.html b/doc/topics/evaluated_slots.html new file mode 100644 index 0000000..e0879b3 --- /dev/null +++ b/doc/topics/evaluated_slots.html @@ -0,0 +1,146 @@ + + + evaluated_slots.html + + + +

Evaluated Slots

+
+ The evaluated slot mechanism is a tool to fully evaluate a constant integral expression and avoid the lazy evaluation normally performed by the preprocessor. +
+

Tutorial

+
+ In order to understand the use of such a mechanism, I will start with a simple file-iteration example.  + Consider the following scenario.... +
+
+for (int i = 0; i < 10; ++i) {
+   for (int j = 0; j < i; ++j) {
+      // ... use i and j
+   }
+}
+
+
+ The above is a simple runtime model of the following multidimensional file-iteration.... +
+
+// file.hpp
+#if !BOOST_PP_IS_ITERATING
+   #ifndef FILE_HPP_
+   #define FILE_HPP_
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 9, "file.hpp"))
+   #include BOOST_PP_ITERATE()
+
+   #endif // FILE_HPP_
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+   #define I BOOST_PP_ITERATION()
+
+   #define BOOST_PP_ITERATION_PARAMS_2 (3, (0, I, "file.hpp"))
+   #include BOOST_PP_ITERATE()
+
+   #undef I
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+   #define J BOOST_PP_ITERATION()
+
+   // use I and J
+
+   #undef J
+#endif
+
+
+ There is a problem with the code above.  + The writer expected I to refer the previous iteration frame.  + However, that is not the case.  + When the user refers to I, he is actually referring to BOOST_PP_ITERATION(), + not the value of BOOST_PP_ITERATION() at the point of definition.  + Instead, it refers to exactly the same value to which J refers. +
+
+ The problem is that the preprocessor always evaluates everything with lazy evaluation.  + To solve the problem, we need I to be evaluated here: +
+
+// ...
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+   #define I BOOST_PP_ITERATION()
+// ...
+
+
+ Fortunately, the library offers a mechanism to do just that:  evaluated slots.  + The following code uses this mechanism to "fix" the example above... +
+
+// ...
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+   #define BOOST_PP_VALUE BOOST_PP_ITERATION()
+   #include BOOST_PP_ASSIGN_SLOT(1)
+   #define I BOOST_PP_SLOT(1)
+// ...
+
+
+ There are two steps to the assignment of an evaluated slot.  + First, the user must define the named external argument BOOST_PP_VALUE.  + This value must be an integral constant expression.  + Second, the user must include BOOST_PP_ASSIGN_SLOT(x), where x is the particular slot to be assigned to (1 to BOOST_PP_LIMIT_SLOT_COUNT).  + This will evaluate BOOST_PP_VALUE and assign the result to the slot at index x. +
+
+ To retrieve a slot's value, the user must use BOOST_PP_SLOT(x). +
+
+ In the case above, I is still lazily evaluated.  + However, it now evaluates to BOOST_PP_SLOT(1).  + This value will not change unless there is a subsequent call to BOOST_PP_ASSIGN_SLOT(1). +
+

Advanced Techniques

+
+ The slot mechanism can also be used to perform calculations: +
+
+#include <iostream>
+
+#include <boost/preprocessor/slot/slot.hpp>
+#include <boost/preprocessor/stringize.hpp>
+
+#define X() 4
+
+#define BOOST_PP_VALUE 1 + 2 + 3 + X()
+#include BOOST_PP_ASSIGN_SLOT(1)
+
+#undef X
+
+int main(void) {
+   std::cout
+      << BOOST_PP_STRINGIZE(BOOST_PP_SLOT(1))
+      << &std::endl;
+   return 0;
+}
+
+
+ In essence, anything that can be evaluated in an #if (or #elif) preprocessor directive is available except the defined operator. +
+
+ It is even possible to use a particular slot itself while reassigning it: +
+
+#define BOOST_PP_VALUE 20
+#include BOOST_PP_ASSIGN_SLOT(1)
+
+#define BOOST_PP_VALUE 2 * BOOST_PP_SLOT(1)
+#include BOOST_PP_ASSIGN_SLOT(1)
+
+BOOST_PP_SLOT(1) // 40
+
+

See Also

+ +
- Paul Mensonides
+ + diff --git a/doc/topics/file_iteration.html b/doc/topics/file_iteration.html new file mode 100644 index 0000000..6b72479 --- /dev/null +++ b/doc/topics/file_iteration.html @@ -0,0 +1,921 @@ + + + file_iteration.html + + + +

File Iteration

+
+ File iteration is a complex, but powerful, vertical repetition construct.  + It repeatedly includes a file for each number in a user-specified range. +
+

Tutorial

+
+ This mechanism requires two pieces of information to operate:  + a range to iterate over and a file to include on each iteration.  + It can optionally take a third piece of information that represents flags used to discriminate between + different iterations of the same file.  + This information is obtained by the mechanism through one or two named external arguments.  + These arguments are specified as user-defined macros named BOOST_PP_ITERATION_PARAMS_x + or the combination of BOOST_PP_FILENAME_x and BOOST_PP_ITERATION_LIMITS. +
+
+ BOOST_PP_ITERATION_LIMITS specifies the range of values to iterate over.  + It must expand to a tuple containing two elements--a lower and upper bound.  + Both the upper and lower bounds must be numeric values in the range of 0 to BOOST_PP_LIMIT_ITERATION.  + For example, if the user wishes a file to be included for numbers ranging from 0 to 10, + BOOST_PP_ITERATION_LIMITS would be defined like this: +
+
+#define BOOST_PP_ITERATION_LIMITS (0, 10)
+
+
+ Note that there is whitespace after the name of the macro.  + The macro does not take two arguments.  + In the case above, if there was no whitespace, a preprocessing error would occur because 0 and 10 + are invalid identifiers. +
+
+ Both the upper and lower bounds specified in the BOOST_PP_ITERATION_LIMITS macro are evaluated parameters.  + This implies that they can include simple arithmetic or logical expressions.  + For instance, the above definition could easily have been written like this: +
+
+#define N() 5
+#define BOOST_PP_ITERATION_LIMITS (0, N() + 5)
+
+
+ Because of this, if the whitespace after the macro name is elided, it is possible for the + definition to be syntactically valid: +
+
+#define A 0
+#define B 10
+#define BOOST_PP_ITERATION_LIMITS(A, B)
+   // note:  no whitespace       ^
+
+
+ If this happens, an error will occur inside the mechanism when it attempts to use this macro.  + The error messages that result may be obscure, so always remember to include the whitespace.  + A correct version of the above looks like this: +
+
+#define A 0
+#define B 10
+#define BOOST_PP_ITERATION_LIMITS (A, B)
+   // note:  has whitespace      ^
+
+
+ BOOST_PP_FILENAME_x specifies the file to iterate over.  + The x is a placeholder for the dimension of iteration.  + (For now, we'll assume this is 1--i.e. the first dimension, + so we are actually dealing with BOOST_PP_FILENAME_1.)  + This macro must expand to a valid filename--in quotes or in angle brackets depending on how the file is accessed: +
+
+#define BOOST_PP_FILENAME_1 "file.h"
+// -or-
+#define BOOST_PP_FILENAME_1 <file.h>
+
+
+ All that we need now to perform a simple file iteration is to invoke the mechanism: +
+
+??=include BOOST_PP_ITERATE()
+
+
+ (The ??= token is a trigraph for #.  + I use the trigraph to make it clear that I am including a file rather than defining or expanding a macro, but it is not necessary.  + Even the digraph version, %:, could be used.  + Some compilers do not readily accept trigraphs and digraphs, so keep that in mind.  + Other than that, use whichever one you prefer.) +
+
+ So, if we wish to iterate "file.h" from 1 to 10, we just need to put the pieces together: +
+
+#define BOOST_PP_ITERATION_LIMITS (1, 10)
+#define BOOST_PP_FILENAME_1 "file.h"
+??=include BOOST_PP_ITERATE()
+
+
+ The above code has the effect of including "file.h" ten times in succession.  +
+
+ Alternately, both the range and the file to iterate over can be expressed in one macro, BOOST_PP_ITERATION_PARAMS_x.  + Once again, the x is a placeholder for the dimension of iteration--which we'll assume is 1.  + This macro must expand to an array that includes the lower bound, upper bound, filename, and optional flags (in that order). +
+
+#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
+??=include BOOST_PP_ITERATE()
+
+
+ This has the same effect as the previous version.  + Only one of these two ways to specify the parameters can be used at a time.  + (The reason that there are two different methods has to do with dimensional abstraction which I'll get to later.) +
+
+ There is nothing particularly useful about including a file ten times.  + The difference is that the current macro state changes each time.  + For example, the current "iteration value" is available with BOOST_PP_ITERATION().  + If "file.h" is defined like this... +
+
+// file.h
+template<> struct sample<BOOST_PP_ITERATION()> { };
+
+
+ ...and it is iterated as follows... +
+
+template<int> struct sample;
+
+#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 5, "file.h"))
+??=include BOOST_PP_ITERATE()
+
+
+ ...the result is different each time: +
+
+template<> struct sample<1> { };
+template<> struct sample<2> { };
+template<> struct sample<3> { };
+template<> struct sample<4> { };
+template<> struct sample<5> { };
+
+
+ There is no reason that a file can't iterate over itself.  + This has the advantage of keeping the code together.  + The problem is that you have to discriminate the "regular" section of the file from the iterated section of the file.  + The library provides the BOOST_PP_IS_ITERATING macro to help in this regard.  + This macro is defined as 1 if an iteration is in progress.  + For example, to merge the contents of "file.h" into the file that iterates it: +
+
+// sample.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef SAMPLE_H
+   #define SAMPLE_H
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   template<int> struct sample;
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 5, "sample.h"))
+   ??=include BOOST_PP_ITERATE()
+
+   #endif // SAMPLE_H
+
+#else
+
+   template<> struct sample<BOOST_PP_ITERATION()> { };
+
+#endif
+
+
+ Using the same file like this raises another issue.  + What happens when a file performs two separate file iterations over itself?  + This is the purpose of the optional flags parameter.  + It is used to discriminate between separate iterations. +
+
+// sample.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef SAMPLE_H
+   #define SAMPLE_H
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+   #include <boost/preprocessor/repetition/enum_params.hpp>
+   #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+   template<int> struct sample;
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, "sample.h", 1))
+   ??=include BOOST_PP_ITERATE()
+
+   template<class T, class U> struct typelist_t {
+      typedef T head;
+      typedef U tail;
+   };
+
+   template<int> struct typelist;
+   struct null_t;
+
+   template<> struct typelist<1> {
+      template<class T0> struct args {
+         typedef typelist_t<T0, null_t> type;
+      };
+   };
+
+   #ifndef TYPELIST_MAX
+   #define TYPELIST_MAX 50
+   #endif
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (4, (2, TYPELIST_MAX, "sample.h", 2))
+   ??=include BOOST_PP_ITERATE()
+
+   #endif // SAMPLE_H
+
+#elif BOOST_PP_ITERATION_FLAGS() == 1
+
+   template<> struct sample<BOOST_PP_ITERATION()> { };
+
+#elif BOOST_PP_ITERATION_FLAGS() == 2
+
+   #define N BOOST_PP_ITERATION()
+
+   template<> struct typelist<N> {
+      template<BOOST_PP_ENUM_PARAMS(N, class T)> struct args {
+         typedef typelist_t<
+            T0,
+            typename typelist<N - 1>::args<BOOST_PP_ENUM_SHIFTED_PARAMS(N, T)>::type
+         > type;
+      };
+   };
+
+   #undef N
+
+#endif
+
+
+ Notice the use of the "flags" parameter (which is accessed through BOOST_PP_ITERATION_FLAGS()).  + It discriminates between our recurring sample iteration and a typelist linearization iteration.  +
+
+ The second iteration illustrates the power of the file iteration mechanism.  + It generates typelist linearizations of the form typelist<3>::args<int, double, char>::type. +
+
+ Actually, to continue the typelist example, with the help of another iteration we can fully linearize typelist creation.... +
+
+// extract.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef EXTRACT_H
+   #define EXTRACT_H
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+   #include <boost/preprocessor/repetition/enum.hpp>
+   #include <boost/preprocessor/repetition/enum_params.hpp>
+   #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+
+   // certain types such as "void" can't be function argument types
+
+   template<class T> struct incomplete {
+      typedef T type;
+   };
+
+   template<class T> struct strip_incomplete {
+      typedef T type;
+   };
+
+   template<class T> struct strip_incomplete<incomplete<T> > {
+      typedef T type;
+   };
+
+   template<template<int> class output, class func_t> struct extract;
+
+   #ifndef EXTRACT_MAX
+   #define EXTRACT_MAX 50
+   #endif
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, EXTRACT_MAX, "extract.h"))
+   ??=include BOOST_PP_ITERATE()
+
+   #endif // EXTRACT_H
+
+#else
+
+   #define N BOOST_PP_ITERATION()
+   #define STRIP(z, n, _) \
+      typename strip_incomplete<T ## n>::type \
+      /**/
+
+   template<template<int> class output, class R BOOST_PP_ENUM_TRAILING_PARAMS(N, class T)>
+   struct extract<R (BOOST_PP_ENUM_PARAMS(N, T))> {
+      typedef typename output<N>::template args<BOOST_PP_ENUM(N, STRIP, nil)>::type type;
+   };
+
+   #undef STRIP
+   #undef N
+
+#endif
+
+
+ Now we can define a helper macro to finish the job: +
+
+#define TYPELIST(args) extract<typelist, void args>::type
+
+typedef TYPELIST((int, double, incomplete<void>)) xyz;
+
+
+ There are two minor caveats with this result.  + First, certain types like void can't be the type of an argument, so they have to be + wrapped with incomplete<T>.  + Second, the necessary double parenthesis is annoying.  + If and when C++ gets C99's variadic macros, TYPELIST can be redefined: +
+
+#define TYPELIST(...) extract<typelist, void (__VA_ARGS__)>::type
+
+typedef TYPELIST(int, double, short) xyz;
+
+
+ Note also that both the lower and upper bounds of an iteration are also accessible inside an iteration with + BOOST_PP_ITERATION_START() and BOOST_PP_ITERATION_FINISH(). +
+
+ It is my hope that the explanation and examples presented here demonstrate the power of file iteration.  + Even so, this is just the beginning.  + The file iteration mechanism also defines a full suite of facilities to support multidimensional iteration. +
+

Multiple Dimensions

+
+ The file iteration mechanism supports up to BOOST_PP_LIMIT_ITERATION_DIM dimensions.  + The first dimension (i.e. the outermost) we have already used above.  + In order to use the second dimension (inside the first), we simply have to replace the placeholder x + with 2 instead of 1. +
+
+#define BOOST_PP_ITERATION_PARAMS_2 /* ... */
+                                  ^
+
+
+...or... +
+
+#define BOOST_PP_FILENAME_2 /* ... */
+                          ^
+
+
+ Each dimension must be used in order starting with 1.  + Therefore, the above can only be valid immediately inside the first dimension.  +
+
+ At this point, further explanation is necessary regarding BOOST_PP_ITERATION, + BOOST_PP_ITERATION_START, and BOOST_PP_ITERATION_FINISH.  + BOOST_PP_ITERATION() expands to the iteration value of the current dimension--regardless + of what dimension that is.  + Likewise, BOOST_PP_ITERATION_START() and BOOST_PP_ITERATION_FINISH() expand to the lower + and upper bounds of the current dimension.  + Using the following pseudo-code as reference: +
+
+for (int i = start(1); i <= finish(1); ++i) {
+   // A
+   for (int j = start(2); j <= finish(2); ++j) {
+      // B
+   }
+   // C
+}
+
+
+ At point A, BOOST_PP_ITERATION() refers to i.  + BOOST_PP_ITERATION_START() and BOOST_PP_ITERATION_FINISH() + refer to start(1) and finish(1) respectively.  + At point B, however, BOOST_PP_ITERATION() refers to j--the current + iteration value at point B.  + The same is true for BOOST_PP_ITERATION_START() which refers to start(2), etc.. +
+
+ If separate files are used for each dimension, then there are no major problems, and using multiple dimensions is straightforward.  + However, if more than one dimension is located in the same file, they need to be distinguished from one another.  + The file iteration mechanism provides the macro BOOST_PP_ITERATION_DEPTH for this purpose: +
+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H
+   #define FILE_H
+
+   #include <boost/preprocessor/iteration/iterate.hpp>
+
+   #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 2, "file.h"))
+   ??=include BOOST_PP_ITERATE()
+
+   #endif // FILE_H
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+   // A
+   + BOOST_PP_ITERATION()
+
+   #define BOOST_PP_ITERATION_PARAMS_2 (3, (1, 2, "file.h"))
+   ??=include BOOST_PP_ITERATE()
+
+   // C
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+   // B
+   - BOOST_PP_ITERATION()
+
+#endif
+
+
+ This will result to the following: +
+
++ 1
+- 1
+- 2
++ 2
+- 1
+- 2
+
+
+ Multiple dimensions raise another question.  + How does one access the state of dimensions other than the current dimension?  + In other words, how does one access i at point A?  + Because of the preprocessor's lazy evaluation, this doesn't work.... +
+
+// ...
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+   #define I BOOST_PP_ITERATION()
+
+   #define BOOST_PP_ITERATION_PARAMS_2 (3, (1, 2, "file.h"))
+   ??=include BOOST_PP_ITERATE()
+
+   #undef I
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+   #define J BOOST_PP_ITERATION()
+
+   // use I and J
+
+   #undef I
+
+#endif
+
+
+ The problem here is that I refers to BOOST_PP_ITERATION(), + not to the value of BOOST_PP_ITERATION() at the point of I's definition. +
+
+ The library provides macros to access these values in two ways--absolutely or relatively.  + The first variety accesses a value of a specific iteration frame (i.e. dimension).  + To access the iteration value of the first dimension--from any dimension--BOOST_PP_FRAME_ITERATION(1) is used.  + To access the iteration value of the second dimension, BOOST_PP_FRAME_ITERATION(2) is used, and so on.  +
+
+ There are also frame versions to access the lower bound, the upper bound, and the flags of a dimension:  + BOOST_PP_FRAME_START, BOOST_PP_FRAME_FINISH, and BOOST_PP_FRAME_FLAGS. +
+
+ So, to fix the last example, we modify the definition of I.... +
+
+// ...
+
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+   #define I BOOST_PP_FRAME_ITERATION(1)
+
+// ...
+
+
+ The library also provides macros to access values in dimensions relative to the current dimension (e.g. the previous dimension).  + These macros take an argument that is interpreted as an offset from the current frame.  + For example, BOOST_PP_RELATIVE_ITERATION(1) always refers to the outer dimension immediately previous to the current dimension.  + An argument of 0 is interpreted as an offset of 0 which causes + BOOST_PP_RELATIVE_ITERATION(0) to be equivalent to BOOST_PP_ITERATION().  + BOOST_PP_RELATIVE_ITERATION(2) refers to the iteration value of the dimension immediately preceding + the dimension that precedes the current dimension.  +
+
+ The lower and upper bounds of a dimension can be accessed in this fashion as well + with BOOST_PP_RELATIVE_START and BOOST_PP_RELATIVE_FINISH.  + The flags of a relative dimension can be accessed with BOOST_PP_RELATIVE_FLAGS. +
+

Relativity

+
+ I mentioned earlier that there is a reason that there are two ways to parametize the mechanism.  + The reason is dimensional abstraction.  + In certain situations the dimension is unknown by the code that is being iterated--possibly + because the code is reused at multiple, different dimensions.  + If that code needs to iterate again, it has to define the right parameters (based on the dimension) for the mechanism to consume.  +
+
+ All of the macro state maintained by the mechanism can be referred to in an indirect way relative to a dimension.  + This is the purpose of the BOOST_PP_RELATIVE_ accessors.  +
+
+ Likewise, the user-defined named external arguments can be defined this way as well--except the name of the file to iterate.  + Because the lower and upper boundaries are evaluated by the mechanism, the implementation no longer needs + the macro BOOST_PP_ITERATION_LIMITS, and the identifier can be reused for each dimension of iteration.  +
+
+ Unfortunately, the filename is a different story.  + The library has no way to evaluate the quoted (or angle-bracketed) text.  + Therefore, it has to use a different macro for each dimension.  + That is the purpose of the BOOST_PP_FILENAME_x macros.  + They exist to isolate the only non-abstractable piece of data required by the mechanism.  +
+
+ In order to define the filename in an abstract fashion, you need to do something like this: +
+
+#define UNIQUE_TO_FILE "some_file.h"
+
+#if BOOST_PP_ITERATION_DEPTH() == 0
+   #define BOOST_PP_FILENAME_1 UNIQUE_TO_FILE
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+   #define BOOST_PP_FILENAME_2 UNIQUE_TO_FILE
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+   #define BOOST_PP_FILENAME_3 UNIQUE_TO_FILE
+
+// ... up to BOOST_PP_LIMIT_ITERATION_DIM
+
+#endif
+
+
+ The intent is to avoid having to do this for anything but the filename.  + If this needs to be done more than once in a file + (BOOST_PP_FILENAME_x is undefined by the mechanism after it is used.), + consider using a separate file to make the proper definition: +
+
+# // detail/define_file_h.h
+# ifndef FILE_H
+#   error FILE_H is not defined
+# endif
+#
+# if BOOST_PP_ITERATION_DEPTH() == 0
+#   define BOOST_PP_FILENAME_1 FILE_H
+# elif BOOST_PP_ITERATION_DEPTH() == 1
+#   define BOOST_PP_FILENAME_2 FILE_H
+# elif BOOST_PP_ITERATION_DEPTH() == 2
+#   define BOOST_PP_FILENAME_3 FILE_H
+# elif BOOST_PP_ITERATION_DEPTH() == 3
+#   define BOOST_PP_FILENAME_4 FILE_H
+# elif BOOST_PP_ITERATION_DEPTH() == 4
+#   define BOOST_PP_FILENAME_5 FILE_H
+# else
+#   error unsupported iteration dimension
+# endif
+
+
+ And then use it like this.... +
+
+// file.h
+#if !BOOST_PP_IS_ITERATING
+
+   #ifndef FILE_H
+   #define FILE_H "file.h"
+
+   #define BOOST_PP_ITERATION_LIMITS (1, 10)
+   #include "detail/define_file_h.h"
+
+   ??=include BOOST_PP_ITERATE()
+
+#endif // FILE_H
+
+#else
+   // iterated portion
+#endif
+
+
+ With a little effort like this, it is possible to maintain the abstraction without the code bloat that would + otherwise be required.  + Unfortunately, this is not a completely general solution as it would need to be done for each unique filename, + but it is better than nothing. +
+

Conclusion

+
+ That about covers the facilities that are available from the mechanism.  + Using these facilities, let's implement a function_traits template to demonstrate a full-fledge + use of the mechanism. +
+

Function Traits - An Involved Example

+
+ Implementing a comprehensive function_traits template metafunction requires the use + of every major part of the file iteration mechanism.  +
+
+ (This example makes no attempt of work around compiler deficiencies and exists only to illustrate the mechanism.) +
+
+ The result should have the following features: +
+
    +
  • return type
  • +
  • number and types of parameters
  • +
  • whether or not the type is a pointer-to-function, reference-to-function, pointer-to-member-function, or a plain function type
  • +
  • whether the type has an ellipsis
  • +
  • if not a pointer-to-member-function, the equivalent pointer-to-function, reference-to-function, and function type
  • +
  • otherwise, the pointer-to-member type, the class type to which it refers, and whether it is const and/or volatile qualified
  • +
+
+ There are a myriad of ways that this can be implemented.  + I'll give a brief summary here of what is happening in the implementation below.  +
+
+ The implementation inherently has to deal with function arity.  + Therefore, at minimum, we need to iterate over function arities and define partial specializations of + the primary template function_traits.  + The situation is further complicated by variadic functions (i.e. functions with an ellipsis).  + Therefore, for every arity, we need a variadic version as well. +
+
+ We also need to handle pointers-to-member-functions.  + This implies that we have to handle not just arity and variadics, but also cv-qualifications.  +
+
+ For the sake of clarity, the implementation below handles function types and pointers-to-member-functions + separately.  + They could be merged, but the result would be significantly messier. +
+
+ To handle function types, the implementation below iterates over function arities.  + For each arity, it iterates over each parameter to provide access to each individually.  + It then re-includes itself to define a variadic specialization of the same arity.  + It performs the rough equivalent of the following pseudo-code: +
+
+void make_spec(int i, bool variadic) {
+   :open function_traits<i, variadic>
+      for (int j = 0; j < i; ++j) {
+         :parameter<j>
+      }
+   :close
+   if (!variadic) {
+      make_spec(i, true);
+   }
+   return;
+}
+
+void function_types(int max_arity) {
+   for (int i = 0; i <= max_arity; ++i) {
+      make_spec(i, false);
+   }
+   return;
+}
+
+
+ The implementation of pointers-to-member-functions is a bit different.  + First, it iterates over cv-qualifiers.  + For each cv-qualifier, it iterates over function arities.  + For each function arity, it iterates again over each parameter.  + It then re-includes itself to define a variadic specialization of the same arity.... +
+
+void make_spec(int j, const char* cv, bool variadic) {
+   :open function_traits<j, cv, variadic>
+      for (int k = 0; k < j; ++k) {
+         parameter<k>
+      }
+   :close
+   if (!variadic) {
+      make_spec(j, cv, true);
+   }
+   return;
+}
+
+void gen_arities(const char* cv, int max_arity) {
+   for (int j = 0; j <= max_arity; ++j) {
+      make_spec(j, cv, false);
+   }
+   return;
+}
+
+void pointers_to_members(int max_arity) {
+   static const char* cv_qualifiers[] = { "", "const", "volatile", "const volatile" };
+   for (int i = 0; i < 4; ++i) {
+      gen_arities(cv_qualifiers[i], max_arity);
+   }
+   return;
+}
+
+
+ Here is the complete implementation.  + This example represents the power of the file iteration mechanism as well as the library in general, + so follow it carefully if you wish to fully understand what the mechanism does.... +
+
+// function_traits.hpp
+
+#if !BOOST_PP_IS_ITERATING
+
+#ifndef FUNCTION_TRAITS_HPP
+#define FUNCTION_TRAITS_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/facilities/apply.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/iteration/self.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+// enable user-expansion
+#ifndef FUNCTION_TRAITS_MAX_ARITY
+   #define FUNCTION_TRAITS_MAX_ARITY 15
+#endif
+
+namespace detail {
+
+// avoid replication of "default" values
+struct function_traits_base {
+   static const bool is_plain = false;
+   static const bool is_pointer = false;
+   static const bool is_reference = false;
+   static const bool is_member = false;
+};
+
+} // detail
+
+// no definition
+template<class> struct function_traits;
+
+// extract ellipsis state
+#define ELLIPSIS(n) \
+   BOOST_PP_APPLY( \
+      BOOST_PP_TUPLE_ELEM(2, n, ELLIPSIS_I) \
+   ) \
+   /**/
+
+// iterate over function arities for function types
+#define BOOST_PP_ITERATION_PARAMS_1 \
+   (4, (0, FUNCTION_TRAITS_MAX_ARITY, "function_traits.hpp", 0)) \
+   /**/
+??=include BOOST_PP_ITERATE()
+
+// obtain a cv-qualifier by index
+#define QUALIFIER(n) \
+   BOOST_PP_APPLY( \
+      BOOST_PP_TUPLE_ELEM( \
+         4, n, \
+         (BOOST_PP_NIL, (const), (volatile), (const volatile)) \
+      ) \
+   ) \
+   /**/
+
+// iterate over cv-qualifiers for pointers-to-members
+#define BOOST_PP_ITERATION_PARAMS_1 \
+   (4, (0, 3, "function_traits.hpp", 1)) \
+   /**/
+??=include BOOST_PP_ITERATE()
+
+// remove temporary macros
+#undef QUALIFIER
+#undef ELLIPSIS
+
+// overriding jumper for pointers-to-functions
+template<class T> struct function_traits<T*> : function_traits<T> {
+   static const bool is_plain = false;
+   static const bool is_pointer = true;
+};
+
+// overriding jumper for references-to-functions
+template<class T> struct function_traits<T&> : function_traits<T> {
+   static const bool is_plain = false;
+   static const bool is_reference = true;
+};
+
+// eof
+#endif // FUNCTION_TRAITS_HPP
+
+// specializations for function types
+#elif BOOST_PP_ITERATION_DEPTH() == 1 \
+   && BOOST_PP_ITERATION_FLAGS() == 0 \
+   /**/
+
+   // define ellipsis state
+   #if BOOST_PP_IS_SELFISH
+      #define ELLIPSIS_I ((true), (...))
+   #else
+      #define ELLIPSIS_I ((false), BOOST_PP_NIL)
+   #endif
+
+   #define N BOOST_PP_ITERATION()
+
+   template<class R BOOST_PP_ENUM_TRAILING_PARAMS(N, class T)>
+   struct function_traits<R (BOOST_PP_ENUM_PARAMS(N, T) ELLIPSIS(1))>
+      : detail::function_traits_base {
+      static const bool is_plain = true;
+      typedef R function_type(BOOST_PP_ENUM_PARAMS(N, T) ELLIPSIS(1));
+      typedef function_type* pointer_type;
+      typedef function_type& reference_type;
+      static const bool has_ellipsis = ELLIPSIS(0);
+      typedef R return_type;
+      static const int parameter_count = N;
+      template<int, class D = int> struct parameter;
+      #if N
+         // iterate over parameters
+         #define BOOST_PP_ITERATION_PARAMS_2 \
+            (3, (0, N - 1, "function_traits.hpp")) \
+            /**/
+         ??=include BOOST_PP_ITERATE()
+      #endif
+   };
+
+   #undef N
+   #undef ELLIPSIS_I
+
+   // re-include this section for an ellipsis variant
+   #if !BOOST_PP_IS_SELFISH
+      #define BOOST_PP_INDIRECT_SELF "function_traits.hpp"
+      ??=include BOOST_PP_INCLUDE_SELF()
+   #endif
+
+// iteration over cv-qualifiers
+#elif BOOST_PP_ITERATION_DEPTH() == 1 \
+   && BOOST_PP_ITERATION_FLAGS() == 1 \
+   /**/
+
+   #define BOOST_PP_ITERATION_PARAMS_2 \
+      (3, (0, FUNCTION_TRAITS_MAX_ARITY, "function_traits.hpp")) \
+      /**/
+   ??=include BOOST_PP_ITERATE()
+
+// generate specializations for pointers-to-members
+#elif BOOST_PP_ITERATION_DEPTH() == 2 \
+   && BOOST_PP_FRAME_FLAGS(1) == 1 \
+
+   // define ellipsis state
+   #if BOOST_PP_IS_SELFISH
+      #define ELLIPSIS_I ((true), (...))
+   #else
+      #define ELLIPSIS_I ((false), BOOST_PP_NIL)
+   #endif
+
+   #define N BOOST_PP_ITERATION()
+   #define Q QUALIFIER(BOOST_PP_FRAME_ITERATION(1))
+
+   template<class R, class O BOOST_PP_ENUM_TRAILING_PARAMS(N, class T)>
+   struct function_traits<R (O::*)(BOOST_PP_ENUM_PARAMS(N, T) ELLIPSIS(1)) Q>
+      : detail::function_traits_base {
+      static const bool is_member = true;
+      typedef R (O::* pointer_to_member_type)(BOOST_PP_ENUM_PARAMS(N, T) ELLIPSIS(1)) Q;
+      typedef O class_type;
+      typedef Q O qualified_class_type;
+      static const bool has_ellipsis = ELLIPSIS(0);
+      static const bool is_const =
+         BOOST_PP_FRAME_ITERATION(1) == 1 || BOOST_PP_FRAME_ITERATION(1) == 3;
+      static const bool is_volatile =
+         BOOST_PP_FRAME_ITERATION(1) == 2 || BOOST_PP_FRAME_ITERATION(1) == 3;
+      typedef R return_type;
+      static const int parameter_count = N;
+      template<int, class D = int> struct parameter;
+      #if N
+         // iterate over parameters
+         #define BOOST_PP_ITERATION_PARAMS_3 \
+            (3, (0, N - 1, "function_traits.hpp")) \
+            /**/
+         ??=include BOOST_PP_ITERATE()
+      #endif
+   };
+
+   #undef Q
+   #undef N
+   #undef ELLIPSIS_I
+
+   // re-include this section for an ellipsis variant
+   #if !BOOST_PP_IS_SELFISH
+      #define BOOST_PP_INDIRECT_SELF "function_traits.hpp"
+      ??=include BOOST_PP_INCLUDE_SELF()
+   #endif
+
+// parameter specializations
+#else
+
+   #define X BOOST_PP_ITERATION()
+
+      template<class D> struct parameter<X, D> {
+         typedef BOOST_PP_CAT(T, X) type;
+      };
+
+   #undef X
+
+#endif
+
+
+ One problem that still exists is the lack of support for throw specifications.  + There is no way that we can completely handle it anyway because we cannot partially specialize + on throw specifications.  + However, we could accurately report the "actual" function type, etc., including the throw + specification (which the above implementation doesn't do, as it reconstructs those types).  + If you like, you can figure out how to do that on your own as an exercise.  +
+ +

See Also

+ +
- Paul Mensonides
+ + diff --git a/doc/topics/incompatible.html b/doc/topics/incompatible.html new file mode 100644 index 0000000..f1f76a0 --- /dev/null +++ b/doc/topics/incompatible.html @@ -0,0 +1,129 @@ + + + incompatible.html + + + +

Incompatibilities

+
+ There are several incompatibilities with the previous Boost release (1.28).  + These fall into roughly three categories:  +
+
    +
  • the horizontal repetition primitives based on BOOST_PP_REPEAT
  • +
  • the reentrancy syntax
  • +
  • list folding
  • +
+

Repetition Targets

+
+ First, and probably the most commonly used, is the target macros passed into BOOST_PP_REPEAT and the horizontal repetition contructs that use BOOST_PP_REPEAT.  + This includes all of the BOOST_PP_REPEAT_* primitives and all of the BOOST_PP_ENUM_* primitives that require a target macro. +
+
+ The incompatiblity is trivial, but it will require that the source be updated.  +
+
+ These target macros must now except a third parameter.  + This extra parameter becomes the first parameter in every target macro.  + It represents the next repetition dimension and brings BOOST_PP_REPEAT inline with rest of the library.  +
+
+ So, what once was: +
+
+ #define macro(n, data) ...
+ BOOST_PP_REPEAT(5, macro, data) +
+
+ ...is now: +
+
+ #define macro(z, n, data) ...
+ BOOST_PP_REPEAT(5, macro, data) +
+
+ This parameter can be used for highly efficient reentrance into the BOOST_PP_REPEAT mechanism.  + However, it is not necessary to use it as the library can automatically detect the next available repetition dimension. +
+

Dimensional Ordering

+
+ Because of this detection, however, it is unsafe to use BOOST_PP_REPEAT_1ST, BOOST_PP_REPEAT_2ND, and BOOST_PP_REPEAT_3RD out of order.  + These macros bypass the automatic-recursion mechanism, and the automatic-recursion mechanism relies on macros being used in the proper order.  + To clarify, if you use these bypass macros, the outer-most repetition must be BOOST_PP_REPEAT_1ST, then BOOST_PP_REPEAT_2ND, and finally BOOST_PP_REPEAT_3RD.  + Any other usage is not supported by the library.  + Sometimes it may work, and other times it won't. +
+

Reentrancy Syntax

+
+ Automatic-recursion brings with it another issue as well. Previously, the reentrancy syntax for BOOST_PP_WHILE (and similarly for BOOST_PP_FOR) was: +
+
+ BOOST_PP_WHILE ## d(pred, op, state) +
+
+ ...or: +
+
+ BOOST_PP_CAT(BOOST_PP_WHILE, d)(pred, op, state) +
+
+ Under the automatic-recursion model, the BOOST_PP_CAT version breaks.  + This is because BOOST_PP_CAT allows its arguments to expand prior to concatenation, + and BOOST_PP_WHILE is a macro that expands without arguments.  + The library makes it appear that it takes three parameters, but that is the trick of automatic-recursion.  + It works similarly to the following: +
+
+ #define A(x, y) ...
+ #define B A
+ // ...
+ B(2, 3) +
+
+ The syntax makes it look like the B macro above takes two arguments, but it doesn't.  + The automatic-recursion mechanism works in this fashion, except that the "B" macro deduces the next available "A" macro. +
+
+ Because some preprocessors are still slow, direct reentrancy (sans automatic-recursion) is still necessary in non-trivial cases.  + Consequently, the library uses a new syntax to handle reentrancy: +
+
+ BOOST_PP_FOR_ ## r(state, pred, op, macro)
+ BOOST_PP_REPEAT_ ## z(count, macro, data)
+ BOOST_PP_WHILE_ ## d(pred, op, state) +
+

Folding

+
+ Previously, the BOOST_PP_LIST_FOLD_RIGHT macros' arguments were the reverse of BOOST_PP_LIST_FOLD_LEFT.  + Also, the accumulation macro passed into BOOST_PP_LIST_FOLD_RIGHT was called with reversed parameters as well.  + This discrepancy has been eliminated. +
+
+ To illustrate, BOOST_PP_LIST_FOLD_RIGHT used to be used like this: +
+
+ #define macro(d, elem, state)
+ BOOST_PP_LIST_FOLD_RIGHT(macro, list, state) +
+
+ This signature has been replaced by... +
+
+ #define macro(d, state, elem)
+ BOOST_PP_LIST_FOLD_RIGHT(macro, state, list) +
+

Summary

+
+ The library has many new features not present in the 1.28 release, and this list does not attempt to enumerate them.  + This is simply a list of things that must change for code to be compatible with this new release. +
+

See Also

+ +
- Paul Mensonides
+ + diff --git a/doc/topics/local_iteration.html b/doc/topics/local_iteration.html new file mode 100644 index 0000000..32d6d5b --- /dev/null +++ b/doc/topics/local_iteration.html @@ -0,0 +1,149 @@ + + + local_iteration.html + + + +

Local Iteration

+
+ Local iteration is a simple vertical repetition construct.  + It expands a macro with each number in a user-specified range.  + Each expansion is on a separate line. +
+

Tutorial

+
+ This mechanism requires two pieces of information to operate:  + a range to iterate over and a macro to expand on each iteration.  + This information is obtained by the mechanism through two named external arguments.  + These arguments are specified as user-defined macros named BOOST_PP_LOCAL_LIMITS and BOOST_PP_LOCAL_MACRO. +
+
+ BOOST_PP_LOCAL_LIMITS specifies a range of values to iterate over.  + It must expand to a tuple containing two elements--a lower and upper bound.  + Both the upper and lower bounds must be numeric values in the range of 0 to BOOST_PP_LIMIT_ITERATION.  + For example, if the user wishes a macro to be expanded with numbers ranging from 0 to 10, + BOOST_PP_LOCAL_LIMITS would be defined like this: +
+
+#define BOOST_PP_LOCAL_LIMITS (0, 10)
+
+
+ Note that there is whitespace after the name of the macro.  + The macro does not take two arguments.  + In the case above, if there was no whitespace, a preprocessing error would occur because 0 and 10 are invalid identifiers. +
+
+ Both the upper and lower bounds specified in the BOOST_PP_LOCAL_LIMITS macro are evaluated parameters.  + This implies that they can include simple arithmetic or logical expressions.  + For instance, the above definition could easily have been written like this: +
+
+#define N() 5
+#define BOOST_PP_LOCAL_LIMITS (0, N() + 5)
+
+
+ Because of this, if the whitespace after the macro name is elided, it is possible for the definition to be syntactically valid: +
+
+#define A 0
+#define B 10
+#define BOOST_PP_LOCAL_LIMITS(A, B)
+   // note:  no whitespace   ^
+
+
+ If this happens, an error will occur inside the mechanism when it attempts to use this macro.  + The error messages that result may be obscure, so always remember to include the whitespace.  + A correct version of the above looks like this: +
+
+#define A 0
+#define B 10
+#define BOOST_PP_LOCAL_LIMITS (A, B)
+   // note:  has whitespace  ^
+
+
+ BOOST_PP_LOCAL_MACRO is the macro that is expanded by the mechanism.  + This macro is expanded on each iteration with the current number of the iteration.  + It must defined as a unary macro or result in a macro that can be called with one argument: +
+
+#define BOOST_PP_LOCAL_MACRO(n) \
+   template<> struct sample<n> { }; \
+   /**/
+
+
+ ...or... +
+
+#define SAMPLE(n) \
+   template<> struct sample<n> { }; \
+   /**/
+
+#define BOOST_PP_LOCAL_MACRO SAMPLE
+
+
+ Once these two macros are defined, the local iteration is initiated by including BOOST_PP_LOCAL_ITERATE(). +
+
+??=include BOOST_PP_LOCAL_ITERATE()
+
+
+ (The ??= token is a trigraph for #.  + I use the trigraph to make it clear that I am including a file rather than defining or expanding a macro, but it is not necessary.  + Even the digraph version, %:, could be used.  + Some compilers do not readily accept trigraphs and digraphs, so keep that in mind.  + Other than that, use whichever one you prefer.) +
+
+ In order to repeat the sample specialization, the pieces must be put together.... +
+
+#define BOOST_PP_LOCAL_MACRO(n) \
+   template<> struct sample<n> { }; \
+   /**/
+
+#define BOOST_PP_LOCAL_LIMITS (0, 10)
+??=include BOOST_PP_LOCAL_ITERATE()
+
+
+ This will result in a specialization of sample for each number in the range of 0 to 10.  + The output will look something like this: +
+
+template<> struct sample<0> { };
+template<> struct sample<1> { };
+template<> struct sample<2> { };
+
+// ...
+
+template<> struct sample<10> { };
+
+
+ After the local-iteration is complete, both BOOST_PP_LOCAL_LIMITS and BOOST_PP_LOCAL_MACRO are automatically undefined.  + If the values need to be retained for a future local-iteration, they must be defined indirectly: +
+
+#define LIMITS (0, 10)
+
+#define SAMPLE(n) \
+   template<> struct sample<n> { }; \
+   /**/
+
+#define BOOST_PP_LOCAL_LIMITS LIMITS
+#define BOOST_PP_LOCAL_MACRO(n) SAMPLE(n)
+
+??=include BOOST_PP_LOCAL_ITERATE()
+
+ +

See Also

+ +
- Paul Mensonides
+ + \ No newline at end of file diff --git a/doc/topics/motivation.html b/doc/topics/motivation.html new file mode 100644 index 0000000..e4e38f0 --- /dev/null +++ b/doc/topics/motivation.html @@ -0,0 +1,100 @@ + + + motivation.html + + + +

Motivation

+
+ The C++ function and template parameter lists are special syntactic constructs, and it is impossible to directly + manipulate or generate them using C++ constructs.  + This leads to unnecessary code repetition. +
+
+ Consider the implementation of the is_function<> metafunction is Boost.  + The implementation uses an overloaded is_function_tester() function that is used for testing if a type is convertible + to a pointer to a function.  + Because of the special treatment of parameter lists, it is not possible to directly match a function with an arbitrary parameter list.  + Instead, the is_function_tester() must be overloaded for every distinct number of parameters that is to be supported.  + For example: +
+
+template<class R>
+yes_type is_function_tester(R (*)());
+
+template<class R, class A0>
+yes_type is_function_tester(R (*)(A0));
+
+template<class R, class A0, class A1>
+yes_type is_function_tester(R (*)(A0, A1));
+
+template<class R, class A0, class A1, class A2>
+yes_type is_function_tester(R (*)(A0, A1, A2));
+
+// ...
+
+
+ The need for this kind of repetition occurs particularly frequently while implementing generic components or metaprogramming facilities, + but the need also manifests itself in many far simpler situations. +
+

Typical Solutions

+
+ Typically the repetition is done manually.  + Manual code repetition is highly unproductive, but sometimes more readable to the untrained eye. +
+
+ Another solution is to write an external program for generating the repeated code or use some other extra linguistic means such as a smart editor.  + Unfortunately, using external code generators has many disadvantages: +
    +
  • Writing the generator takes time.  (This could be helped by using a standard generator.)
  • +
  • It is no longer productive to manipulate C++ code directly.
  • +
  • Invoking the generator may be difficult.
  • +
  • Automating the invocation of the generator can be difficult in certain environments.  (Automatic invocation is desirable for active libraries.)
  • +
  • Porting and distributing the generator may be difficult or simply takes precious time.
  • +
+
+

What about the preprocessor?

+
+ Because C++ comes with a preprocessor, one would assume that it would support these kinds of needs directly.  + Using the preprocessor in this case is highly desirable because: +
    +
  • The preprocessor is highly portable.
  • +
  • The preprocessor is automatically invoked as part of the compilation process.
  • +
  • Preprocessor metacode can be directly embedded into the C++ source code.
  • +
  • Compilers generally allow viewing or outputting the preprocessed code, which can be used for debugging or to copy and paste the generated code.
  • +
+
+
+ Most unfortunately, the preprocessor is a very low level preprocessor that specifically does not support repetition or recursive macros.  + Library support is needed! +
+
+ For detailed information on the capabilities and limitations of the preprocessor, please refer to the C++ standard [Std]. +
+

The Motivation Example Revisited

+
+ Using the primitives of the preprocessor library, the is_function_tester()'s could be implemented like this: +
+
+#define IS_FUNCTION_TESTER(Z, N, _) \
+   template<class R BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS(N, class A)> \
+   yes_type is_function_tester(R (*)(BOOST_PP_ENUM_PARAMS(N, A))); \
+   /**/
+
+BOOST_PP_REPEAT(BOOST_PP_INC(MAX_IS_FUNCTION_TESTER_PARAMS), IS_FUNCTION_TESTER, _)
+
+#undef IS_FUNCTION_TESTER
+
+
+ In order to change the maximum number of function parameters supported, you now simply change the MAX_IS_FUNCTION_TESTER_PARAMS definition and recompile. +
+
+
+ © Copyright Housemarque Oy 2002 +
+
+Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies.  +This document is provided "as is" without express or implied warranty and with no claim as to its suitability for any purpose. +
+ + diff --git a/doc/topics/problems.html b/doc/topics/problems.html new file mode 100644 index 0000000..cf5d53c --- /dev/null +++ b/doc/topics/problems.html @@ -0,0 +1,124 @@ + + + problems.html + + + +

Known Problems of the C/C++ Preprocessor

+
+ Preprocessor metaprogramming is subject to heated discussions.  + Part of this is caused by bad experiences with dangerous techniques, + such as defining inline functions using macros.  + As a rule of thumb, if you can find a clean and manageable way to do something + without the preprocessor, then you should do it that way. +
+
+ Let's survey some of the widely known problems of the preprocessor in a problem/solution format. +
+

Problem #1

+
+ The preprocessor does not respect scope, therefore macros can accidentally and sometimes silently replace code. +
+
+ Solution A +
+ Use all caps identifiers for macros and only macros.  + This practically eliminates the possibility that a macro might replace other kinds of code accidentally. +
+
+
+ Solution B +
+ Use the local macro idiom: +
+
+#define MACRO ...
+// use MACRO
+#undef MACRO
+
+
+ This makes sure that a macro cannot accidentally replace code outside of the scope of the local macro. +
+
+ A problem with this solution is that the #undef cannot be automated and may be forgotten.  + Experienced programmers generally write the #undef either immediately before (in time) + or immediately after writing the macro definition. +
+
+
+ Solution C +
+ Use the unique macro prefix idiom. +
+
+#define UMP_MACRO
+// use UMP_MACRO
+
+
+ This makes accidental substitution and collisions highly unlikely.  + Problems with this solution include: +
+
    +
  • There can still be naming collisions inside a large project.
  • +
  • Macros still pollute the global namespace.
  • +
+ By combining all solutions, whenever possible, the scope problem can be largely avoided. +
+

Problem #2

+
+ Preprocessor code is difficult to read.  + It requires an understanding of the basic process of how the preprocessor recursively expands macros, + finding macro definitions, and mentally substituting the parameters of the macro. +
+
+ Solution +
+ Any kind of programming requires a basic understanding of how the code is executed.  + Any parameterization technique, including simple functions and templates requires finding + the definition and mentally substituting parameters. +
+
+ However, it is good to know a few techniques: +
+
    +
  • By using as many local macros as reasonable, the bulk of the searching process can be eliminated.
  • +
  • Code browsers and text search tools make it easier to find the definitions.
  • +
  • The compiler can be used for generating the preprocessed source code in order to look for bugs.
  • +
  • + Before turning something into a preprocessor metaprogram, first implement a small scale version + of it without the preprocessor.  + The work bottom-up, replacing hand-written constructs by using the preprocessor.  + This way you can test the code incrementally.  + Experienced programmers often skip many stages, but if something proves too complex to write + directly, it is always possible to fall back to incremental methods. +
  • +
  • + If you insert a special symbol into the preprocessor code in places where there should be a line break, + you can make code readable after preprocessing simply by using a search and replace tool. +
  • +
+ An especially important thing to remember is to limit the use of the preprocessor to + structured, well-understood, and safe methods.  + Structure helps to understand complex systems [McConnell]. +
+

Problem #3

+
+ "I'd like to see Cpp abolished." - Bjarne Stroustrup in [Stroustrup]. +
+
+ Solution +
+ The C/C++ preprocessor will be here for a long time. +
+ In practice, preprocessor metaprogramming is far simpler and more portable than template metaprogramming [Czarnecki]. +
+
+
+ © Copyright Housemarque Oy 2002 +
+
+Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies.  +This document is provided "as is" without express or implied warranty and with no claim as to its suitability for any purpose. +
+ + diff --git a/doc/topics/reentrancy.html b/doc/topics/reentrancy.html new file mode 100644 index 0000000..1bdc0fa --- /dev/null +++ b/doc/topics/reentrancy.html @@ -0,0 +1,253 @@ + + + reentrancy.html + + + +

Reentrancy

+
+ Macro expansion in the preprocessor is entirely functional.  + Therefore, there is no iteration.  + Unfortunately, the preprocessor also disallows recursion.  + This means that the library must fake iteration or recursion by + defining sets of macros that are implemented similarly.  +
+
+ To illustrate, here is a simple concatenation macro: +
+
+#define CONCAT(a, b) CONCAT_D(a, b)
+#define CONCAT_D(a, b) a ## b
+
+CONCAT(a, CONCAT(b, c)) // abc
+
+
+ This is fine for a simple case like the above, but what happens in a scenario like the following: +
+
+#define AB(x, y) CONCAT(x, y)
+
+CONCAT(A, B(p, q)) // CONCAT(p, q)
+
+
+ Because there is no recursion, the example above expands to CONCAT(p, q) rather than pq. +
+
+ There are only two ways to "fix" the above.  + First, it can be documented that AB uses CONCAT and disallow usage similar to the above.  + Second, multiple concatenation macros can be provided.... +
+
+#define CONCAT_1(a, b) CONCAT_1_D(a, b)
+#define CONCAT_1_D(a, b) a ## b
+
+#define CONCAT_2(a, b) CONCAT_2_D(a, b)
+#define CONCAT_2_D(a, b) a ## b
+
+#define AB(x, y) CONCAT_2(x, y)
+
+CONCAT_1(A, B(p, q)) // pq
+
+
+ This solves the problem.  + However, it is now necessary to know that AB uses, not only a concatenation macro, + but CONCAT_2 specifically. +
+
+ A better solution is to abstract which concatenation macro is used.... +
+
+#define AB(c, x, y) CONCAT_ ## c(x, y)
+
+CONCAT_1(A, B(2, p, q)) // pq
+
+
+ This is an example of generic reentrance, in this case, into a fictional set of concatenation macros.  + The c parameter represents the "state" of the concatenation construct, + and as long as the user keeps track of this state, AB can be used inside of a concatenation macro. +
+
+ The library has the same choices.  + It either has to disallow a construct being inside itself or provide multiple, equivalent definitions of a construct + and provide a uniform way to reenter that construct.  + There are several contructs that require recursion (such as BOOST_PP_WHILE).  + Consequently, the library chooses to provide several sets of macros with mechanisms to reenter the set at a macro + that has not already been used. +
+
+ In particular, the library must provide reentrance for BOOST_PP_FOR, BOOST_PP_REPEAT, and BOOST_PP_WHILE.  + There are two mechanisms that are used to accomplish this:  state parameters (like the above concatenation example) and automatic recursion. +
+

State Parameters

+
+ Each of the above constructs (BOOST_PP_FOR, BOOST_PP_REPEAT, and BOOST_PP_WHILE) has an associated state.  + This state provides the means to reenter the respective construct. +
+
+ Several user-defined macros are passed to each of these constructs (for use as predicates, operations, etc.).  + Every time a user-defined macro is invoked, it is passed the current state of the construct that invoked it so that the macro can reenter + the respective set if necessary. +
+
+ These states are used in one of two ways--either by concatenating to or passing to another macro. +
+
+ There are three types of macros that use these state parameters.  + First, the set itself which is reentered through concatenation.  + Second, corresponding sets that act like they are a part of the the primary set.  + These are also reentered through concatenation.  + And third, macros that internally use the first or second type of macro.  + These macros take the state as an additional argument. +
+
+ The state of BOOST_PP_WHILE is symbolized by the letter D.  + Two user-defined macros are passed to BOOST_PP_WHILE--a predicate and an operation.  + When BOOST_PP_WHILE expands these macros, it passes along its state so that these macros + can reenter the BOOST_PP_WHILE set.  +
+
+ Consider the following multiplication implementation that illustrates this technique: +
+
+// The addition interface macro.
+// The _D signifies that it reenters
+// BOOST_PP_WHILE with concatenation.
+
+#define ADD_D(d, x, y) \
+   BOOST_PP_TUPLE_ELEM( \
+      2, 0, \
+      BOOST_PP_WHILE_ ## d(ADD_P, ADD_O, (x, y)) \
+   ) \
+   /**/
+
+// The predicate that is passed to BOOST_PP_WHILE.
+// It returns "true" until "y" becomes zero.
+
+#define ADD_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy)
+
+// The operation that is passed to BOOST_PP_WHILE.
+// It increments "x" and decrements "y" which will
+// eventually cause "y" to equal zero and therefore
+// cause the predicate to return "false."
+
+#define ADD_O(d, xy) \
+   ( \
+      BOOST_PP_INC( \
+         BOOST_PP_TUPLE_ELEM(2, 0, xy) \
+      ), \
+      BOOST_PP_DEC( \
+         BOOST_PP_TUPLE_ELEM(2, 1, xy) \
+      ) \
+   ) \
+   /**/
+
+// The multiplication interface macro.
+
+#define MUL(x, y) \
+   BOOST_PP_TUPLE_ELEM( \
+      3, 0, \
+      BOOST_PP_WHILE(MUL_P, MUL_O, (0, x, y)) \
+   ) \
+   /**/
+
+// The predicate that is passed to BOOST_PP_WHILE.
+// It returns "true" until "y" becomes zero.
+
+#define MUL_P(d, rxy) BOOST_PP_TUPLE_ELEM(3, 2, rxy)
+
+// The operation that is passed to BOOST_PP_WHILE.
+// It adds "x" to "r" and decrements "y" which will
+// eventually cause "y" to equal zero and therefore
+// cause the predicate to return "false."
+
+#define MUL_O(d, rxy) \
+   ( \
+      ADD_D( \
+         d, /* pass the state on to ADD_D */ \
+         BOOST_PP_TUPLE_ELEM(3, 0, rxy), \
+         BOOST_PP_TUPLE_ELEM(3, 1, rxy) \
+      ), \
+      BOOST_PP_TUPLE_ELEM(3, 1, rxy), \
+      BOOST_PP_DEC( \
+         BOOST_PP_TUPLE_ELEM(3, 2, rxy) \
+      ) \
+   ) \
+   /**/
+
+MUL(3, 2) // expands to 6
+
+
+ There are a couple things to note in the above implementation.  + First, note how ADD_D reenters BOOST_PP_WHILE using the d state parameter.  + Second, note how MUL's operation, which is expanded by BOOST_PP_WHILE, passes the state + on to ADD_D.  + This illustrates state reentrance by both argument and concatenation. +
+
+ For every macro in the library that uses BOOST_PP_WHILE, + there is a state reentrant variant.  + If that variant uses an argument rather than concatenation, it is suffixed by _D to symbolize its + method of reentrance.  + Examples or this include the library's own BOOST_PP_ADD_D and BOOST_PP_MUL_D.  + If the variant uses concatenation, it is suffixed by an underscore.  + It is completed by concatenation of the state.  + This includes BOOST_PP_WHILE itself with BOOST_PP_WHILE_ ## d and, for example, + BOOST_PP_LIST_FOLD_LEFT with BOOST_PP_LIST_FOLD_LEFT_ ## d. +
+
+ The same set of conventions are used for BOOST_PP_FOR and BOOST_PP_REPEAT, but with the letters + R and Z, respectively, to symbolize their states. +
+
+ Also note that the above MUL implementation, though not immediately obvious, is using all three + types of reentrance.  + Not only is it using both types of state reentrance, it is also using automatic recursion.... +
+

Automatic Recursion

+
+ Automatic recursion is a technique that vastly simplifies the use of reentrant constructs.  + It is used by simply not using any state parameters at all. +
+
+ The MUL example above uses automatic recursion when it uses BOOST_PP_WHILE by itself.  + In other words, MUL can still be used inside BOOST_PP_WHILE even though it doesn't + reenter BOOST_PP_WHILE by concatenating the state to BOOST_PP_WHILE_. +
+
+ To accomplish this, the library uses a "trick."  + Despite what it looks like, the macro BOOST_PP_WHILE does not take three arguments.  + In fact, it takes no arguments at all.  + Instead, the BOOST_PP_WHILE macro expands to a macro that takes three arguments.  + It simply detects what the next available BOOST_PP_WHILE_ ## d macro is and returns it.  + This detection process is somewhat involved, so I won't go into how it works here, + but suffice to say it does work. +
+
+ Using automatic recursion to reenter various sets of macros is obviously much simpler.  + It completely hides the underlying implementation details.  + So, if it is so much easier to use, why do the state parameters still exist?  + The reason is simple as well.  + When state parameters are used, the state is known at all times.  + This is not the case when automatic recursion is used.  + The automatic recursion mechanism has to deduce the state at each point that it is used.  + This implies a cost in macro complexity that in some situations--notably at deep macro depths--will slow + some preprocessors to a crawl. +
+

Conclusion

+
+ It is really a tradeoff whether to use state parameters or automatic recursion for reentrancy.  + The strengths of automatic recursion are ease of use and implementation encapsulation.  + These come at a performance cost on some preprocessors in some situations.  + The primary strength of state parameters, on the other hand, is efficiency.  + Use of the state parameters is the only way to achieve maximum efficiency.  + This efficiency comes at the cost of both code complexity and exposition of implementation. +
+

See Also

+ +
- Paul Mensonides
+ + diff --git a/doc/topics/techniques.html b/doc/topics/techniques.html new file mode 100644 index 0000000..adf9869 --- /dev/null +++ b/doc/topics/techniques.html @@ -0,0 +1,336 @@ + + + techniques.html + + + + +

Techniques

+
+ The preprocessor metaprogramming techniques are presented in example format. +
+ +

Example - Use a local macro to avoid small scale repetition.

+
+#define BOOST_PP_DEF(op) /* ..................................... */ \
+   template<class T, int n>                                          \
+   vec<T, n> operator op ## =(vec<T, n> lhs, const vec<T, n>& rhs) { \
+      for (int i = 0; i < n; ++i) {                                  \
+         lhs(i) op ## = rhs(i);                                      \
+      }                                                              \
+   }                                                                 \
+   /**/
+
+BOOST_PP_DEF(+)
+BOOST_PP_DEF(-)
+BOOST_PP_DEF(*)
+BOOST_PP_DEF(/)
+
+#undef BOOST_PP_DEF
+
+
+ Tip:  It is usually okay to use a standard macro name like BOOST_PP_DEF for this kind of code + because the macro is both defined and undefined in the immediate site of its use. +
+
+ Tip:  It is easier to verify proper use of the line continuation operator when they are aligned. +
+
+ Notes:  You can extend this example by defining more and different kinds of operators.  + Before doing so, consider using the algebraic categories technique introduced in [Barton] + or a layered architecture (see for instance [Czarnecki]).  + However, at some point you must type the operator tokens *, /, +, -, etc., + because it is impossible to generate them using templates.  + The resulting categorical repetition of tokens can be eliminated by using preprocessor metaprogramming. +
+ +

Example - Use BOOST_PP_EMPTY as an unused parameter in local macro instantiations.

+
+#define BOOST_PP_DEF(cv) /* ... */ \
+   template<class base>            \
+   cv() typename implement_subscript_using_begin_subscript<base>::value_type& \
+   implement_subscript_using_begin_subscript<base>::operator[](index_type i) cv() { \
+      return base::begin()[i];     \
+   }                               \
+   /**/
+
+
+ How:  BOOST_PP_EMPTY() expands to nothing and can be used as an unused parameter. +
+
+ Note:  BOOST_PP_EMPTY with the () never gets expanded.  + The () is necessary to invoke a function-like macro. +
+
+ Caveat:  You cannot safely use concatenation while using BOOST_PP_EMPTY(). +
+
+ Tip:  Occasionally, one or two lines are considerably longer than the rest.  + It can often save some work to not align all the line continuation operators without making the code too unreadable. +
+
+ Tip:  Use syntax highlighting on preprocessor metaprogramming macro identifiers such as: +
    +
  • BOOST_PP_DEF
  • +
  • BOOST_PP_EMPTY
  • +
  • BOOST_PP_REPEAT
  • +
  • ...
  • +
+ It can greatly improve readability. +
+ +

Example - Use BOOST_PP_CAT instead of ## when necessary.

+
+#define STATIC_ASSERT(expr) \
+   enum { BOOST_PP_CAT(static_check_, __LINE__) = (expr) ? 1 : -1 }; \
+   typedef char \
+      BOOST_PP_CAT(static_assert_, __LINE__)[BOOST_PP_CAT(static_check_, __LINE__)] \
+   /**/
+
+// ...
+
+STATIC_ASSERT(sizeof(int) <= sizeof(long));
+
+
+ Why:  Macro expansion proceeds recursively in "layers."  + Token pasting prevents the preprocessor from performing macro expansion, + therefore it is often necessary to delay token concatenation. +
+ +

Example - Use BOOST_PP_STRINGIZE instead of # whenever necessary.

+
+#define NOTE(str) \
+   message(__FILE__ "(" BOOST_PP_STRINGIZE(__LINE__) ") : " str) \
+   /**/
+
+// ...
+
+#pragma NOTE("TBD!")
+
+
+ Why:  Macro expansion proceeds recursively in "layers."  + Stringization prevents the preprocessor from performing macro expansion, therefore it is often necessary to delay stringization. +
+ +

Example - Use BOOST_PP_ENUM_PARAMS (and its variants) or BOOST_PP_REPEAT and BOOST_PP_COMMA_IF to avoid O(n) repetition on lists in general.

+
+struct make_type_list_end;
+
+template<
+   BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+      MAKE_TYPE_LIST_MAX_LENGTH, 
+      class T, 
+      make_type_list_end
+   )
+>
+struct make_type_list {
+   private:
+      enum { end = is_same<T0, make_type_list_end>::value };
+   public:
+      typedef typename type_if<
+         end, type_cons_empty,
+         type_cons<
+            T0,
+            typename type_inner_if<
+               end, type_identity<end>,
+               make_type_list<
+                  BOOST_PP_ENUM_SHIFTED_PARAMS(
+                     MAKE_TYPE_LIST_MAX_LENGTH,
+                     T
+                  )
+               >
+            >::type
+         >
+      >::type type;
+};
+
+
+ How:  BOOST_PP_REPEAT uses simulated recursion (pseudo code): +
+
+#define BOOST_PP_REPEAT(n, m, p) BOOST_PP_REPEAT ## n(m, p)
+
+#define BOOST_PP_REPEAT0(m, p)
+#define BOOST_PP_REPEAT1(m, p) m(0, p)
+#define BOOST_PP_REPEAT2(m, p) m(0, p) m(1, p)
+#define BOOST_PP_REPEAT3(m, p) BOOST_PP_REPEAT2(m, p) m(2, p)
+#define BOOST_PP_REPEAT4(m, p) BOOST_PP_REPEAT3(m, p) m(3, p)
+// ...
+
+
+ Note:  This is no longer how BOOST_PP_REPEAT is implemented, so the code above is illustrative only!  +
+
+ BOOST_PP_ENUM_PARAMS and its variations use BOOST_PP_REPEAT.  + BOOST_PP_COMMA_IF(I) expands to a comma if I != 0.  + BOOST_PP_INC(I) essentially expands to "I+1," and BOOST_PP_DEC(I) essentially expands to "I-1.". +
+ +

Example - Use a conditional macro definition to enable user configuration of code repetition based on need rather than some "reasonable" upper limit.

+
+#ifndef MAKE_TYPE_LIST_MAX_LENGTH
+#define MAKE_TYPE_LIST_MAX_LENGTH 8
+#endif
+
+
+ Now the user can configure the make_type_list primitive without modifying library code. +
+ +

Example - Use BOOST_PP_REPEAT and a token look-up function to eliminate categorical repetition.

+
+// CAVEAT:  My compiler is not standard on arithmetic types.
+#define ARITHMETIC_TYPE(I) ARITHMETIC_TYPE ## I
+
+#define ARITHMETIC_TYPE0    bool
+#define ARITHMETIC_TYPE1    char
+#define ARITHMETIC_TYPE2    signed char
+#define ARITHMETIC_TYPE3    unsigned char
+#define ARITHMETIC_TYPE4    short
+#define ARITHMETIC_TYPE5    unsigned short
+#define ARITHMETIC_TYPE6    int
+#define ARITHMETIC_TYPE7    unsigned int
+#define ARITHMETIC_TYPE8    long
+#define ARITHMETIC_TYPE9    unsigned long
+#define ARITHMETIC_TYPE10   float
+#define ARITHMETIC_TYPE11   double
+#define ARITHMETIC_TYPE12   long double
+
+#define ARITHMETIC_TYPE_CNT 13
+
+// ...
+
+#define BOOST_PP_DEF(z, I, _) /* ... */ \
+   catch (ARITHMETIC_TYPE(I) t) {       \
+      report_typeid(t);                 \
+      report_value(t);                  \
+   }                                    \
+   /**/
+
+BOOST_PP_REPEAT(ARITHMETIC_TYPE_CNT, BOOST_PP_DEF, _)
+
+#undef BOOST_PP_DEF
+
+
+ Note:  The repetition of the above example can be eliminated using template metaprogramming [Czarnecki] as well.  + However categorical repetition of operator tokens cannot be completely eliminated by using template metaprogramming. +
+ +

Example - Use BOOST_PP_REPEAT to avoid O(n*n) repetition.

+
+#ifndef MAX_VEC_ARG_CNT
+#define MAX_VEC_ARG_CNT 8
+#endif
+
+// ...
+
+#define ARG_FUN(z, i, _) BOOST_PP_COMMA_IF(i) T a ## i
+#define ASSIGN_FUN(z, i, ) (*this)[i] = a ## i;
+
+#define DEF_VEC_CTOR_FUN(z, i, _) /* ... */ \
+   vec(BOOST_PP_REPEAT(i, ARG_FUN, _)) { \
+      BOOST_PP_REPEAT(i, ASSIGN_FUN, _)  \
+   }                                     \
+   /**/
+
+BOOST_PP_REPEAT(BOOST_PP_INC(MAX_VEC_ARG_CNT), DEF_VEC_CTOR_FUN, _)
+
+#undef ARG_FUN
+#undef ASSIGN_FUN
+#undef DEF_VEC_CTOR_FUN
+
+// ...
+
+
+ How:  BOOST_PP_REPEAT is implemented is a special way to enable automatic recursion. +
+ +

Example - Use BOOST_PP_IF to implement special case for the first element.

+
+#define COMMA_IF(c) \
+   BOOST_PP_IF(c, BOOST_PP_COMMA, BOOST_PP_EMPTY)() \
+   /**/
+
+BOOST_PP_IF(0, true, false) == false;
+BOOST_PP_IF(1, true, false) == true;
+
+
+ BOOST_PP_IF enables convenient generation of lists using BOOST_PP_REPEAT. +
+
+ Note:  THEN and ELSE don't have to be macros.  + However, if at least one of them is a function-like macro, and you want it be expanded conditionally, + you have to make the other parameter a function-like macro too.  + This can often be done using BOOST_PP_IDENTITY.  + Consider the following example (by Aleksey Gurtovoy): +
+
+#define NUMBERED_EXPRESSION(i, x) /* ... */ \
+   BOOST_PP_IF(                             \
+      i,                                    \
+      BOOST_PP_IDENTITY(x ## i)             \
+      BOOST_PP_EMPTY                        \
+   )()                                      \
+   /**/
+
+
+ Note:  Like in the above implementation of COMMA_IF, the result of BOOST_PP_IF is often invoked and not the THEN and ELSE parameters.  + If the parameters were invoked, the code would not expand correctly, because the BOOST_PP_EMPTY parameter would get expanded + to nothing before the BOOST_PP_IF would be properly expanded. +
+
+ How:  BOOST_PP_IF is defined for the entire repeat range (psuedo code): +
+
+#define BOOST_PP_IF(c, THEN, ELSE) BOOST_PP_IF ## c(THEN, ELSE)
+
+#define BOOST_PP_IF0(THEN, ELSE) ELSE
+#define BOOST_PP_IF1(THEN, ELSE) THEN
+#define BOOST_PP_IF1(THEN, ELSE) THEN
+// ...
+
+ +

Example:  Use arithmetic, logical, and comparison operations when necessary.

+
+#define SPECIAL_NUMBERED_LIST(n, i, elem, special) \
+   BOOST_PP_ASSERT_MSG(                     \
+      BOOST_PP_LESS(i, n),                  \
+      bad params for SPECIAL_NUMBERED_LIST! \
+   )                                        \
+   BOOST_PP_ENUM_PARAMS(i, elem)            \
+   BOOST_PP_COMMA_IF(i) special             \
+   BOOST_PP_REPEAT(                         \
+      BOOST_PP_SUB(BOOST_PP_DEC(n), i),     \
+      SPECIAL_NUMBERED_LIST_HELPER,         \
+      (elem, i)                             \
+   )                                        \
+   /**/
+
+#define SPECIAL_NUMBERED_LIST_HELPER(z, i, elem_base) \
+   ,                                          \
+   BOOST_PP_CAT(                              \
+      BOOST_PP_TUPLE_ELEM(2, 0, elem_base),   \
+      BOOST_PP_ADD(                           \
+         i,                                   \
+         BOOST_PP_TUPLE_ELEM(2, 1, elem_base) \
+      )                                       \
+   )                                          \
+   /**/
+
+SPECIAL_NUMBERED_LIST(3, 0, E, S)
+SPECIAL_NUMBERED_LIST(3, 1, E, S)
+SPECIAL_NUMBERED_LIST(3, 2, E, S)
+SPECIAL_NUMBERED_LIST(3, 3, E, S)
+
+ +
+
+ © Copyright Housemarque Oy 2002 +
+
+Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies.  +This document is provided "as is" without express or implied warranty and with no claim as to its suitability for any purpose. +
+ + From 6e30689e5e2e82ef95c7565735275dedc7f89e3f Mon Sep 17 00:00:00 2001 From: Paul Mensonides Date: Thu, 3 Oct 2002 22:26:50 +0000 Subject: [PATCH 5/5] lib cleanup [SVN r15696] --- doc/headers/arithmetic/add.hpp.html | 20 ++++++ doc/headers/arithmetic/dec.hpp.html | 19 ++++++ doc/headers/arithmetic/div.hpp.html | 20 ++++++ doc/headers/arithmetic/inc.hpp.html | 19 ++++++ doc/headers/arithmetic/mod.hpp.html | 20 ++++++ doc/headers/arithmetic/mul.hpp.html | 20 ++++++ doc/headers/arithmetic/sub.hpp.html | 20 ++++++ doc/headers/array/data.hpp.html | 19 ++++++ doc/headers/array/elem.hpp.html | 19 ++++++ doc/headers/array/size.hpp.html | 19 ++++++ doc/headers/comparison/equal.hpp.html | 20 ++++++ doc/headers/comparison/greater.hpp.html | 20 ++++++ doc/headers/comparison/greater_equal.hpp.html | 20 ++++++ doc/headers/comparison/less.hpp.html | 20 ++++++ doc/headers/comparison/less_equal.hpp.html | 20 ++++++ doc/headers/comparison/not_equal.hpp.html | 20 ++++++ doc/headers/config/limits.hpp.html | 28 +++++++++ doc/headers/control/deduce_d.hpp.html | 19 ++++++ doc/headers/control/expr_if.hpp.html | 19 ++++++ doc/headers/control/expr_iif.hpp.html | 19 ++++++ doc/headers/control/if.hpp.html | 19 ++++++ doc/headers/control/iif.hpp.html | 19 ++++++ doc/headers/control/while.hpp.html | 20 ++++++ doc/headers/debug/assert.hpp.html | 20 ++++++ doc/headers/debug/line.hpp.html | 19 ++++++ doc/headers/facilities/apply.hpp.html | 19 ++++++ doc/headers/facilities/empty.hpp.html | 19 ++++++ doc/headers/facilities/expand.hpp.html | 19 ++++++ doc/headers/facilities/identity.hpp.html | 19 ++++++ doc/headers/facilities/intercept.hpp.html | 19 ++++++ doc/headers/iteration/iterate.hpp.html | 32 ++++++++++ doc/headers/iteration/local.hpp.html | 19 ++++++ doc/headers/iteration/self.hpp.html | 19 ++++++ doc/headers/list/adt.hpp.html | 24 ++++++++ doc/headers/list/append.hpp.html | 20 ++++++ doc/headers/list/at.hpp.html | 20 ++++++ doc/headers/list/cat.hpp.html | 20 ++++++ doc/headers/list/enum.hpp.html | 20 ++++++ doc/headers/list/filter.hpp.html | 20 ++++++ doc/headers/list/first_n.hpp.html | 20 ++++++ doc/headers/list/fold_left.hpp.html | 23 +++++++ doc/headers/list/fold_right.hpp.html | 23 +++++++ doc/headers/list/for_each.hpp.html | 20 ++++++ doc/headers/list/for_each_i.hpp.html | 20 ++++++ doc/headers/list/for_each_product.hpp.html | 20 ++++++ doc/headers/list/rest_n.hpp.html | 20 ++++++ doc/headers/list/reverse.hpp.html | 20 ++++++ doc/headers/list/size.hpp.html | 20 ++++++ doc/headers/list/to_tuple.hpp.html | 20 ++++++ doc/headers/list/transform.hpp.html | 20 ++++++ doc/headers/logical/and.hpp.html | 19 ++++++ doc/headers/logical/bitand.hpp.html | 19 ++++++ doc/headers/logical/bitnor.hpp.html | 19 ++++++ doc/headers/logical/bitor.hpp.html | 19 ++++++ doc/headers/logical/bitxor.hpp.html | 19 ++++++ doc/headers/logical/bool.hpp.html | 19 ++++++ doc/headers/logical/compl.hpp.html | 19 ++++++ doc/headers/logical/nor.hpp.html | 19 ++++++ doc/headers/logical/not.hpp.html | 19 ++++++ doc/headers/logical/or.hpp.html | 19 ++++++ doc/headers/logical/xor.hpp.html | 19 ++++++ doc/headers/punctuation/comma.hpp.html | 19 ++++++ doc/headers/punctuation/comma_if.hpp.html | 19 ++++++ doc/headers/punctuation/paren.hpp.html | 20 ++++++ doc/headers/punctuation/paren_if.hpp.html | 20 ++++++ doc/headers/repetition/deduce_r.hpp.html | 19 ++++++ doc/headers/repetition/deduce_z.hpp.html | 19 ++++++ doc/headers/repetition/enum.hpp.html | 20 ++++++ .../repetition/enum_binary_params.hpp.html | 20 ++++++ doc/headers/repetition/enum_params.hpp.html | 20 ++++++ .../enum_params_with_a_default.hpp.html | 19 ++++++ .../enum_params_with_defaults.hpp.html | 19 ++++++ doc/headers/repetition/enum_shifted.hpp.html | 20 ++++++ .../repetition/enum_shifted_params.hpp.html | 20 ++++++ doc/headers/repetition/enum_trailing.hpp.html | 20 ++++++ .../enum_trailing_binary_params.hpp.html | 20 ++++++ .../repetition/enum_trailing_params.hpp.html | 20 ++++++ doc/headers/repetition/for.hpp.html | 20 ++++++ doc/headers/repetition/repeat.hpp.html | 23 +++++++ .../repetition/repeat_from_to.hpp.html | 25 ++++++++ doc/headers/selection/max.hpp.html | 20 ++++++ doc/headers/selection/min.hpp.html | 20 ++++++ doc/headers/slot/slot.hpp.html | 20 ++++++ doc/headers/tuple/eat.hpp.html | 19 ++++++ doc/headers/tuple/elem.hpp.html | 19 ++++++ doc/headers/tuple/rem.hpp.html | 19 ++++++ doc/headers/tuple/reverse.hpp.html | 19 ++++++ doc/headers/tuple/to_list.hpp.html | 19 ++++++ doc/top.html | 2 +- test/iteration.h | 61 +++++++++++++++++++ test/test.h | 33 ++++++++++ 91 files changed, 1853 insertions(+), 1 deletion(-) create mode 100644 doc/headers/arithmetic/add.hpp.html create mode 100644 doc/headers/arithmetic/dec.hpp.html create mode 100644 doc/headers/arithmetic/div.hpp.html create mode 100644 doc/headers/arithmetic/inc.hpp.html create mode 100644 doc/headers/arithmetic/mod.hpp.html create mode 100644 doc/headers/arithmetic/mul.hpp.html create mode 100644 doc/headers/arithmetic/sub.hpp.html create mode 100644 doc/headers/array/data.hpp.html create mode 100644 doc/headers/array/elem.hpp.html create mode 100644 doc/headers/array/size.hpp.html create mode 100644 doc/headers/comparison/equal.hpp.html create mode 100644 doc/headers/comparison/greater.hpp.html create mode 100644 doc/headers/comparison/greater_equal.hpp.html create mode 100644 doc/headers/comparison/less.hpp.html create mode 100644 doc/headers/comparison/less_equal.hpp.html create mode 100644 doc/headers/comparison/not_equal.hpp.html create mode 100644 doc/headers/config/limits.hpp.html create mode 100644 doc/headers/control/deduce_d.hpp.html create mode 100644 doc/headers/control/expr_if.hpp.html create mode 100644 doc/headers/control/expr_iif.hpp.html create mode 100644 doc/headers/control/if.hpp.html create mode 100644 doc/headers/control/iif.hpp.html create mode 100644 doc/headers/control/while.hpp.html create mode 100644 doc/headers/debug/assert.hpp.html create mode 100644 doc/headers/debug/line.hpp.html create mode 100644 doc/headers/facilities/apply.hpp.html create mode 100644 doc/headers/facilities/empty.hpp.html create mode 100644 doc/headers/facilities/expand.hpp.html create mode 100644 doc/headers/facilities/identity.hpp.html create mode 100644 doc/headers/facilities/intercept.hpp.html create mode 100644 doc/headers/iteration/iterate.hpp.html create mode 100644 doc/headers/iteration/local.hpp.html create mode 100644 doc/headers/iteration/self.hpp.html create mode 100644 doc/headers/list/adt.hpp.html create mode 100644 doc/headers/list/append.hpp.html create mode 100644 doc/headers/list/at.hpp.html create mode 100644 doc/headers/list/cat.hpp.html create mode 100644 doc/headers/list/enum.hpp.html create mode 100644 doc/headers/list/filter.hpp.html create mode 100644 doc/headers/list/first_n.hpp.html create mode 100644 doc/headers/list/fold_left.hpp.html create mode 100644 doc/headers/list/fold_right.hpp.html create mode 100644 doc/headers/list/for_each.hpp.html create mode 100644 doc/headers/list/for_each_i.hpp.html create mode 100644 doc/headers/list/for_each_product.hpp.html create mode 100644 doc/headers/list/rest_n.hpp.html create mode 100644 doc/headers/list/reverse.hpp.html create mode 100644 doc/headers/list/size.hpp.html create mode 100644 doc/headers/list/to_tuple.hpp.html create mode 100644 doc/headers/list/transform.hpp.html create mode 100644 doc/headers/logical/and.hpp.html create mode 100644 doc/headers/logical/bitand.hpp.html create mode 100644 doc/headers/logical/bitnor.hpp.html create mode 100644 doc/headers/logical/bitor.hpp.html create mode 100644 doc/headers/logical/bitxor.hpp.html create mode 100644 doc/headers/logical/bool.hpp.html create mode 100644 doc/headers/logical/compl.hpp.html create mode 100644 doc/headers/logical/nor.hpp.html create mode 100644 doc/headers/logical/not.hpp.html create mode 100644 doc/headers/logical/or.hpp.html create mode 100644 doc/headers/logical/xor.hpp.html create mode 100644 doc/headers/punctuation/comma.hpp.html create mode 100644 doc/headers/punctuation/comma_if.hpp.html create mode 100644 doc/headers/punctuation/paren.hpp.html create mode 100644 doc/headers/punctuation/paren_if.hpp.html create mode 100644 doc/headers/repetition/deduce_r.hpp.html create mode 100644 doc/headers/repetition/deduce_z.hpp.html create mode 100644 doc/headers/repetition/enum.hpp.html create mode 100644 doc/headers/repetition/enum_binary_params.hpp.html create mode 100644 doc/headers/repetition/enum_params.hpp.html create mode 100644 doc/headers/repetition/enum_params_with_a_default.hpp.html create mode 100644 doc/headers/repetition/enum_params_with_defaults.hpp.html create mode 100644 doc/headers/repetition/enum_shifted.hpp.html create mode 100644 doc/headers/repetition/enum_shifted_params.hpp.html create mode 100644 doc/headers/repetition/enum_trailing.hpp.html create mode 100644 doc/headers/repetition/enum_trailing_binary_params.hpp.html create mode 100644 doc/headers/repetition/enum_trailing_params.hpp.html create mode 100644 doc/headers/repetition/for.hpp.html create mode 100644 doc/headers/repetition/repeat.hpp.html create mode 100644 doc/headers/repetition/repeat_from_to.hpp.html create mode 100644 doc/headers/selection/max.hpp.html create mode 100644 doc/headers/selection/min.hpp.html create mode 100644 doc/headers/slot/slot.hpp.html create mode 100644 doc/headers/tuple/eat.hpp.html create mode 100644 doc/headers/tuple/elem.hpp.html create mode 100644 doc/headers/tuple/rem.hpp.html create mode 100644 doc/headers/tuple/reverse.hpp.html create mode 100644 doc/headers/tuple/to_list.hpp.html create mode 100644 test/iteration.h create mode 100644 test/test.h diff --git a/doc/headers/arithmetic/add.hpp.html b/doc/headers/arithmetic/add.hpp.html new file mode 100644 index 0000000..c9fb843 --- /dev/null +++ b/doc/headers/arithmetic/add.hpp.html @@ -0,0 +1,20 @@ + + + arithmetic/add.hpp + + + +
+ The arithmetic/add.hpp header defines macros for addition. +
+

Usage

+
+ #include <boost/preprocessor/arithmetic/add.hpp> +
+

Contents

+ + + diff --git a/doc/headers/arithmetic/dec.hpp.html b/doc/headers/arithmetic/dec.hpp.html new file mode 100644 index 0000000..2e06a7f --- /dev/null +++ b/doc/headers/arithmetic/dec.hpp.html @@ -0,0 +1,19 @@ + + + arithmetic/dec.hpp + + + +
+ The arithmetic/dec.hpp header defines a decrementation macro. +
+

Usage

+
+ #include <boost/preprocessor/arithmetic/dec.hpp> +
+

Contents

+ + + diff --git a/doc/headers/arithmetic/div.hpp.html b/doc/headers/arithmetic/div.hpp.html new file mode 100644 index 0000000..63fa1b3 --- /dev/null +++ b/doc/headers/arithmetic/div.hpp.html @@ -0,0 +1,20 @@ + + + arithmetic/div.hpp + + + +
+ The arithmetic/div.hpp header defines macros for division. +
+

Usage

+
+ #include <boost/preprocessor/arithmetic/div.hpp> +
+

Contents

+ + + diff --git a/doc/headers/arithmetic/inc.hpp.html b/doc/headers/arithmetic/inc.hpp.html new file mode 100644 index 0000000..e0208ca --- /dev/null +++ b/doc/headers/arithmetic/inc.hpp.html @@ -0,0 +1,19 @@ + + + arithmetic/inc.hpp + + + +
+ The arithmetic/inc.hpp header defines an incrementation macro. +
+

Usage

+
+ #include <boost/preprocessor/arithmetic/inc.hpp> +
+

Contents

+ + + diff --git a/doc/headers/arithmetic/mod.hpp.html b/doc/headers/arithmetic/mod.hpp.html new file mode 100644 index 0000000..4d7fec4 --- /dev/null +++ b/doc/headers/arithmetic/mod.hpp.html @@ -0,0 +1,20 @@ + + + arithmetic/mod.hpp + + + +
+ The arithmetic/mod.hpp header defines macros for modulus. +
+

Usage

+
+ #include <boost/preprocessor/arithmetic/mod.hpp> +
+

Contents

+ + + diff --git a/doc/headers/arithmetic/mul.hpp.html b/doc/headers/arithmetic/mul.hpp.html new file mode 100644 index 0000000..04adf09 --- /dev/null +++ b/doc/headers/arithmetic/mul.hpp.html @@ -0,0 +1,20 @@ + + + arithmetic/mul.hpp + + + +
+ The arithmetic/mul.hpp header defines macros for multiplication. +
+

Usage

+
+ #include <boost/preprocessor/arithmetic/mul.hpp> +
+

Contents

+ + + diff --git a/doc/headers/arithmetic/sub.hpp.html b/doc/headers/arithmetic/sub.hpp.html new file mode 100644 index 0000000..3633bde --- /dev/null +++ b/doc/headers/arithmetic/sub.hpp.html @@ -0,0 +1,20 @@ + + + arithmetic/sub.hpp + + + +
+ The arithmetic/sub.hpp header defines macros for subtraction. +
+

Usage

+
+ #include <boost/preprocessor/arithmetic/sub.hpp> +
+

Contents

+ + + diff --git a/doc/headers/array/data.hpp.html b/doc/headers/array/data.hpp.html new file mode 100644 index 0000000..9729172 --- /dev/null +++ b/doc/headers/array/data.hpp.html @@ -0,0 +1,19 @@ + + + array/data.hpp + + + +
+ The array/data.hpp header defines a macro to extract the tuple data from an array. +
+

Usage

+
+ #include <boost/preprocessor/array/data.hpp> +
+

Contents

+ + + diff --git a/doc/headers/array/elem.hpp.html b/doc/headers/array/elem.hpp.html new file mode 100644 index 0000000..606219c --- /dev/null +++ b/doc/headers/array/elem.hpp.html @@ -0,0 +1,19 @@ + + + array/elem.hpp + + + +
+ The array/elem.hpp header defines a macro to extract elements from an array. +
+

Usage

+
+ #include <boost/preprocessor/array/elem.hpp> +
+

Contents

+ + + diff --git a/doc/headers/array/size.hpp.html b/doc/headers/array/size.hpp.html new file mode 100644 index 0000000..f1a7895 --- /dev/null +++ b/doc/headers/array/size.hpp.html @@ -0,0 +1,19 @@ + + + array/size.hpp + + + +
+ The array/size.hpp header defines a macro that extracts the size of an array. +
+

Usage

+
+ #include <boost/preprocessor/array/size.hpp> +
+

Contents

+ + + diff --git a/doc/headers/comparison/equal.hpp.html b/doc/headers/comparison/equal.hpp.html new file mode 100644 index 0000000..15123ca --- /dev/null +++ b/doc/headers/comparison/equal.hpp.html @@ -0,0 +1,20 @@ + + + comparison/equal.hpp + + + +
+ The comparison/equal.hpp header defines macros that compare for equality. +
+

Usage

+
+ #include <boost/preprocessor/comparison/equal.hpp> +
+

Contents

+ + + diff --git a/doc/headers/comparison/greater.hpp.html b/doc/headers/comparison/greater.hpp.html new file mode 100644 index 0000000..f242edd --- /dev/null +++ b/doc/headers/comparison/greater.hpp.html @@ -0,0 +1,20 @@ + + + comparison/greater.hpp + + + +
+ The comparison/greater.hpp header defines macros that compare for greater magnitude. +
+

Usage

+
+ #include <boost/preprocessor/comparison/greater.hpp> +
+

Contents

+ + + diff --git a/doc/headers/comparison/greater_equal.hpp.html b/doc/headers/comparison/greater_equal.hpp.html new file mode 100644 index 0000000..e4e76d5 --- /dev/null +++ b/doc/headers/comparison/greater_equal.hpp.html @@ -0,0 +1,20 @@ + + + comparison/greater_equal.hpp + + + +
+ The comparison/greater_equal.hpp header defines macros that compare for equality or greater magnitude. +
+

Usage

+
+ #include <boost/preprocessor/comparison/greater_equal.hpp> +
+

Contents

+ + + diff --git a/doc/headers/comparison/less.hpp.html b/doc/headers/comparison/less.hpp.html new file mode 100644 index 0000000..20288c8 --- /dev/null +++ b/doc/headers/comparison/less.hpp.html @@ -0,0 +1,20 @@ + + + comparison/less.hpp + + + +
+ The comparison/less.hpp header defines macros that compare for lesser magnitude. +
+

Usage

+
+ #include <boost/preprocessor/comparison/less.hpp> +
+

Contents

+ + + diff --git a/doc/headers/comparison/less_equal.hpp.html b/doc/headers/comparison/less_equal.hpp.html new file mode 100644 index 0000000..7809706 --- /dev/null +++ b/doc/headers/comparison/less_equal.hpp.html @@ -0,0 +1,20 @@ + + + comparison/less_equal.hpp + + + +
+ The comparison/less_equal.hpp header defines macros that compare for equality or lesser magnitude. +
+

Usage

+
+ #include <boost/preprocessor/comparison/less_equal.hpp> +
+

Contents

+ + + diff --git a/doc/headers/comparison/not_equal.hpp.html b/doc/headers/comparison/not_equal.hpp.html new file mode 100644 index 0000000..2ddf2a6 --- /dev/null +++ b/doc/headers/comparison/not_equal.hpp.html @@ -0,0 +1,20 @@ + + + comparison/not_equal.hpp + + + +
+ The comparison/not_equal.hpp header defines macros that compare for equality. +
+

Usage

+
+ #include <boost/preprocessor/comparison/not_equal.hpp> +
+

Contents

+ + + diff --git a/doc/headers/config/limits.hpp.html b/doc/headers/config/limits.hpp.html new file mode 100644 index 0000000..794eae8 --- /dev/null +++ b/doc/headers/config/limits.hpp.html @@ -0,0 +1,28 @@ + + + config/limits.hpp + + + +
+ The config/limits.hpp header defines various library limits. +
+

Usage

+
+ #include <boost/preprocessor/config/limits.hpp> +
+

Contents

+ + + diff --git a/doc/headers/control/deduce_d.hpp.html b/doc/headers/control/deduce_d.hpp.html new file mode 100644 index 0000000..95d283d --- /dev/null +++ b/doc/headers/control/deduce_d.hpp.html @@ -0,0 +1,19 @@ + + + control/deduce_d.hpp + + + +
+ The control/deduce_d.hpp header defines a macro to manually deduce the current state of the BOOST_PP_WHILE construct. +
+

Usage

+
+ #include <boost/preprocessor/control/deduce_d.hpp> +
+

Contents

+ + + diff --git a/doc/headers/control/expr_if.hpp.html b/doc/headers/control/expr_if.hpp.html new file mode 100644 index 0000000..bbbc2d9 --- /dev/null +++ b/doc/headers/control/expr_if.hpp.html @@ -0,0 +1,19 @@ + + + control/expr_if.hpp + + + +
+ The control/expr_if.hpp header defines a macro that expands to an expression selectively. +
+

Usage

+
+ #include <boost/preprocessor/control/expr_if.hpp> +
+

Contents

+ + + diff --git a/doc/headers/control/expr_iif.hpp.html b/doc/headers/control/expr_iif.hpp.html new file mode 100644 index 0000000..7e47ec1 --- /dev/null +++ b/doc/headers/control/expr_iif.hpp.html @@ -0,0 +1,19 @@ + + + control/expr_iif.hpp + + + +
+ The control/expr_iif.hpp header defines a macro that expands to an expression selectively. +
+

Usage

+
+ #include <boost/preprocessor/control/expr_iif.hpp> +
+

Contents

+ + + diff --git a/doc/headers/control/if.hpp.html b/doc/headers/control/if.hpp.html new file mode 100644 index 0000000..9cb01da --- /dev/null +++ b/doc/headers/control/if.hpp.html @@ -0,0 +1,19 @@ + + + control/if.hpp + + + +
+ The control/if.hpp header defines a macro that chooses between two alternatives. +
+

Usage

+
+ #include <boost/preprocessor/control/if.hpp> +
+

Contents

+ + + diff --git a/doc/headers/control/iif.hpp.html b/doc/headers/control/iif.hpp.html new file mode 100644 index 0000000..4bc26bb --- /dev/null +++ b/doc/headers/control/iif.hpp.html @@ -0,0 +1,19 @@ + + + control/iif.hpp + + + +
+ The control/iif.hpp header defines a macro that chooses between two alternatives. +
+

Usage

+
+ #include <boost/preprocessor/control/iif.hpp> +
+

Contents

+ + + diff --git a/doc/headers/control/while.hpp.html b/doc/headers/control/while.hpp.html new file mode 100644 index 0000000..d759749 --- /dev/null +++ b/doc/headers/control/while.hpp.html @@ -0,0 +1,20 @@ + + + control/while.hpp + + + +
+ The control/while.hpp header defines a looping contruct. +
+

Usage

+
+ #include <boost/preprocessor/control/while.hpp> +
+

Contents

+ + + diff --git a/doc/headers/debug/assert.hpp.html b/doc/headers/debug/assert.hpp.html new file mode 100644 index 0000000..b7d237b --- /dev/null +++ b/doc/headers/debug/assert.hpp.html @@ -0,0 +1,20 @@ + + + debug/assert.hpp + + + +
+ The debug/assert.hpp header defines macros for preprocessing-time assertions. +
+

Usage

+
+ #include <boost/preprocessor/debug/assert.hpp> +
+

Contents

+ + + diff --git a/doc/headers/debug/line.hpp.html b/doc/headers/debug/line.hpp.html new file mode 100644 index 0000000..eed9348 --- /dev/null +++ b/doc/headers/debug/line.hpp.html @@ -0,0 +1,19 @@ + + + debug/line.hpp + + + +
+ The debug/line.hpp header defines macros for preprocessing-time assertions. +
+

Usage

+
+ #include <boost/preprocessor/debug/line.hpp> +
+

Contents

+ + + diff --git a/doc/headers/facilities/apply.hpp.html b/doc/headers/facilities/apply.hpp.html new file mode 100644 index 0000000..f5bce67 --- /dev/null +++ b/doc/headers/facilities/apply.hpp.html @@ -0,0 +1,19 @@ + + + facilities/apply.hpp + + + +
+ The facilities/apply.hpp header defines facilities that abstract the difference between an argument and nothing. +
+

Usage

+
+ #include <boost/preprocessor/facilities/apply.hpp> +
+

Contents

+ + + diff --git a/doc/headers/facilities/empty.hpp.html b/doc/headers/facilities/empty.hpp.html new file mode 100644 index 0000000..047a855 --- /dev/null +++ b/doc/headers/facilities/empty.hpp.html @@ -0,0 +1,19 @@ + + + facilities/empty.hpp + + + +
+ The facilities/empty.hpp header defines a nullary macro that expands to nothing. +
+

Usage

+
+ #include <boost/preprocessor/facilities/empty.hpp> +
+

Contents

+ + + diff --git a/doc/headers/facilities/expand.hpp.html b/doc/headers/facilities/expand.hpp.html new file mode 100644 index 0000000..06c4ead --- /dev/null +++ b/doc/headers/facilities/expand.hpp.html @@ -0,0 +1,19 @@ + + + facilities/expand.hpp + + + +
+ The facilities/expand.hpp header defines a macro that causes double expansion. +
+

Usage

+
+ #include <boost/preprocessor/facilities/expand.hpp> +
+

Contents

+ + + diff --git a/doc/headers/facilities/identity.hpp.html b/doc/headers/facilities/identity.hpp.html new file mode 100644 index 0000000..b9b9002 --- /dev/null +++ b/doc/headers/facilities/identity.hpp.html @@ -0,0 +1,19 @@ + + + facilities/identity.hpp + + + +
+ The facilities/identity.hpp header defines a utility macro to use with BOOST_PP_IF and BOOST_PP_IIF. +
+

Usage

+
+ #include <boost/preprocessor/facilities/identity.hpp> +
+

Contents

+ + + diff --git a/doc/headers/facilities/intercept.hpp.html b/doc/headers/facilities/intercept.hpp.html new file mode 100644 index 0000000..97b66ab --- /dev/null +++ b/doc/headers/facilities/intercept.hpp.html @@ -0,0 +1,19 @@ + + + facilities/intercept.hpp + + + +
+ The facilities/intercept.hpp header defines a utility macro to intercept a numeric concatenation. +
+

Usage

+
+ #include <boost/preprocessor/facilities/intercept.hpp> +
+

Contents

+ + + diff --git a/doc/headers/iteration/iterate.hpp.html b/doc/headers/iteration/iterate.hpp.html new file mode 100644 index 0000000..0ad0695 --- /dev/null +++ b/doc/headers/iteration/iterate.hpp.html @@ -0,0 +1,32 @@ + + + iteration/iterate.hpp + + + +
+ The iteration/iterate.hpp header defines a macros to interface with the file-iteration mechanism. +
+

Usage

+
+ #include <boost/preprocessor/iteration/iterate.hpp> +
+

Contents

+ + + diff --git a/doc/headers/iteration/local.hpp.html b/doc/headers/iteration/local.hpp.html new file mode 100644 index 0000000..c514048 --- /dev/null +++ b/doc/headers/iteration/local.hpp.html @@ -0,0 +1,19 @@ + + + iteration/local.hpp + + + +
+ The iteration/local.hpp header defines a macro to interface with the local-iteration mechanism. +
+

Usage

+
+ #include <boost/preprocessor/iteration/local.hpp> +
+

Contents

+ + + diff --git a/doc/headers/iteration/self.hpp.html b/doc/headers/iteration/self.hpp.html new file mode 100644 index 0000000..a999a83 --- /dev/null +++ b/doc/headers/iteration/self.hpp.html @@ -0,0 +1,19 @@ + + + iteration/self.hpp + + + +
+ The iteration/self.hpp header defines a macro to facilitate self-inclusion. +
+

Usage

+
+ #include <boost/preprocessor/iteration/self.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/adt.hpp.html b/doc/headers/list/adt.hpp.html new file mode 100644 index 0000000..a753534 --- /dev/null +++ b/doc/headers/list/adt.hpp.html @@ -0,0 +1,24 @@ + + + list/adt.hpp + + + +
+ The list/adt.hpp header defines basic operations for manipulating lists. +
+

Usage

+
+ #include <boost/preprocessor/list/adt.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/append.hpp.html b/doc/headers/list/append.hpp.html new file mode 100644 index 0000000..a269fe7 --- /dev/null +++ b/doc/headers/list/append.hpp.html @@ -0,0 +1,20 @@ + + + list/append.hpp + + + +
+ The list/append.hpp header defines macros for appending one list to another. +
+

Usage

+
+ #include <boost/preprocessor/list/append.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/at.hpp.html b/doc/headers/list/at.hpp.html new file mode 100644 index 0000000..79f4d80 --- /dev/null +++ b/doc/headers/list/at.hpp.html @@ -0,0 +1,20 @@ + + + list/at.hpp + + + +
+ The list/at.hpp header defines macros for extracting an element from a list. +
+

Usage

+
+ #include <boost/preprocessor/list/at.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/cat.hpp.html b/doc/headers/list/cat.hpp.html new file mode 100644 index 0000000..e0303e9 --- /dev/null +++ b/doc/headers/list/cat.hpp.html @@ -0,0 +1,20 @@ + + + list/cat.hpp + + + +
+ The list/cat.hpp header defines macros for concatenating all elements in a list. +
+

Usage

+
+ #include <boost/preprocessor/list/cat.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/enum.hpp.html b/doc/headers/list/enum.hpp.html new file mode 100644 index 0000000..4b856f1 --- /dev/null +++ b/doc/headers/list/enum.hpp.html @@ -0,0 +1,20 @@ + + + list/enum.hpp + + + +
+ The list/enum.hpp header defines macros to convert a list to a comma-separated list. +
+

Usage

+
+ #include <boost/preprocessor/list/enum.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/filter.hpp.html b/doc/headers/list/filter.hpp.html new file mode 100644 index 0000000..4a412e0 --- /dev/null +++ b/doc/headers/list/filter.hpp.html @@ -0,0 +1,20 @@ + + + list/filter.hpp + + + +
+ The list/filter.hpp header defines macros to filter a list. +
+

Usage

+
+ #include <boost/preprocessor/list/filter.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/first_n.hpp.html b/doc/headers/list/first_n.hpp.html new file mode 100644 index 0000000..ffd53d8 --- /dev/null +++ b/doc/headers/list/first_n.hpp.html @@ -0,0 +1,20 @@ + + + list/first_n.hpp + + + +
+ The list/first_n.hpp header defines macros for extracting a group of elements from the beginning of a list. +
+

Usage

+
+ #include <boost/preprocessor/list/first_n.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/fold_left.hpp.html b/doc/headers/list/fold_left.hpp.html new file mode 100644 index 0000000..68ba314 --- /dev/null +++ b/doc/headers/list/fold_left.hpp.html @@ -0,0 +1,23 @@ + + + list/fold_left.hpp + + + +
+ The list/fold_left.hpp header defines folding (or accumulating) a list left-to-right. +
+

Usage

+
+ #include <boost/preprocessor/list/fold_left.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/fold_right.hpp.html b/doc/headers/list/fold_right.hpp.html new file mode 100644 index 0000000..bf5334e --- /dev/null +++ b/doc/headers/list/fold_right.hpp.html @@ -0,0 +1,23 @@ + + + list/fold_right.hpp + + + +
+ The list/fold_right.hpp header defines folding (or accumulating) a list right-to-left. +
+

Usage

+
+ #include <boost/preprocessor/list/fold_right.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/for_each.hpp.html b/doc/headers/list/for_each.hpp.html new file mode 100644 index 0000000..b469ef1 --- /dev/null +++ b/doc/headers/list/for_each.hpp.html @@ -0,0 +1,20 @@ + + + list/for_each.hpp + + + +
+ The list/for_each.hpp header defines macros to repeat a macro for each element in a list. +
+

Usage

+
+ #include <boost/preprocessor/list/for_each.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/for_each_i.hpp.html b/doc/headers/list/for_each_i.hpp.html new file mode 100644 index 0000000..936c6e5 --- /dev/null +++ b/doc/headers/list/for_each_i.hpp.html @@ -0,0 +1,20 @@ + + + list/for_each_i.hpp + + + +
+ The list/for_each_i.hpp header defines macros to repeat a macro for each element in a list. +
+

Usage

+
+ #include <boost/preprocessor/list/for_each_i.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/for_each_product.hpp.html b/doc/headers/list/for_each_product.hpp.html new file mode 100644 index 0000000..a6c5ee6 --- /dev/null +++ b/doc/headers/list/for_each_product.hpp.html @@ -0,0 +1,20 @@ + + + list/for_each_product.hpp + + + +
+ The list/for_each_product.hpp header defines macros to repeat a macro for each cartesian product of several lists. +
+

Usage

+
+ #include <boost/preprocessor/list/for_each_product.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/rest_n.hpp.html b/doc/headers/list/rest_n.hpp.html new file mode 100644 index 0000000..6580123 --- /dev/null +++ b/doc/headers/list/rest_n.hpp.html @@ -0,0 +1,20 @@ + + + list/rest_n.hpp + + + +
+ The list/rest_n.hpp header defines macros for extracting a group of elements from the end of a list. +
+

Usage

+
+ #include <boost/preprocessor/list/rest_n.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/reverse.hpp.html b/doc/headers/list/reverse.hpp.html new file mode 100644 index 0000000..f66ea64 --- /dev/null +++ b/doc/headers/list/reverse.hpp.html @@ -0,0 +1,20 @@ + + + list/reverse.hpp + + + +
+ The list/reverse.hpp header defines macros to reverse a list. +
+

Usage

+
+ #include <boost/preprocessor/list/reverse.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/size.hpp.html b/doc/headers/list/size.hpp.html new file mode 100644 index 0000000..5b6a3cd --- /dev/null +++ b/doc/headers/list/size.hpp.html @@ -0,0 +1,20 @@ + + + list/size.hpp + + + +
+ The list/size.hpp header defines macros to calculate the size of a list. +
+

Usage

+
+ #include <boost/preprocessor/list/size.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/to_tuple.hpp.html b/doc/headers/list/to_tuple.hpp.html new file mode 100644 index 0000000..3a3ba9a --- /dev/null +++ b/doc/headers/list/to_tuple.hpp.html @@ -0,0 +1,20 @@ + + + list/to_tuple.hpp + + + +
+ The list/to_tuple.hpp header defines macros to convert a list to a tuple. +
+

Usage

+
+ #include <boost/preprocessor/list/to_tuple.hpp> +
+

Contents

+ + + diff --git a/doc/headers/list/transform.hpp.html b/doc/headers/list/transform.hpp.html new file mode 100644 index 0000000..17867f3 --- /dev/null +++ b/doc/headers/list/transform.hpp.html @@ -0,0 +1,20 @@ + + + list/transform.hpp + + + +
+ The list/transform.hpp header defines macros to transform a list. +
+

Usage

+
+ #include <boost/preprocessor/list/transform.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/and.hpp.html b/doc/headers/logical/and.hpp.html new file mode 100644 index 0000000..29a86c1 --- /dev/null +++ b/doc/headers/logical/and.hpp.html @@ -0,0 +1,19 @@ + + + logical/and.hpp + + + +
+ The logical/and.hpp header defines a macro that expands to the logical AND of its operands. +
+

Usage

+
+ #include <boost/preprocessor/logical/and.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/bitand.hpp.html b/doc/headers/logical/bitand.hpp.html new file mode 100644 index 0000000..691533b --- /dev/null +++ b/doc/headers/logical/bitand.hpp.html @@ -0,0 +1,19 @@ + + + logical/bitand.hpp + + + +
+ The logical/bitand.hpp header defines a macro that expands to the bitwise AND of its operands. +
+

Usage

+
+ #include <boost/preprocessor/logical/bitand.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/bitnor.hpp.html b/doc/headers/logical/bitnor.hpp.html new file mode 100644 index 0000000..c3312c4 --- /dev/null +++ b/doc/headers/logical/bitnor.hpp.html @@ -0,0 +1,19 @@ + + + logical/bitnor.hpp + + + +
+ The logical/bitnor.hpp header defines a macro that expands to the bitwise NOR of its operands. +
+

Usage

+
+ #include <boost/preprocessor/logical/bitnor.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/bitor.hpp.html b/doc/headers/logical/bitor.hpp.html new file mode 100644 index 0000000..299f01a --- /dev/null +++ b/doc/headers/logical/bitor.hpp.html @@ -0,0 +1,19 @@ + + + logical/bitor.hpp + + + +
+ The logical/bitor.hpp header defines a macro that expands to the bitwise OR of its operands. +
+

Usage

+
+ #include <boost/preprocessor/logical/bitor.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/bitxor.hpp.html b/doc/headers/logical/bitxor.hpp.html new file mode 100644 index 0000000..862c0f3 --- /dev/null +++ b/doc/headers/logical/bitxor.hpp.html @@ -0,0 +1,19 @@ + + + logical/bitxor.hpp + + + +
+ The logical/bitxor.hpp header defines a macro that expands to the bitwise XOR of its operands. +
+

Usage

+
+ #include <boost/preprocessor/logical/bitxor.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/bool.hpp.html b/doc/headers/logical/bool.hpp.html new file mode 100644 index 0000000..724d0c4 --- /dev/null +++ b/doc/headers/logical/bool.hpp.html @@ -0,0 +1,19 @@ + + + logical/bool.hpp + + + +
+ The logical/bool.hpp header defines a macro that performs a boolean conversion on its operand. +
+

Usage

+
+ #include <boost/preprocessor/logical/bool.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/compl.hpp.html b/doc/headers/logical/compl.hpp.html new file mode 100644 index 0000000..519ada3 --- /dev/null +++ b/doc/headers/logical/compl.hpp.html @@ -0,0 +1,19 @@ + + + logical/compl.hpp + + + +
+ The logical/compl.hpp header defines a macro that performs a bitwise inversion on its operand. +
+

Usage

+
+ #include <boost/preprocessor/logical/compl.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/nor.hpp.html b/doc/headers/logical/nor.hpp.html new file mode 100644 index 0000000..25dc873 --- /dev/null +++ b/doc/headers/logical/nor.hpp.html @@ -0,0 +1,19 @@ + + + logical/nor.hpp + + + +
+ The logical/nor.hpp header defines a macro that expands to the logical NOR of its operands. +
+

Usage

+
+ #include <boost/preprocessor/logical/nor.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/not.hpp.html b/doc/headers/logical/not.hpp.html new file mode 100644 index 0000000..44c2f34 --- /dev/null +++ b/doc/headers/logical/not.hpp.html @@ -0,0 +1,19 @@ + + + logical/not.hpp + + + +
+ The logical/not.hpp header defines a macro that performs a logical NOT on its operand. +
+

Usage

+
+ #include <boost/preprocessor/logical/not.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/or.hpp.html b/doc/headers/logical/or.hpp.html new file mode 100644 index 0000000..57e8787 --- /dev/null +++ b/doc/headers/logical/or.hpp.html @@ -0,0 +1,19 @@ + + + logical/or.hpp + + + +
+ The logical/or.hpp header defines a macro that expands to the logical OR of its operands. +
+

Usage

+
+ #include <boost/preprocessor/logical/or.hpp> +
+

Contents

+ + + diff --git a/doc/headers/logical/xor.hpp.html b/doc/headers/logical/xor.hpp.html new file mode 100644 index 0000000..e4dec9d --- /dev/null +++ b/doc/headers/logical/xor.hpp.html @@ -0,0 +1,19 @@ + + + logical/xor.hpp + + + +
+ The logical/xor.hpp header defines a macro that expands to the logical XOR of its operands. +
+

Usage

+
+ #include <boost/preprocessor/logical/xor.hpp> +
+

Contents

+ + + diff --git a/doc/headers/punctuation/comma.hpp.html b/doc/headers/punctuation/comma.hpp.html new file mode 100644 index 0000000..dbb9621 --- /dev/null +++ b/doc/headers/punctuation/comma.hpp.html @@ -0,0 +1,19 @@ + + + punctuation/comma.hpp + + + +
+ The punctuation/comma.hpp header defines a macro that expands to a comma. +
+

Usage

+
+ #include <boost/preprocessor/punctuation/comma.hpp> +
+

Contents

+ + + diff --git a/doc/headers/punctuation/comma_if.hpp.html b/doc/headers/punctuation/comma_if.hpp.html new file mode 100644 index 0000000..2a48a8c --- /dev/null +++ b/doc/headers/punctuation/comma_if.hpp.html @@ -0,0 +1,19 @@ + + + punctuation/comma_if.hpp + + + +
+ The punctuation/comma_if.hpp header defines a macro that conditionally expands to a comma. +
+

Usage

+
+ #include <boost/preprocessor/punctuation/comma_if.hpp> +
+

Contents

+ + + diff --git a/doc/headers/punctuation/paren.hpp.html b/doc/headers/punctuation/paren.hpp.html new file mode 100644 index 0000000..afdc43e --- /dev/null +++ b/doc/headers/punctuation/paren.hpp.html @@ -0,0 +1,20 @@ + + + punctuation/paren.hpp + + + +
+ The punctuation/paren.hpp header defines macros that expand to left and right parentheses. +
+

Usage

+
+ #include <boost/preprocessor/punctuation/paren.hpp> +
+

Contents

+ + + diff --git a/doc/headers/punctuation/paren_if.hpp.html b/doc/headers/punctuation/paren_if.hpp.html new file mode 100644 index 0000000..a6d3f8b --- /dev/null +++ b/doc/headers/punctuation/paren_if.hpp.html @@ -0,0 +1,20 @@ + + + punctuation/paren_if.hpp + + + +
+ The punctuation/paren_if.hpp header defines macros that conditionally expand to left and right parentheses. +
+

Usage

+
+ #include <boost/preprocessor/punctuation/paren_if.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/deduce_r.hpp.html b/doc/headers/repetition/deduce_r.hpp.html new file mode 100644 index 0000000..6ac7de8 --- /dev/null +++ b/doc/headers/repetition/deduce_r.hpp.html @@ -0,0 +1,19 @@ + + + control/deduce_r.hpp + + + +
+ The repetition/deduce_r.hpp header defines a macro to manually deduce the current state of the BOOST_PP_FOR construct. +
+

Usage

+
+ #include <boost/preprocessor/repetition/deduce_r.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/deduce_z.hpp.html b/doc/headers/repetition/deduce_z.hpp.html new file mode 100644 index 0000000..0bc9ffd --- /dev/null +++ b/doc/headers/repetition/deduce_z.hpp.html @@ -0,0 +1,19 @@ + + + control/deduce_z.hpp + + + +
+ The repetition/deduce_z.hpp header defines a macro to manually deduce the current state of the BOOST_PP_REPEAT construct. +
+

Usage

+
+ #include <boost/preprocessor/repetition/deduce_z.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum.hpp.html b/doc/headers/repetition/enum.hpp.html new file mode 100644 index 0000000..c2ea4e7 --- /dev/null +++ b/doc/headers/repetition/enum.hpp.html @@ -0,0 +1,20 @@ + + + repetition/enum.hpp + + + +
+ The repetition/enum.hpp header defines a construct that produces a comma-separated list. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_binary_params.hpp.html b/doc/headers/repetition/enum_binary_params.hpp.html new file mode 100644 index 0000000..9fe4677 --- /dev/null +++ b/doc/headers/repetition/enum_binary_params.hpp.html @@ -0,0 +1,20 @@ + + + repetition/enum_binary_params.hpp + + + +
+ The repetition/enum_binary_params.hpp header defines a construct that produces a comma-separated list of binary parameters. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_binary_params.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_params.hpp.html b/doc/headers/repetition/enum_params.hpp.html new file mode 100644 index 0000000..f62c4e2 --- /dev/null +++ b/doc/headers/repetition/enum_params.hpp.html @@ -0,0 +1,20 @@ + + + repetition/enum_params.hpp + + + +
+ The repetition/enum_params.hpp header defines a construct that produces a comma-separated list of parameters. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_params.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_params_with_a_default.hpp.html b/doc/headers/repetition/enum_params_with_a_default.hpp.html new file mode 100644 index 0000000..ebf8410 --- /dev/null +++ b/doc/headers/repetition/enum_params_with_a_default.hpp.html @@ -0,0 +1,19 @@ + + + repetition/enum_params_with_a_default.hpp + + + +
+ The repetition/enum_params_with_a_default.hpp header defines a construct that produces a comma-separated list of parameters with a default argument. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_params_with_defaults.hpp.html b/doc/headers/repetition/enum_params_with_defaults.hpp.html new file mode 100644 index 0000000..07c741b --- /dev/null +++ b/doc/headers/repetition/enum_params_with_defaults.hpp.html @@ -0,0 +1,19 @@ + + + repetition/enum_params_with_defaults.hpp + + + +
+ The repetition/enum_params_with_defaults.hpp header defines a construct that produces a comma-separated list of parameters with default arguments. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_params_with_defaults.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_shifted.hpp.html b/doc/headers/repetition/enum_shifted.hpp.html new file mode 100644 index 0000000..29de802 --- /dev/null +++ b/doc/headers/repetition/enum_shifted.hpp.html @@ -0,0 +1,20 @@ + + + repetition/enum_shifted.hpp + + + +
+ The repetition/enum_shifted.hpp header defines a construct that produces a comma-separated, shifted list. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_shifted.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_shifted_params.hpp.html b/doc/headers/repetition/enum_shifted_params.hpp.html new file mode 100644 index 0000000..25abbf6 --- /dev/null +++ b/doc/headers/repetition/enum_shifted_params.hpp.html @@ -0,0 +1,20 @@ + + + repetition/enum_shifted_params.hpp + + + +
+ The repetition/enum_shifted_params.hpp header defines a construct that produces a comma-separated list of parameters. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_shifted_params.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_trailing.hpp.html b/doc/headers/repetition/enum_trailing.hpp.html new file mode 100644 index 0000000..616e4ad --- /dev/null +++ b/doc/headers/repetition/enum_trailing.hpp.html @@ -0,0 +1,20 @@ + + + repetition/enum_trailing.hpp + + + +
+ The repetition/enum_trailing.hpp header defines a construct that produces a comma-separated list with a leading comma. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_trailing.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_trailing_binary_params.hpp.html b/doc/headers/repetition/enum_trailing_binary_params.hpp.html new file mode 100644 index 0000000..a640f91 --- /dev/null +++ b/doc/headers/repetition/enum_trailing_binary_params.hpp.html @@ -0,0 +1,20 @@ + + + repetition/enum_trailing_binary_params.hpp + + + +
+ The repetition/enum_trailing_binary_params.hpp header defines a construct that produces a comma-separated list of binary parameters with a leading comma. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/enum_trailing_params.hpp.html b/doc/headers/repetition/enum_trailing_params.hpp.html new file mode 100644 index 0000000..73b75b0 --- /dev/null +++ b/doc/headers/repetition/enum_trailing_params.hpp.html @@ -0,0 +1,20 @@ + + + repetition/enum_trailing_params.hpp + + + +
+ The repetition/enum_trailing_params.hpp header defines a construct that produces a comma-separated list of parameters with a leading comma. +
+

Usage

+
+ #include <boost/preprocessor/repetition/enum_trailing_params.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/for.hpp.html b/doc/headers/repetition/for.hpp.html new file mode 100644 index 0000000..69e56fe --- /dev/null +++ b/doc/headers/repetition/for.hpp.html @@ -0,0 +1,20 @@ + + + repetition/for.hpp + + + +
+ The repetition/for.hpp header defines a generalized horizontal repetition construct. +
+

Usage

+
+ #include <boost/preprocessor/repetition/for.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/repeat.hpp.html b/doc/headers/repetition/repeat.hpp.html new file mode 100644 index 0000000..7eb16ac --- /dev/null +++ b/doc/headers/repetition/repeat.hpp.html @@ -0,0 +1,23 @@ + + + repetition/repeat.hpp + + + +
+ The repetition/repeat.hpp header defines a fast horizontal repetition construct. +
+

Usage

+
+ #include <boost/preprocessor/repetition/repeat.hpp> +
+

Contents

+ + + diff --git a/doc/headers/repetition/repeat_from_to.hpp.html b/doc/headers/repetition/repeat_from_to.hpp.html new file mode 100644 index 0000000..51c6c50 --- /dev/null +++ b/doc/headers/repetition/repeat_from_to.hpp.html @@ -0,0 +1,25 @@ + + + repetition/repeat_from_to.hpp + + + +
+ The repetition/repeat_from_to.hpp header defines a horizontal repetition construct. +
+

Usage

+
+ #include <boost/preprocessor/repetition/repeat_from_to.hpp> +
+

Contents

+ + + diff --git a/doc/headers/selection/max.hpp.html b/doc/headers/selection/max.hpp.html new file mode 100644 index 0000000..e73fa7c --- /dev/null +++ b/doc/headers/selection/max.hpp.html @@ -0,0 +1,20 @@ + + + selection/max.hpp + + + +
+ The selection/max.hpp header defines a macro that returns the greater of two elements. +
+

Usage

+
+ #include <boost/preprocessor/selection/max.hpp> +
+

Contents

+ + + diff --git a/doc/headers/selection/min.hpp.html b/doc/headers/selection/min.hpp.html new file mode 100644 index 0000000..e4dcf53 --- /dev/null +++ b/doc/headers/selection/min.hpp.html @@ -0,0 +1,20 @@ + + + selection/min.hpp + + + +
+ The selection/min.hpp header defines a macro that returns the lesser of two elements. +
+

Usage

+
+ #include <boost/preprocessor/selection/min.hpp> +
+

Contents

+ + + diff --git a/doc/headers/slot/slot.hpp.html b/doc/headers/slot/slot.hpp.html new file mode 100644 index 0000000..724732d --- /dev/null +++ b/doc/headers/slot/slot.hpp.html @@ -0,0 +1,20 @@ + + + slot/slot.hpp + + + +
+ The slot/slot.hpp header defines macros to manipulate slots. +
+

Usage

+
+ #include <boost/preprocessor/slot/slot.hpp> +
+

Contents

+ + + diff --git a/doc/headers/tuple/eat.hpp.html b/doc/headers/tuple/eat.hpp.html new file mode 100644 index 0000000..e94cef7 --- /dev/null +++ b/doc/headers/tuple/eat.hpp.html @@ -0,0 +1,19 @@ + + + tuple/eat.hpp + + + +
+ The tuple/eat.hpp header defines a macro eats a tuple. +
+

Usage

+
+ #include <boost/preprocessor/tuple/eat.hpp> +
+

Contents

+ + + diff --git a/doc/headers/tuple/elem.hpp.html b/doc/headers/tuple/elem.hpp.html new file mode 100644 index 0000000..b28f174 --- /dev/null +++ b/doc/headers/tuple/elem.hpp.html @@ -0,0 +1,19 @@ + + + tuple/elem.hpp + + + +
+ The tuple/elem.hpp header defines a macro to extract elements from a tuple. +
+

Usage

+
+ #include <boost/preprocessor/tuple/elem.hpp> +
+

Contents

+ + + diff --git a/doc/headers/tuple/rem.hpp.html b/doc/headers/tuple/rem.hpp.html new file mode 100644 index 0000000..996dd0f --- /dev/null +++ b/doc/headers/tuple/rem.hpp.html @@ -0,0 +1,19 @@ + + + tuple/rem.hpp + + + +
+ The tuple/rem.hpp header defines a macro that removes the parentheses from a tuple. +
+

Usage

+
+ #include <boost/preprocessor/tuple/rem.hpp> +
+

Contents

+ + + diff --git a/doc/headers/tuple/reverse.hpp.html b/doc/headers/tuple/reverse.hpp.html new file mode 100644 index 0000000..6a533b0 --- /dev/null +++ b/doc/headers/tuple/reverse.hpp.html @@ -0,0 +1,19 @@ + + + tuple/reverse.hpp + + + +
+ The tuple/reverse.hpp header defines a macro that reverses a tuple. +
+

Usage

+
+ #include <boost/preprocessor/tuple/reverse.hpp> +
+

Contents

+ + + diff --git a/doc/headers/tuple/to_list.hpp.html b/doc/headers/tuple/to_list.hpp.html new file mode 100644 index 0000000..c5507c6 --- /dev/null +++ b/doc/headers/tuple/to_list.hpp.html @@ -0,0 +1,19 @@ + + + tuple/to_list.hpp + + + +
+ The tuple/to_list.hpp header defines a macro that converts a tuple to a list. +
+

Usage

+
+ #include <boost/preprocessor/tuple/to_list.hpp> +
+

Contents

+ + + diff --git a/doc/top.html b/doc/top.html index e061a5b..408da5b 100644 --- a/doc/top.html +++ b/doc/top.html @@ -18,7 +18,7 @@ diff --git a/test/iteration.h b/test/iteration.h new file mode 100644 index 0000000..072ab7e --- /dev/null +++ b/test/iteration.h @@ -0,0 +1,61 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, * +# * modify, sell, and distribute this software is granted provided * +# * this copyright notice appears in all copies. This software is * +# * provided "as is" without express or implied warranty, and with * +# * no claim at to its suitability for any purpose. * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if !BOOST_PP_IS_ITERATING +# +# include +# include +# include +# +# define NO_FLAGS +# +# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, )) +# include BOOST_PP_ITERATE() +# +# undef NO_FLAGS +# +# define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, , 0x0001)) +# include BOOST_PP_ITERATE() +# +# define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, , 0x0002)) +# include BOOST_PP_ITERATE() +# +# elif defined NO_FLAGS + +struct BOOST_PP_CAT(X, BOOST_PP_ITERATION()) { + BEGIN + BOOST_PP_ITERATION() >= BOOST_PP_ITERATION_START() && + BOOST_PP_ITERATION() <= BOOST_PP_ITERATION_FINISH() + END +}; + +# elif BOOST_PP_ITERATION_DEPTH() == 1 \ + && BOOST_PP_ITERATION_FLAGS() == 0x0001 + +struct BOOST_PP_CAT(Y, BOOST_PP_ITERATION()) { }; + +# elif BOOST_PP_ITERATION_DEPTH() == 1 \ + && BOOST_PP_ITERATION_FLAGS() == 0x0002 + +# define BOOST_PP_ITERATION_PARAMS_2 (3, (1, BOOST_PP_ITERATION(), )) +# include BOOST_PP_ITERATE() + +# elif BOOST_PP_ITERATION_DEPTH() == 2 \ + && BOOST_PP_FRAME_FLAGS(1) == 0x0002 + +struct BOOST_PP_CAT(Z, BOOST_PP_CAT(BOOST_PP_ITERATION(), BOOST_PP_RELATIVE_ITERATION(1))) { }; + +# else +# +# error should not get here! +# +# endif diff --git a/test/test.h b/test/test.h new file mode 100644 index 0000000..71bb657 --- /dev/null +++ b/test/test.h @@ -0,0 +1,33 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Permission to copy, use, modify, sell and distribute this software is +# * granted provided this copyright notice appears in all copies. This +# * software is provided "as is" without express or implied warranty, and +# * with no claim as to its suitability for any purpose. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_LIBS_PREPROCESSOR_REGRESSION_TEST_H +# define BOOST_LIBS_PREPROCESSOR_REGRESSION_TEST_H +# +# include +# +# define BEGIN typedef int BOOST_PP_CAT(test_, __LINE__)[(( +# define END )==1) ? 1 : -1]; + +#include + +namespace std { } +using namespace std; + +int main(void) { + printf("pass " __TIME__); + return 0; +} + +# endif
- The Boost Library
+ The Boost Library
Preprocessor Subset for C/C++