diff --git a/docs.1/data/arrays.html b/docs.1/data/arrays.html new file mode 100644 index 0000000..91f1ddc --- /dev/null +++ b/docs.1/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 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 new file mode 100644 index 0000000..3f0fabb --- /dev/null +++ b/docs.1/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/docs.1/data/tuples.html b/docs.1/data/tuples.html new file mode 100644 index 0000000..ca01b2e --- /dev/null +++ b/docs.1/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/docs.1/headers/arithmetic.hpp.html b/docs.1/headers/arithmetic.hpp.html new file mode 100644 index 0000000..29a8bfd --- /dev/null +++ b/docs.1/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/docs.1/headers/arithmetic/add.hpp.html b/docs.1/headers/arithmetic/add.hpp.html new file mode 100644 index 0000000..c9fb843 --- /dev/null +++ b/docs.1/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/docs.1/headers/arithmetic/dec.hpp.html b/docs.1/headers/arithmetic/dec.hpp.html new file mode 100644 index 0000000..2e06a7f --- /dev/null +++ b/docs.1/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/docs.1/headers/arithmetic/div.hpp.html b/docs.1/headers/arithmetic/div.hpp.html new file mode 100644 index 0000000..63fa1b3 --- /dev/null +++ b/docs.1/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/docs.1/headers/arithmetic/inc.hpp.html b/docs.1/headers/arithmetic/inc.hpp.html new file mode 100644 index 0000000..e0208ca --- /dev/null +++ b/docs.1/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/docs.1/headers/arithmetic/mod.hpp.html b/docs.1/headers/arithmetic/mod.hpp.html new file mode 100644 index 0000000..4d7fec4 --- /dev/null +++ b/docs.1/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/docs.1/headers/arithmetic/mul.hpp.html b/docs.1/headers/arithmetic/mul.hpp.html new file mode 100644 index 0000000..04adf09 --- /dev/null +++ b/docs.1/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/docs.1/headers/arithmetic/sub.hpp.html b/docs.1/headers/arithmetic/sub.hpp.html new file mode 100644 index 0000000..3633bde --- /dev/null +++ b/docs.1/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/docs.1/headers/array.hpp.html b/docs.1/headers/array.hpp.html new file mode 100644 index 0000000..11f5c6b --- /dev/null +++ b/docs.1/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/docs.1/headers/array/data.hpp.html b/docs.1/headers/array/data.hpp.html new file mode 100644 index 0000000..9729172 --- /dev/null +++ b/docs.1/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/docs.1/headers/array/elem.hpp.html b/docs.1/headers/array/elem.hpp.html new file mode 100644 index 0000000..606219c --- /dev/null +++ b/docs.1/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/docs.1/headers/array/size.hpp.html b/docs.1/headers/array/size.hpp.html new file mode 100644 index 0000000..f1a7895 --- /dev/null +++ b/docs.1/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/docs.1/headers/cat.hpp.html b/docs.1/headers/cat.hpp.html new file mode 100644 index 0000000..55be6d1 --- /dev/null +++ b/docs.1/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/docs.1/headers/comparison.hpp.html b/docs.1/headers/comparison.hpp.html new file mode 100644 index 0000000..066f290 --- /dev/null +++ b/docs.1/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/docs.1/headers/comparison/equal.hpp.html b/docs.1/headers/comparison/equal.hpp.html new file mode 100644 index 0000000..15123ca --- /dev/null +++ b/docs.1/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/docs.1/headers/comparison/greater.hpp.html b/docs.1/headers/comparison/greater.hpp.html new file mode 100644 index 0000000..f242edd --- /dev/null +++ b/docs.1/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/docs.1/headers/comparison/greater_equal.hpp.html b/docs.1/headers/comparison/greater_equal.hpp.html new file mode 100644 index 0000000..e4e76d5 --- /dev/null +++ b/docs.1/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/docs.1/headers/comparison/less.hpp.html b/docs.1/headers/comparison/less.hpp.html new file mode 100644 index 0000000..20288c8 --- /dev/null +++ b/docs.1/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/docs.1/headers/comparison/less_equal.hpp.html b/docs.1/headers/comparison/less_equal.hpp.html new file mode 100644 index 0000000..7809706 --- /dev/null +++ b/docs.1/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/docs.1/headers/comparison/not_equal.hpp.html b/docs.1/headers/comparison/not_equal.hpp.html new file mode 100644 index 0000000..2ddf2a6 --- /dev/null +++ b/docs.1/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/docs.1/headers/config/limits.hpp.html b/docs.1/headers/config/limits.hpp.html new file mode 100644 index 0000000..314e2cf --- /dev/null +++ b/docs.1/headers/config/limits.hpp.html @@ -0,0 +1,29 @@ + + + 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 new file mode 100644 index 0000000..e2f941b --- /dev/null +++ b/docs.1/headers/control.hpp.html @@ -0,0 +1,23 @@ + + + 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/debug.hpp.html b/docs.1/headers/debug.hpp.html new file mode 100644 index 0000000..3acc7b4 --- /dev/null +++ b/docs.1/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/docs.1/headers/debug/assert.hpp.html b/docs.1/headers/debug/assert.hpp.html new file mode 100644 index 0000000..b7d237b --- /dev/null +++ b/docs.1/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/docs.1/headers/debug/line.hpp.html b/docs.1/headers/debug/line.hpp.html new file mode 100644 index 0000000..eed9348 --- /dev/null +++ b/docs.1/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/docs.1/headers/facilities.hpp.html b/docs.1/headers/facilities.hpp.html new file mode 100644 index 0000000..0add972 --- /dev/null +++ b/docs.1/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/docs.1/headers/facilities/apply.hpp.html b/docs.1/headers/facilities/apply.hpp.html new file mode 100644 index 0000000..f5bce67 --- /dev/null +++ b/docs.1/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/docs.1/headers/facilities/empty.hpp.html b/docs.1/headers/facilities/empty.hpp.html new file mode 100644 index 0000000..047a855 --- /dev/null +++ b/docs.1/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/docs.1/headers/facilities/expand.hpp.html b/docs.1/headers/facilities/expand.hpp.html new file mode 100644 index 0000000..06c4ead --- /dev/null +++ b/docs.1/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/docs.1/headers/facilities/identity.hpp.html b/docs.1/headers/facilities/identity.hpp.html new file mode 100644 index 0000000..b9b9002 --- /dev/null +++ b/docs.1/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/docs.1/headers/facilities/intercept.hpp.html b/docs.1/headers/facilities/intercept.hpp.html new file mode 100644 index 0000000..97b66ab --- /dev/null +++ b/docs.1/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/docs.1/headers/iteration.hpp.html b/docs.1/headers/iteration.hpp.html new file mode 100644 index 0000000..9f394e2 --- /dev/null +++ b/docs.1/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/docs.1/headers/iteration/iterate.hpp.html b/docs.1/headers/iteration/iterate.hpp.html new file mode 100644 index 0000000..0ad0695 --- /dev/null +++ b/docs.1/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/docs.1/headers/iteration/local.hpp.html b/docs.1/headers/iteration/local.hpp.html new file mode 100644 index 0000000..c514048 --- /dev/null +++ b/docs.1/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/docs.1/headers/iteration/self.hpp.html b/docs.1/headers/iteration/self.hpp.html new file mode 100644 index 0000000..a999a83 --- /dev/null +++ b/docs.1/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/docs.1/headers/library.hpp.html b/docs.1/headers/library.hpp.html new file mode 100644 index 0000000..7b3e955 --- /dev/null +++ b/docs.1/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/docs.1/headers/list.hpp.html b/docs.1/headers/list.hpp.html new file mode 100644 index 0000000..0583bcf --- /dev/null +++ b/docs.1/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/docs.1/headers/list/adt.hpp.html b/docs.1/headers/list/adt.hpp.html new file mode 100644 index 0000000..a753534 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/append.hpp.html b/docs.1/headers/list/append.hpp.html new file mode 100644 index 0000000..a269fe7 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/at.hpp.html b/docs.1/headers/list/at.hpp.html new file mode 100644 index 0000000..79f4d80 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/cat.hpp.html b/docs.1/headers/list/cat.hpp.html new file mode 100644 index 0000000..e0303e9 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/enum.hpp.html b/docs.1/headers/list/enum.hpp.html new file mode 100644 index 0000000..4b856f1 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/filter.hpp.html b/docs.1/headers/list/filter.hpp.html new file mode 100644 index 0000000..4a412e0 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/first_n.hpp.html b/docs.1/headers/list/first_n.hpp.html new file mode 100644 index 0000000..ffd53d8 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/fold_left.hpp.html b/docs.1/headers/list/fold_left.hpp.html new file mode 100644 index 0000000..68ba314 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/fold_right.hpp.html b/docs.1/headers/list/fold_right.hpp.html new file mode 100644 index 0000000..bf5334e --- /dev/null +++ b/docs.1/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/docs.1/headers/list/for_each.hpp.html b/docs.1/headers/list/for_each.hpp.html new file mode 100644 index 0000000..b469ef1 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/for_each_i.hpp.html b/docs.1/headers/list/for_each_i.hpp.html new file mode 100644 index 0000000..936c6e5 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/for_each_product.hpp.html b/docs.1/headers/list/for_each_product.hpp.html new file mode 100644 index 0000000..a6c5ee6 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/rest_n.hpp.html b/docs.1/headers/list/rest_n.hpp.html new file mode 100644 index 0000000..6580123 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/reverse.hpp.html b/docs.1/headers/list/reverse.hpp.html new file mode 100644 index 0000000..f66ea64 --- /dev/null +++ b/docs.1/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/docs.1/headers/list/size.hpp.html b/docs.1/headers/list/size.hpp.html new file mode 100644 index 0000000..5b6a3cd --- /dev/null +++ b/docs.1/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/docs.1/headers/list/to_tuple.hpp.html b/docs.1/headers/list/to_tuple.hpp.html new file mode 100644 index 0000000..3a3ba9a --- /dev/null +++ b/docs.1/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/docs.1/headers/list/transform.hpp.html b/docs.1/headers/list/transform.hpp.html new file mode 100644 index 0000000..17867f3 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical.hpp.html b/docs.1/headers/logical.hpp.html new file mode 100644 index 0000000..c347646 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/and.hpp.html b/docs.1/headers/logical/and.hpp.html new file mode 100644 index 0000000..29a86c1 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/bitand.hpp.html b/docs.1/headers/logical/bitand.hpp.html new file mode 100644 index 0000000..691533b --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/bitnor.hpp.html b/docs.1/headers/logical/bitnor.hpp.html new file mode 100644 index 0000000..c3312c4 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/bitor.hpp.html b/docs.1/headers/logical/bitor.hpp.html new file mode 100644 index 0000000..299f01a --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/bitxor.hpp.html b/docs.1/headers/logical/bitxor.hpp.html new file mode 100644 index 0000000..862c0f3 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/bool.hpp.html b/docs.1/headers/logical/bool.hpp.html new file mode 100644 index 0000000..724d0c4 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/compl.hpp.html b/docs.1/headers/logical/compl.hpp.html new file mode 100644 index 0000000..519ada3 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/nor.hpp.html b/docs.1/headers/logical/nor.hpp.html new file mode 100644 index 0000000..25dc873 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/not.hpp.html b/docs.1/headers/logical/not.hpp.html new file mode 100644 index 0000000..44c2f34 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/or.hpp.html b/docs.1/headers/logical/or.hpp.html new file mode 100644 index 0000000..57e8787 --- /dev/null +++ b/docs.1/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/docs.1/headers/logical/xor.hpp.html b/docs.1/headers/logical/xor.hpp.html new file mode 100644 index 0000000..e4dec9d --- /dev/null +++ b/docs.1/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/docs.1/headers/preprocessor.hpp.html b/docs.1/headers/preprocessor.hpp.html new file mode 100644 index 0000000..b63c449 --- /dev/null +++ b/docs.1/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/docs.1/headers/punctuation.hpp.html b/docs.1/headers/punctuation.hpp.html new file mode 100644 index 0000000..b05d7e7 --- /dev/null +++ b/docs.1/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/docs.1/headers/punctuation/comma.hpp.html b/docs.1/headers/punctuation/comma.hpp.html new file mode 100644 index 0000000..dbb9621 --- /dev/null +++ b/docs.1/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/docs.1/headers/punctuation/comma_if.hpp.html b/docs.1/headers/punctuation/comma_if.hpp.html new file mode 100644 index 0000000..2a48a8c --- /dev/null +++ b/docs.1/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/docs.1/headers/punctuation/paren.hpp.html b/docs.1/headers/punctuation/paren.hpp.html new file mode 100644 index 0000000..afdc43e --- /dev/null +++ b/docs.1/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/docs.1/headers/punctuation/paren_if.hpp.html b/docs.1/headers/punctuation/paren_if.hpp.html new file mode 100644 index 0000000..a6d3f8b --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition.hpp.html b/docs.1/headers/repetition.hpp.html new file mode 100644 index 0000000..d4ddbcc --- /dev/null +++ b/docs.1/headers/repetition.hpp.html @@ -0,0 +1,28 @@ + + + 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 new file mode 100644 index 0000000..c2ea4e7 --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/enum_binary_params.hpp.html b/docs.1/headers/repetition/enum_binary_params.hpp.html new file mode 100644 index 0000000..756651a --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/enum_params.hpp.html b/docs.1/headers/repetition/enum_params.hpp.html new file mode 100644 index 0000000..fd8e1b9 --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/enum_params_with_a_default.hpp.html b/docs.1/headers/repetition/enum_params_with_a_default.hpp.html new file mode 100644 index 0000000..ebf8410 --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/enum_params_with_defaults.hpp.html b/docs.1/headers/repetition/enum_params_with_defaults.hpp.html new file mode 100644 index 0000000..07c741b --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/enum_shifted.hpp.html b/docs.1/headers/repetition/enum_shifted.hpp.html new file mode 100644 index 0000000..29de802 --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/enum_shifted_params.hpp.html b/docs.1/headers/repetition/enum_shifted_params.hpp.html new file mode 100644 index 0000000..25abbf6 --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/for.hpp.html b/docs.1/headers/repetition/for.hpp.html new file mode 100644 index 0000000..69e56fe --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/repeat.hpp.html b/docs.1/headers/repetition/repeat.hpp.html new file mode 100644 index 0000000..7eb16ac --- /dev/null +++ b/docs.1/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/docs.1/headers/repetition/repeat_from_to.hpp.html b/docs.1/headers/repetition/repeat_from_to.hpp.html new file mode 100644 index 0000000..34e3462 --- /dev/null +++ b/docs.1/headers/repetition/repeat_from_to.hpp.html @@ -0,0 +1,23 @@ + + + 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 new file mode 100644 index 0000000..6b61935 --- /dev/null +++ b/docs.1/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/docs.1/headers/selection/max.hpp.html b/docs.1/headers/selection/max.hpp.html new file mode 100644 index 0000000..e73fa7c --- /dev/null +++ b/docs.1/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/docs.1/headers/selection/min.hpp.html b/docs.1/headers/selection/min.hpp.html new file mode 100644 index 0000000..e4dcf53 --- /dev/null +++ b/docs.1/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/docs.1/headers/slot.hpp.html b/docs.1/headers/slot.hpp.html new file mode 100644 index 0000000..4e13c7b --- /dev/null +++ b/docs.1/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/docs.1/headers/slot/slot.hpp.html b/docs.1/headers/slot/slot.hpp.html new file mode 100644 index 0000000..724732d --- /dev/null +++ b/docs.1/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/docs.1/headers/stringize.hpp.html b/docs.1/headers/stringize.hpp.html new file mode 100644 index 0000000..2945d06 --- /dev/null +++ b/docs.1/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/docs.1/headers/tuple.hpp.html b/docs.1/headers/tuple.hpp.html new file mode 100644 index 0000000..2926b21 --- /dev/null +++ b/docs.1/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/docs.1/headers/tuple/eat.hpp.html b/docs.1/headers/tuple/eat.hpp.html new file mode 100644 index 0000000..e94cef7 --- /dev/null +++ b/docs.1/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/docs.1/headers/tuple/elem.hpp.html b/docs.1/headers/tuple/elem.hpp.html new file mode 100644 index 0000000..b28f174 --- /dev/null +++ b/docs.1/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/docs.1/headers/tuple/rem.hpp.html b/docs.1/headers/tuple/rem.hpp.html new file mode 100644 index 0000000..996dd0f --- /dev/null +++ b/docs.1/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/docs.1/headers/tuple/reverse.hpp.html b/docs.1/headers/tuple/reverse.hpp.html new file mode 100644 index 0000000..6a533b0 --- /dev/null +++ b/docs.1/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/docs.1/headers/tuple/to_list.hpp.html b/docs.1/headers/tuple/to_list.hpp.html new file mode 100644 index 0000000..c5507c6 --- /dev/null +++ b/docs.1/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/docs.1/ref/add.html b/docs.1/ref/add.html new file mode 100644 index 0000000..0664a82 --- /dev/null +++ b/docs.1/ref/add.html @@ -0,0 +1,58 @@ + + + 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 new file mode 100644 index 0000000..d6d35a5 --- /dev/null +++ b/docs.1/ref/add_d.html @@ -0,0 +1,80 @@ + + + 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 new file mode 100644 index 0000000..e46f496 --- /dev/null +++ b/docs.1/ref/and.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..68a9c94 --- /dev/null +++ b/docs.1/ref/apply.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..3870ceb --- /dev/null +++ b/docs.1/ref/array_data.html @@ -0,0 +1,39 @@ + + + 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 new file mode 100644 index 0000000..d1e54a4 --- /dev/null +++ b/docs.1/ref/array_elem.html @@ -0,0 +1,41 @@ + + + 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 new file mode 100644 index 0000000..03c5db7 --- /dev/null +++ b/docs.1/ref/array_size.html @@ -0,0 +1,35 @@ + + + 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 new file mode 100644 index 0000000..9c8ebe4 --- /dev/null +++ b/docs.1/ref/assert.html @@ -0,0 +1,96 @@ + + + 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 new file mode 100644 index 0000000..30953a1 --- /dev/null +++ b/docs.1/ref/assert_msg.html @@ -0,0 +1,56 @@ + + + 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 new file mode 100644 index 0000000..0a05d64 --- /dev/null +++ b/docs.1/ref/assign_slot.html @@ -0,0 +1,51 @@ + + + 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 new file mode 100644 index 0000000..e442e2f --- /dev/null +++ b/docs.1/ref/bitand.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..7ec2f41 --- /dev/null +++ b/docs.1/ref/bitnor.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..954cb7b --- /dev/null +++ b/docs.1/ref/bitor.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..cb0f512 --- /dev/null +++ b/docs.1/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

+
+ 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 new file mode 100644 index 0000000..859767a --- /dev/null +++ b/docs.1/ref/bool.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..172d46c --- /dev/null +++ b/docs.1/ref/cat.html @@ -0,0 +1,47 @@ + + + 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 new file mode 100644 index 0000000..e8b723a --- /dev/null +++ b/docs.1/ref/comma.html @@ -0,0 +1,33 @@ + + + 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 new file mode 100644 index 0000000..8660989 --- /dev/null +++ b/docs.1/ref/comma_if.html @@ -0,0 +1,50 @@ + + + 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 new file mode 100644 index 0000000..50973b0 --- /dev/null +++ b/docs.1/ref/compl.html @@ -0,0 +1,48 @@ + + + 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 new file mode 100644 index 0000000..da1f2f7 --- /dev/null +++ b/docs.1/ref/config_errors.html @@ -0,0 +1,29 @@ + + + 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 new file mode 100644 index 0000000..1d07a60 --- /dev/null +++ b/docs.1/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/docs.1/ref/config_unrolled.html b/docs.1/ref/config_unrolled.html new file mode 100644 index 0000000..85057b5 --- /dev/null +++ b/docs.1/ref/config_unrolled.html @@ -0,0 +1,29 @@ + + + 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 new file mode 100644 index 0000000..aa794aa --- /dev/null +++ b/docs.1/ref/dec.html @@ -0,0 +1,44 @@ + + + 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 new file mode 100644 index 0000000..1491337 --- /dev/null +++ b/docs.1/ref/div.html @@ -0,0 +1,53 @@ + + + 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 new file mode 100644 index 0000000..bcb4afa --- /dev/null +++ b/docs.1/ref/div_d.html @@ -0,0 +1,75 @@ + + + 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 new file mode 100644 index 0000000..1b70063 --- /dev/null +++ b/docs.1/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

+
+ 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 new file mode 100644 index 0000000..dcca46d --- /dev/null +++ b/docs.1/ref/enum.html @@ -0,0 +1,70 @@ + + + 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 new file mode 100644 index 0000000..f9b1207 --- /dev/null +++ b/docs.1/ref/enum_binary_params.html @@ -0,0 +1,66 @@ + + + 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 new file mode 100644 index 0000000..bf3cc66 --- /dev/null +++ b/docs.1/ref/enum_binary_params_z.html @@ -0,0 +1,83 @@ + + + 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 new file mode 100644 index 0000000..87faff7 --- /dev/null +++ b/docs.1/ref/enum_params.html @@ -0,0 +1,59 @@ + + + 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 new file mode 100644 index 0000000..5050cde --- /dev/null +++ b/docs.1/ref/enum_params_with_a_default.html @@ -0,0 +1,73 @@ + + + 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 new file mode 100644 index 0000000..886a0e3 --- /dev/null +++ b/docs.1/ref/enum_params_with_defaults.html @@ -0,0 +1,74 @@ + + + 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 new file mode 100644 index 0000000..dc18b33 --- /dev/null +++ b/docs.1/ref/enum_params_z.html @@ -0,0 +1,72 @@ + + + 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 new file mode 100644 index 0000000..27464f0 --- /dev/null +++ b/docs.1/ref/enum_shifted.html @@ -0,0 +1,72 @@ + + + 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 new file mode 100644 index 0000000..b4865d2 --- /dev/null +++ b/docs.1/ref/enum_shifted_params.html @@ -0,0 +1,63 @@ + + + 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 new file mode 100644 index 0000000..f2f36a0 --- /dev/null +++ b/docs.1/ref/enum_shifted_params_z.html @@ -0,0 +1,69 @@ + + + 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 new file mode 100644 index 0000000..1601282 --- /dev/null +++ b/docs.1/ref/enum_shifted_z.html @@ -0,0 +1,83 @@ + + + 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 new file mode 100644 index 0000000..3be9bd4 --- /dev/null +++ b/docs.1/ref/enum_z.html @@ -0,0 +1,86 @@ + + + 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 new file mode 100644 index 0000000..7a03eee --- /dev/null +++ b/docs.1/ref/equal.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..268055a --- /dev/null +++ b/docs.1/ref/equal_d.html @@ -0,0 +1,59 @@ + + + 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 new file mode 100644 index 0000000..79af4ff --- /dev/null +++ b/docs.1/ref/expand.html @@ -0,0 +1,57 @@ + + + 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 new file mode 100644 index 0000000..c24cd6a --- /dev/null +++ b/docs.1/ref/expr_if.html @@ -0,0 +1,60 @@ + + + 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 new file mode 100644 index 0000000..12351a8 --- /dev/null +++ b/docs.1/ref/expr_iif.html @@ -0,0 +1,57 @@ + + + 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 new file mode 100644 index 0000000..511f25c --- /dev/null +++ b/docs.1/ref/filename_x.html @@ -0,0 +1,42 @@ + + + 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 new file mode 100644 index 0000000..02e89ab --- /dev/null +++ b/docs.1/ref/for.html @@ -0,0 +1,95 @@ + + + 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 new file mode 100644 index 0000000..c896b16 --- /dev/null +++ b/docs.1/ref/for_r.html @@ -0,0 +1,145 @@ + + + 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 new file mode 100644 index 0000000..19bac1b --- /dev/null +++ b/docs.1/ref/frame_finish.html @@ -0,0 +1,32 @@ + + + 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 new file mode 100644 index 0000000..d046435 --- /dev/null +++ b/docs.1/ref/frame_flags.html @@ -0,0 +1,32 @@ + + + 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 new file mode 100644 index 0000000..5215775 --- /dev/null +++ b/docs.1/ref/frame_iteration.html @@ -0,0 +1,63 @@ + + + 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 new file mode 100644 index 0000000..07db997 --- /dev/null +++ b/docs.1/ref/frame_start.html @@ -0,0 +1,32 @@ + + + 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 new file mode 100644 index 0000000..addbefa --- /dev/null +++ b/docs.1/ref/greater.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..e371fdd --- /dev/null +++ b/docs.1/ref/greater_d.html @@ -0,0 +1,59 @@ + + + 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 new file mode 100644 index 0000000..fd9c69a --- /dev/null +++ b/docs.1/ref/greater_equal.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..7b36c53 --- /dev/null +++ b/docs.1/ref/greater_equal_d.html @@ -0,0 +1,59 @@ + + + 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 new file mode 100644 index 0000000..1d549bd --- /dev/null +++ b/docs.1/ref/identity.html @@ -0,0 +1,47 @@ + + + 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 new file mode 100644 index 0000000..3c6b5d5 --- /dev/null +++ b/docs.1/ref/if.html @@ -0,0 +1,53 @@ + + + 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 new file mode 100644 index 0000000..0578e5e --- /dev/null +++ b/docs.1/ref/iif.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..8d35c4c --- /dev/null +++ b/docs.1/ref/inc.html @@ -0,0 +1,44 @@ + + + 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 new file mode 100644 index 0000000..3faa38f --- /dev/null +++ b/docs.1/ref/include_self.html @@ -0,0 +1,91 @@ + + + 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 new file mode 100644 index 0000000..45c06ff --- /dev/null +++ b/docs.1/ref/indirect_self.html @@ -0,0 +1,35 @@ + + + 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 new file mode 100644 index 0000000..2e30e3e --- /dev/null +++ b/docs.1/ref/intercept.html @@ -0,0 +1,41 @@ + + + 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 new file mode 100644 index 0000000..7667369 --- /dev/null +++ b/docs.1/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/docs.1/ref/is_selfish.html b/docs.1/ref/is_selfish.html new file mode 100644 index 0000000..ff80d5a --- /dev/null +++ b/docs.1/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/docs.1/ref/iterate.html b/docs.1/ref/iterate.html new file mode 100644 index 0000000..44c5a53 --- /dev/null +++ b/docs.1/ref/iterate.html @@ -0,0 +1,73 @@ + + + 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 new file mode 100644 index 0000000..5c4d3bc --- /dev/null +++ b/docs.1/ref/iteration.html @@ -0,0 +1,45 @@ + + + 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 new file mode 100644 index 0000000..acba6b6 --- /dev/null +++ b/docs.1/ref/iteration_depth.html @@ -0,0 +1,58 @@ + + + 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 new file mode 100644 index 0000000..573ef01 --- /dev/null +++ b/docs.1/ref/iteration_finish.html @@ -0,0 +1,47 @@ + + + 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 new file mode 100644 index 0000000..29f67d7 --- /dev/null +++ b/docs.1/ref/iteration_flags.html @@ -0,0 +1,58 @@ + + + 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 new file mode 100644 index 0000000..3ef9810 --- /dev/null +++ b/docs.1/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/docs.1/ref/iteration_params_x.html b/docs.1/ref/iteration_params_x.html new file mode 100644 index 0000000..455edf1 --- /dev/null +++ b/docs.1/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/docs.1/ref/iteration_start.html b/docs.1/ref/iteration_start.html new file mode 100644 index 0000000..ccee08e --- /dev/null +++ b/docs.1/ref/iteration_start.html @@ -0,0 +1,47 @@ + + + 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 new file mode 100644 index 0000000..a70a056 --- /dev/null +++ b/docs.1/ref/less.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..691c0d1 --- /dev/null +++ b/docs.1/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

+
+ 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 new file mode 100644 index 0000000..1ba99a7 --- /dev/null +++ b/docs.1/ref/less_equal.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..b39537e --- /dev/null +++ b/docs.1/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

+
+ 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 new file mode 100644 index 0000000..e4349e7 --- /dev/null +++ b/docs.1/ref/limit_bool.html @@ -0,0 +1,31 @@ + + + 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 new file mode 100644 index 0000000..81cc7c6 --- /dev/null +++ b/docs.1/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

+
+ Header:  <boost/preprocessor/config/limits.hpp> +
+ + diff --git a/docs.1/ref/limit_for.html b/docs.1/ref/limit_for.html new file mode 100644 index 0000000..4f9b884 --- /dev/null +++ b/docs.1/ref/limit_for.html @@ -0,0 +1,24 @@ + + + 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 new file mode 100644 index 0000000..707b1fe --- /dev/null +++ b/docs.1/ref/limit_iteration.html @@ -0,0 +1,24 @@ + + + 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 new file mode 100644 index 0000000..557389d --- /dev/null +++ b/docs.1/ref/limit_iteration_dim.html @@ -0,0 +1,24 @@ + + + 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 new file mode 100644 index 0000000..be7006e --- /dev/null +++ b/docs.1/ref/limit_mag.html @@ -0,0 +1,24 @@ + + + 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 new file mode 100644 index 0000000..0603323 --- /dev/null +++ b/docs.1/ref/limit_repeat.html @@ -0,0 +1,25 @@ + + + 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 new file mode 100644 index 0000000..d9382ba --- /dev/null +++ b/docs.1/ref/limit_slot_count.html @@ -0,0 +1,24 @@ + + + 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 new file mode 100644 index 0000000..ebf1ca9 --- /dev/null +++ b/docs.1/ref/limit_slot_sig.html @@ -0,0 +1,24 @@ + + + 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 new file mode 100644 index 0000000..a935391 --- /dev/null +++ b/docs.1/ref/limit_tuple.html @@ -0,0 +1,24 @@ + + + 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 new file mode 100644 index 0000000..84eac8d --- /dev/null +++ b/docs.1/ref/limit_while.html @@ -0,0 +1,24 @@ + + + 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 new file mode 100644 index 0000000..5a5127f --- /dev/null +++ b/docs.1/ref/line.html @@ -0,0 +1,103 @@ + + + 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 new file mode 100644 index 0000000..095a373 --- /dev/null +++ b/docs.1/ref/list_append.html @@ -0,0 +1,59 @@ + + + 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 new file mode 100644 index 0000000..d0cf977 --- /dev/null +++ b/docs.1/ref/list_append_d.html @@ -0,0 +1,86 @@ + + + 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 new file mode 100644 index 0000000..a1aea59 --- /dev/null +++ b/docs.1/ref/list_at.html @@ -0,0 +1,51 @@ + + + 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 new file mode 100644 index 0000000..72c1628 --- /dev/null +++ b/docs.1/ref/list_at_d.html @@ -0,0 +1,53 @@ + + + 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 new file mode 100644 index 0000000..354e746 --- /dev/null +++ b/docs.1/ref/list_cat.html @@ -0,0 +1,48 @@ + + + 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 new file mode 100644 index 0000000..829a947 --- /dev/null +++ b/docs.1/ref/list_cat_d.html @@ -0,0 +1,57 @@ + + + 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 new file mode 100644 index 0000000..ed038d7 --- /dev/null +++ b/docs.1/ref/list_cons.html @@ -0,0 +1,77 @@ + + + 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 new file mode 100644 index 0000000..55a8023 --- /dev/null +++ b/docs.1/ref/list_enum.html @@ -0,0 +1,52 @@ + + + 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 new file mode 100644 index 0000000..8fa768b --- /dev/null +++ b/docs.1/ref/list_enum_r.html @@ -0,0 +1,59 @@ + + + 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 new file mode 100644 index 0000000..2ce16df --- /dev/null +++ b/docs.1/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

+
+ 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 new file mode 100644 index 0000000..de82dc0 --- /dev/null +++ b/docs.1/ref/list_filter_d.html @@ -0,0 +1,76 @@ + + + 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 new file mode 100644 index 0000000..831eec0 --- /dev/null +++ b/docs.1/ref/list_first.html @@ -0,0 +1,52 @@ + + + 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 new file mode 100644 index 0000000..d843cfa --- /dev/null +++ b/docs.1/ref/list_first_n.html @@ -0,0 +1,52 @@ + + + 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 new file mode 100644 index 0000000..9332c46 --- /dev/null +++ b/docs.1/ref/list_first_n_d.html @@ -0,0 +1,61 @@ + + + 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 new file mode 100644 index 0000000..8dcfcf9 --- /dev/null +++ b/docs.1/ref/list_fold_left.html @@ -0,0 +1,65 @@ + + + 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 new file mode 100644 index 0000000..9745d84 --- /dev/null +++ b/docs.1/ref/list_fold_left_2nd.html @@ -0,0 +1,65 @@ + + + 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 new file mode 100644 index 0000000..c1b45ea --- /dev/null +++ b/docs.1/ref/list_fold_left_2nd_d.html @@ -0,0 +1,76 @@ + + + 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 new file mode 100644 index 0000000..ddbc506 --- /dev/null +++ b/docs.1/ref/list_fold_left_d.html @@ -0,0 +1,71 @@ + + + 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 new file mode 100644 index 0000000..577cccc --- /dev/null +++ b/docs.1/ref/list_fold_left_d_old.html @@ -0,0 +1,76 @@ + + + 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 new file mode 100644 index 0000000..bbf726e --- /dev/null +++ b/docs.1/ref/list_fold_right.html @@ -0,0 +1,69 @@ + + + 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 new file mode 100644 index 0000000..73e9862 --- /dev/null +++ b/docs.1/ref/list_fold_right_2nd.html @@ -0,0 +1,69 @@ + + + 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 new file mode 100644 index 0000000..a63b716 --- /dev/null +++ b/docs.1/ref/list_fold_right_2nd_d.html @@ -0,0 +1,76 @@ + + + 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 new file mode 100644 index 0000000..19858c0 --- /dev/null +++ b/docs.1/ref/list_fold_right_d.html @@ -0,0 +1,71 @@ + + + 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 new file mode 100644 index 0000000..30570c3 --- /dev/null +++ b/docs.1/ref/list_fold_right_d_old.html @@ -0,0 +1,80 @@ + + + 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 new file mode 100644 index 0000000..446415d --- /dev/null +++ b/docs.1/ref/list_for_each.html @@ -0,0 +1,65 @@ + + + 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 new file mode 100644 index 0000000..a55474e --- /dev/null +++ b/docs.1/ref/list_for_each_i.html @@ -0,0 +1,65 @@ + + + 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 new file mode 100644 index 0000000..b575d29 --- /dev/null +++ b/docs.1/ref/list_for_each_i_r.html @@ -0,0 +1,72 @@ + + + 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 new file mode 100644 index 0000000..6ccb695 --- /dev/null +++ b/docs.1/ref/list_for_each_product.html @@ -0,0 +1,76 @@ + + + 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 new file mode 100644 index 0000000..e434db1 --- /dev/null +++ b/docs.1/ref/list_for_each_product_r.html @@ -0,0 +1,108 @@ + + + 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 new file mode 100644 index 0000000..592996d --- /dev/null +++ b/docs.1/ref/list_for_each_r.html @@ -0,0 +1,71 @@ + + + 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 new file mode 100644 index 0000000..27627d5 --- /dev/null +++ b/docs.1/ref/list_is_cons.html @@ -0,0 +1,41 @@ + + + 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 new file mode 100644 index 0000000..034f535 --- /dev/null +++ b/docs.1/ref/list_is_nil.html @@ -0,0 +1,41 @@ + + + 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 new file mode 100644 index 0000000..168c9bb --- /dev/null +++ b/docs.1/ref/list_nil.html @@ -0,0 +1,58 @@ + + + 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 new file mode 100644 index 0000000..59afe5c --- /dev/null +++ b/docs.1/ref/list_rest.html @@ -0,0 +1,52 @@ + + + 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 new file mode 100644 index 0000000..83db04c --- /dev/null +++ b/docs.1/ref/list_rest_n.html @@ -0,0 +1,52 @@ + + + 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 new file mode 100644 index 0000000..3d8f08a --- /dev/null +++ b/docs.1/ref/list_rest_n_d.html @@ -0,0 +1,61 @@ + + + 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 new file mode 100644 index 0000000..e11fae0 --- /dev/null +++ b/docs.1/ref/list_reverse.html @@ -0,0 +1,45 @@ + + + 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 new file mode 100644 index 0000000..289fec5 --- /dev/null +++ b/docs.1/ref/list_reverse_d.html @@ -0,0 +1,53 @@ + + + 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 new file mode 100644 index 0000000..f070376 --- /dev/null +++ b/docs.1/ref/list_size.html @@ -0,0 +1,45 @@ + + + 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 new file mode 100644 index 0000000..1492f9b --- /dev/null +++ b/docs.1/ref/list_size_d.html @@ -0,0 +1,57 @@ + + + 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_r.html b/docs.1/ref/list_to_tuple_r.html new file mode 100644 index 0000000..aa6bea8 --- /dev/null +++ b/docs.1/ref/list_to_tuple_r.html @@ -0,0 +1,59 @@ + + + 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 new file mode 100644 index 0000000..b566e8b --- /dev/null +++ b/docs.1/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

+
+ 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 new file mode 100644 index 0000000..b520836 --- /dev/null +++ b/docs.1/ref/list_transform_d.html @@ -0,0 +1,76 @@ + + + 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 new file mode 100644 index 0000000..4b0369f --- /dev/null +++ b/docs.1/ref/local_iterate.html @@ -0,0 +1,53 @@ + + + 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 new file mode 100644 index 0000000..03edbd9 --- /dev/null +++ b/docs.1/ref/local_limits.html @@ -0,0 +1,71 @@ + + + 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 new file mode 100644 index 0000000..81d2def --- /dev/null +++ b/docs.1/ref/local_macro.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..ce10974 --- /dev/null +++ b/docs.1/ref/lparen.html @@ -0,0 +1,42 @@ + + + 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 new file mode 100644 index 0000000..ef28c53 --- /dev/null +++ b/docs.1/ref/lparen_if.html @@ -0,0 +1,51 @@ + + + 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 new file mode 100644 index 0000000..f91bda5 --- /dev/null +++ b/docs.1/ref/max.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..ad73c5d --- /dev/null +++ b/docs.1/ref/max_d.html @@ -0,0 +1,60 @@ + + + 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 new file mode 100644 index 0000000..f6e30c9 --- /dev/null +++ b/docs.1/ref/min.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..3eb67e6 --- /dev/null +++ b/docs.1/ref/min_d.html @@ -0,0 +1,60 @@ + + + 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 new file mode 100644 index 0000000..d62ea17 --- /dev/null +++ b/docs.1/ref/mod.html @@ -0,0 +1,53 @@ + + + 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 new file mode 100644 index 0000000..6855b39 --- /dev/null +++ b/docs.1/ref/mod_d.html @@ -0,0 +1,66 @@ + + + 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 new file mode 100644 index 0000000..e40419c --- /dev/null +++ b/docs.1/ref/mul.html @@ -0,0 +1,58 @@ + + + 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 new file mode 100644 index 0000000..7f976be --- /dev/null +++ b/docs.1/ref/mul_d.html @@ -0,0 +1,81 @@ + + + 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 new file mode 100644 index 0000000..656955f --- /dev/null +++ b/docs.1/ref/nil.html @@ -0,0 +1,31 @@ + + + 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 new file mode 100644 index 0000000..73c6b7c --- /dev/null +++ b/docs.1/ref/nor.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..6a650b1 --- /dev/null +++ b/docs.1/ref/not.html @@ -0,0 +1,49 @@ + + + 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 new file mode 100644 index 0000000..e48b981 --- /dev/null +++ b/docs.1/ref/not_equal.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..bbda9c0 --- /dev/null +++ b/docs.1/ref/not_equal_d.html @@ -0,0 +1,59 @@ + + + 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 new file mode 100644 index 0000000..b72399f --- /dev/null +++ b/docs.1/ref/or.html @@ -0,0 +1,54 @@ + + + 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 new file mode 100644 index 0000000..8ab5a24 --- /dev/null +++ b/docs.1/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

+
+ Header:  <boost/preprocessor/iteration/iterate.hpp> +
+ + diff --git a/docs.1/ref/relative_flags.html b/docs.1/ref/relative_flags.html new file mode 100644 index 0000000..bc8de33 --- /dev/null +++ b/docs.1/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

+
+ Header:  <boost/preprocessor/iteration/iterate.hpp> +
+ + diff --git a/docs.1/ref/relative_iteration.html b/docs.1/ref/relative_iteration.html new file mode 100644 index 0000000..3bc0350 --- /dev/null +++ b/docs.1/ref/relative_iteration.html @@ -0,0 +1,91 @@ + + + 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 new file mode 100644 index 0000000..eddfee6 --- /dev/null +++ b/docs.1/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

+
+ Header:  <boost/preprocessor/iteration/iterate.hpp> +
+ + diff --git a/docs.1/ref/repeat.html b/docs.1/ref/repeat.html new file mode 100644 index 0000000..5efc866 --- /dev/null +++ b/docs.1/ref/repeat.html @@ -0,0 +1,70 @@ + + + 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 new file mode 100644 index 0000000..546c615 --- /dev/null +++ b/docs.1/ref/repeat_1st.html @@ -0,0 +1,72 @@ + + + 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 new file mode 100644 index 0000000..d7ed26a --- /dev/null +++ b/docs.1/ref/repeat_2nd.html @@ -0,0 +1,72 @@ + + + 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 new file mode 100644 index 0000000..43ae84f --- /dev/null +++ b/docs.1/ref/repeat_3rd.html @@ -0,0 +1,72 @@ + + + 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 new file mode 100644 index 0000000..6f5ccf2 --- /dev/null +++ b/docs.1/ref/repeat_from_to.html @@ -0,0 +1,85 @@ + + + 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 new file mode 100644 index 0000000..67c092f --- /dev/null +++ b/docs.1/ref/repeat_from_to_1st.html @@ -0,0 +1,81 @@ + + + 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 new file mode 100644 index 0000000..aa924f2 --- /dev/null +++ b/docs.1/ref/repeat_from_to_2nd.html @@ -0,0 +1,81 @@ + + + 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 new file mode 100644 index 0000000..a597a2e --- /dev/null +++ b/docs.1/ref/repeat_from_to_3rd.html @@ -0,0 +1,81 @@ + + + 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 new file mode 100644 index 0000000..6d816a8 --- /dev/null +++ b/docs.1/ref/repeat_from_to_z.html @@ -0,0 +1,95 @@ + + + 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 new file mode 100644 index 0000000..cd86e30 --- /dev/null +++ b/docs.1/ref/repeat_z.html @@ -0,0 +1,90 @@ + + + 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 new file mode 100644 index 0000000..8c7ae6b --- /dev/null +++ b/docs.1/ref/rparen.html @@ -0,0 +1,43 @@ + + + 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 new file mode 100644 index 0000000..58f3cf3 --- /dev/null +++ b/docs.1/ref/rparen_if.html @@ -0,0 +1,51 @@ + + + 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 new file mode 100644 index 0000000..ed75d38 --- /dev/null +++ b/docs.1/ref/slot.html @@ -0,0 +1,50 @@ + + + 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 new file mode 100644 index 0000000..9e362bf --- /dev/null +++ b/docs.1/ref/stringize.html @@ -0,0 +1,40 @@ + + + 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 new file mode 100644 index 0000000..eb377ad --- /dev/null +++ b/docs.1/ref/sub.html @@ -0,0 +1,53 @@ + + + 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 new file mode 100644 index 0000000..08152bf --- /dev/null +++ b/docs.1/ref/sub_d.html @@ -0,0 +1,75 @@ + + + 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/to_tuple.html b/docs.1/ref/to_tuple.html new file mode 100644 index 0000000..5f60410 --- /dev/null +++ b/docs.1/ref/to_tuple.html @@ -0,0 +1,52 @@ + + + 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/tuple_eat.html b/docs.1/ref/tuple_eat.html new file mode 100644 index 0000000..8738788 --- /dev/null +++ b/docs.1/ref/tuple_eat.html @@ -0,0 +1,48 @@ + + + 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 new file mode 100644 index 0000000..302f96e --- /dev/null +++ b/docs.1/ref/tuple_elem.html @@ -0,0 +1,55 @@ + + + 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 new file mode 100644 index 0000000..293a32a --- /dev/null +++ b/docs.1/ref/tuple_rem.html @@ -0,0 +1,42 @@ + + + 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 new file mode 100644 index 0000000..afc6743 --- /dev/null +++ b/docs.1/ref/tuple_reverse.html @@ -0,0 +1,46 @@ + + + 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 new file mode 100644 index 0000000..3d2c162 --- /dev/null +++ b/docs.1/ref/tuple_to_list.html @@ -0,0 +1,47 @@ + + + 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 new file mode 100644 index 0000000..8284c5e --- /dev/null +++ b/docs.1/ref/value.html @@ -0,0 +1,27 @@ + + + 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 new file mode 100644 index 0000000..68dd8e2 --- /dev/null +++ b/docs.1/ref/while.html @@ -0,0 +1,106 @@ + + + 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 new file mode 100644 index 0000000..9778793 --- /dev/null +++ b/docs.1/ref/while_d.html @@ -0,0 +1,119 @@ + + + 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 new file mode 100644 index 0000000..afe0db8 --- /dev/null +++ b/docs.1/ref/xor.html @@ -0,0 +1,54 @@ + + + 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/styles.css b/docs.1/styles.css index fd1dd49..fd9548b 100644 --- a/docs.1/styles.css +++ b/docs.1/styles.css @@ -65,17 +65,7 @@ s { span { display: block; margin: 0px; -} -/*.uc { - font-family: "Courier New"; - background: #eeeeee; - font-weight: normal; - text-align: center; - color: red; - border: 1px solid; - border-color: red; - padding: 5px; -}*/ +} ul { margin-top: 10px; margin-bottom: 10px; margin-left: 20px; padding-left: 17px; diff --git a/regression/arithmetic.cpp b/regression/arithmetic.cpp new file mode 100644 index 0000000..6d3cf31 --- /dev/null +++ b/regression/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/regression/array.cpp b/regression/array.cpp new file mode 100644 index 0000000..8341521 --- /dev/null +++ b/regression/array.cpp @@ -0,0 +1,36 @@ +# /* ************************************************************************** +# * * +# * (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 + +# define P1 (3, +# define P2 ( +# define P3 0, 1 +# define P4 , 2) +# define P5 ) + +BEGIN BOOST_PP_ARRAY_ELEM(0, P1 P2 P3 P4 P5) == 0 END + +// size + +BEGIN BOOST_PP_ARRAY_SIZE(ARRAY) == 3 END +BEGIN BOOST_PP_ARRAY_SIZE((5, (0, 1, 2, 3, 4))) == 5 END + +BEGIN BOOST_PP_ARRAY_SIZE(P1 P2 P3 P4 P5) == 5 END diff --git a/regression/comparison.cpp b/regression/comparison.cpp new file mode 100644 index 0000000..a8cd002 --- /dev/null +++ b/regression/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/regression/control.cpp b/regression/control.cpp new file mode 100644 index 0000000..ffa54a8 --- /dev/null +++ b/regression/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/regression/debug.cpp b/regression/debug.cpp new file mode 100644 index 0000000..d4094bf --- /dev/null +++ b/regression/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/regression/facilities.cpp b/regression/facilities.cpp new file mode 100644 index 0000000..9a8f3e6 --- /dev/null +++ b/regression/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/regression/iteration.cpp b/regression/iteration.cpp new file mode 100644 index 0000000..3f70e67 --- /dev/null +++ b/regression/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 "iteration.cpp" // +# include BOOST_PP_INCLUDE_SELF() +# +# else + +BEGIN BOOST_PP_IS_SELFISH == 1 END + +# endif diff --git a/regression/iteration.h b/regression/iteration.h new file mode 100644 index 0000000..568dfd0 --- /dev/null +++ b/regression/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 shouldn't get here! +# +# endif diff --git a/regression/list.cpp b/regression/list.cpp new file mode 100644 index 0000000..7e84f5a --- /dev/null +++ b/regression/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/regression/logical.cpp b/regression/logical.cpp new file mode 100644 index 0000000..178aa1b --- /dev/null +++ b/regression/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/regression/repetition.cpp b/regression/repetition.cpp new file mode 100644 index 0000000..cde9a4c --- /dev/null +++ b/regression/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/regression/selection.cpp b/regression/selection.cpp new file mode 100644 index 0000000..3491f72 --- /dev/null +++ b/regression/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/regression/slot.cpp b/regression/slot.cpp new file mode 100644 index 0000000..24047a0 --- /dev/null +++ b/regression/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/regression/test.cpp b/regression/test.cpp new file mode 100644 index 0000000..a5de0de --- /dev/null +++ b/regression/test.cpp @@ -0,0 +1,8 @@ +const int default_param_0 = 0 , default_param_1 = 1 , default_param_2 = 2 , default_param_3 = 3 , default_param_4 = 4 , default_param_5 = 5 , default_param_6 = +6 , default_param_7 = 7 , default_param_8 = 8 , default_param_9 = 9 , default_param_10 = 10 , default_param_11 = 11 , default_param_12 = 12 , default_param_13 = + 13 , default_param_14 = 14 , default_param_15 = 15 , default_param_16 = 16 , default_param_17 = 17 , default_param_18 = 18 , default_param_19 = 19 , default_param_20 = 20 , default_param_21 = 21 , default_param_22 = 22 , default_param_23 = 23 , default_param_24 = 24 , default_param_25 = 25 , default_param_26 = 26 , default_param_27 = 27 , default_param_28 = 28 , default_param_29 = 29 , default_param_30 = 30 , default_param_31 = 31 , default_param_32 = 32 , default_param_33 = + 33 , default_param_34 = 34 , default_param_35 = 35 , default_param_36 = 36 , default_param_37 = 37 , default_param_38 = 38 , default_param_39 = 39 , default_param_40 = 40 , default_param_41 = 41 , default_param_42 = 42 , default_param_43 = 43 , default_param_44 = 44 , default_param_45 = 45 , default_param_46 = 46 , default_param_47 = 47 , default_param_48 = 48 , default_param_49 = 49; + +int main(void) { + return 0; +} diff --git a/regression/test.h b/regression/test.h new file mode 100644 index 0000000..71bb657 --- /dev/null +++ b/regression/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 diff --git a/regression/tuple.cpp b/regression/tuple.cpp new file mode 100644 index 0000000..9e1dc8d --- /dev/null +++ b/regression/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