diff --git a/doc/data.html b/doc/data.html index c3e45ea..247025e 100644 --- a/doc/data.html +++ b/doc/data.html @@ -1,16 +1,18 @@ - - data.html - - - - -

Data Types [back]

- - + + data.html + + + + +

+ Data Types [back] +

+ + diff --git a/doc/data/sets.html b/doc/data/sets.html index 7747d43..e3a4901 100644 --- a/doc/data/sets.html +++ b/doc/data/sets.html @@ -1,57 +1,64 @@ - - sets.html - - - -

Sets

-
- A set is a group of adjacent parenthesized elements. - For example, -
-
- (a)(b)(c) -
-
- ...is a set of 3 elements--a, b, and c. -
-
- Sets are data structures that merge the properties of both lists and tuples - with the exception that sets cannot be empty.  - Therefore, an "empty" set is considered a special case scenario that must be handled separately in C++. -
-
-#define SET (x)(y)(z)
+	
+		seqs.html
+		
+	
+	
+		

+ Sets +

+
+ A seq is a group of adjacent parenthesized elements. For example, +
+
+ (a)(b)(c) +
+
+ ...is a seq of 3 elements--a, b, and c. +
+
+ Sets are data structures that merge the properties of both lists and + tuples with the exception that seqs cannot be empty.  + Therefore, an "empty" seq is considered a special case scenario that + must be handled separately in C++. +
+
+
+#define SEQ (x)(y)(z)
 #define REVERSE(s, state, elem) (elem) state
    // append to head                  ^
 
-BOOST_PP_SET_FOLD_LEFT(REVERSE, BOOST_PP_EMPTY, SET)()
+BOOST_PP_SEQ_FOLD_LEFT(REVERSE, BOOST_PP_EMPTY, SEQ)()
    //                           #1                  #2
-   // 1) placeholder for "empty" set
+   // 1) placeholder for "empty" seq
    // 2) remove placeholder
 
-#define SET_B (1)(2)(3)
+#define SEQ_B (1)(2)(3)
 #define INC(s, state, elem) state (BOOST_PP_INC(elem))
    // append to tail             ^
 
-BOOST_PP_SET_FOLD_RIGHT(INC, BOOST_PP_SET_NIL, SET)
+BOOST_PP_SEQ_FOLD_RIGHT(INC, BOOST_PP_SEQ_NIL, SEQ)
    //                        ^
    // special placeholder that will be "eaten"
    // by appending to the tail
-
-
- Sets are extremely efficient.  - Element access speed approaches random access--even with sets of up to 256 elements.  - This is because element access (among other things) is implemented iteratively rather than recursively.  - Therefore, elements can be accessed at extremely high indices even on preprocessors with low maximum expansion depths. -
-
- Elements of a set can be extracted with - BOOST_PP_SET_ELEM. -
-

Primitives

+
+
+
+ Sets are extremely efficient.  Element access speed approaches + random access--even with seqs of up to 256 elements.  This + is because element access (among other things) is implemented iteratively + rather than recursively.  Therefore, elements can be accessed at extremely + high indices even on preprocessors with low maximum expansion depths. +
+
+ Elements of a seq can be extracted with BOOST_PP_SEQ_ELEM. +
+

+ Primitives +

- + diff --git a/doc/headers.html b/doc/headers.html index 70716c6..7b0be9b 100644 --- a/doc/headers.html +++ b/doc/headers.html @@ -1,201 +1,389 @@ - - headers.html - - - - - -

Headers [back]

- - + + headers.html + + + + + +

+ Headers [back] +

+ + diff --git a/doc/headers/config/limits.hpp.html b/doc/headers/config/limits.hpp.html index b728d13..eb62fa0 100644 --- a/doc/headers/config/limits.hpp.html +++ b/doc/headers/config/limits.hpp.html @@ -1,29 +1,44 @@ - - config/limits.hpp - - - -
- The config/limits.hpp header defines various library limits. -
-

Usage

+ + config/limits.hpp + + + +
+ The config/limits.hpp header defines various library limits. +
+

+ Usage +

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

Contents

+

+ Contents +

- + diff --git a/doc/headers/set.hpp.html b/doc/headers/set.hpp.html index 9fed5cb..25e4d4c 100644 --- a/doc/headers/set.hpp.html +++ b/doc/headers/set.hpp.html @@ -1,43 +1,72 @@ - - set.hpp - - - -
- The set.hpp includes the headers in the set folder. -
-

Usage

-
- #include <boost/preprocessor/set.hpp> + + seq.hpp + + + +
+ The seq.hpp includes the headers in the seq folder.
-

Includes

+

+ Usage +

+
+ #include <boost/preprocessor/seq.hpp> +
+

+ Includes +

- + diff --git a/doc/headers/set/cat.hpp.html b/doc/headers/set/cat.hpp.html index eb2f4bf..ba024da 100644 --- a/doc/headers/set/cat.hpp.html +++ b/doc/headers/set/cat.hpp.html @@ -1,20 +1,27 @@ - - set/cat.hpp - - - -
- The set/cat.hpp header defines macros for concatenating all elements in a set. -
-

Usage

-
- #include <boost/preprocessor/set/cat.hpp> + + seq/cat.hpp + + + +
+ The seq/cat.hpp header defines macros for concatenating all elements in + a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/cat.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/elem.hpp.html b/doc/headers/set/elem.hpp.html index b16aa19..e6fd49d 100644 --- a/doc/headers/set/elem.hpp.html +++ b/doc/headers/set/elem.hpp.html @@ -1,19 +1,24 @@ - - set/elem.hpp - - - -
- The set/elem.hpp header defines a macro to extract an element from a set. -
-

Usage

-
- #include <boost/preprocessor/set/elem.hpp> + + seq/elem.hpp + + + +
+ The seq/elem.hpp header defines a macro to extract an element from a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/elem.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/enum.hpp.html b/doc/headers/set/enum.hpp.html index ccb5432..c5a7180 100644 --- a/doc/headers/set/enum.hpp.html +++ b/doc/headers/set/enum.hpp.html @@ -1,19 +1,24 @@ - - set/enum.hpp - - - -
- The set/enum.hpp header defines a macro to enumerate the elements in a set. -
-

Usage

-
- #include <boost/preprocessor/set/enum.hpp> + + seq/enum.hpp + + + +
+ The seq/enum.hpp header defines a macro to enumerate the elements in a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/enum.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/filter.hpp.html b/doc/headers/set/filter.hpp.html index be89274..c8d88ad 100644 --- a/doc/headers/set/filter.hpp.html +++ b/doc/headers/set/filter.hpp.html @@ -1,20 +1,26 @@ - - set/filter.hpp - - - -
- The set/filter.hpp header defines macros to filter a set. -
-

Usage

-
- #include <boost/preprocessor/set/filter.hpp> + + seq/filter.hpp + + + +
+ The seq/filter.hpp header defines macros to filter a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/filter.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/first_n.hpp.html b/doc/headers/set/first_n.hpp.html index 280fe5d..79133c4 100644 --- a/doc/headers/set/first_n.hpp.html +++ b/doc/headers/set/first_n.hpp.html @@ -1,19 +1,25 @@ - - set/first_n.hpp - - - -
- The set/first_n.hpp header defines a macro that returns the first N elements of a set. -
-

Usage

-
- #include <boost/preprocessor/set/first_n.hpp> + + seq/first_n.hpp + + + +
+ The seq/first_n.hpp header defines a macro that returns the first N + elements of a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/first_n.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/fold_left.hpp.html b/doc/headers/set/fold_left.hpp.html index 6b483a5..a20d48e 100644 --- a/doc/headers/set/fold_left.hpp.html +++ b/doc/headers/set/fold_left.hpp.html @@ -1,20 +1,27 @@ - - set/fold_left.hpp - - - -
- The set/fold_left.hpp header defines macros for folding (or accumulating) a set left-to-right. -
-

Usage

-
- #include <boost/preprocessor/set/fold_left.hpp> + + seq/fold_left.hpp + + + +
+ The seq/fold_left.hpp header defines macros for folding (or + accumulating) a seq left-to-right.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/fold_left.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/fold_right.hpp.html b/doc/headers/set/fold_right.hpp.html index f62cea3..750faf1 100644 --- a/doc/headers/set/fold_right.hpp.html +++ b/doc/headers/set/fold_right.hpp.html @@ -1,20 +1,27 @@ - - set/fold_right.hpp - - - -
- The set/fold_right.hpp header defines macros for folding (or accumulating) a set right-to-left. -
-

Usage

-
- #include <boost/preprocessor/set/fold_right.hpp> + + seq/fold_right.hpp + + + +
+ The seq/fold_right.hpp header defines macros for folding (or + accumulating) a seq right-to-left.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/fold_right.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/for_each.hpp.html b/doc/headers/set/for_each.hpp.html index 3433bd2..ac19ec9 100644 --- a/doc/headers/set/for_each.hpp.html +++ b/doc/headers/set/for_each.hpp.html @@ -1,20 +1,27 @@ - - set/for_each.hpp - - - -
- The set/for_each.hpp header defines macros to repeat a macro for each element in a set. -
-

Usage

-
- #include <boost/preprocessor/set/for_each.hpp> + + seq/for_each.hpp + + + +
+ The seq/for_each.hpp header defines macros to repeat a macro for each + element in a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/for_each.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/for_each_i.hpp.html b/doc/headers/set/for_each_i.hpp.html index 0ff50e2..720f5f8 100644 --- a/doc/headers/set/for_each_i.hpp.html +++ b/doc/headers/set/for_each_i.hpp.html @@ -1,20 +1,27 @@ - - set/for_each_i.hpp - - - -
- The set/for_each_i.hpp header defines macros to repeat a macro for each element in a set. -
-

Usage

-
- #include <boost/preprocessor/set/for_each_i.hpp> + + seq/for_each_i.hpp + + + +
+ The seq/for_each_i.hpp header defines macros to repeat a macro for each + element in a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/for_each_i.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/for_each_product.hpp.html b/doc/headers/set/for_each_product.hpp.html index 62e33a2..ae3a489 100644 --- a/doc/headers/set/for_each_product.hpp.html +++ b/doc/headers/set/for_each_product.hpp.html @@ -1,20 +1,27 @@ - - set/for_each_product.hpp - - - -
- The set/for_each_product.hpp header defines macros to repeat a macro for each cartesian product of several sets. -
-

Usage

-
- #include <boost/preprocessor/set/for_each_product.hpp> + + seq/for_each_product.hpp + + + +
+ The seq/for_each_product.hpp header defines macros to repeat a macro for + each cartesian product of several seqs.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/for_each_product.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/insert.hpp.html b/doc/headers/set/insert.hpp.html index afc7d47..8caa77e 100644 --- a/doc/headers/set/insert.hpp.html +++ b/doc/headers/set/insert.hpp.html @@ -1,19 +1,24 @@ - - set/insert.hpp - - - -
- The set/insert.hpp header defines a macro to insert an element into a set. -
-

Usage

-
- #include <boost/preprocessor/set/insert.hpp> + + seq/insert.hpp + + + +
+ The seq/insert.hpp header defines a macro to insert an element into a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/insert.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/pop_back.hpp.html b/doc/headers/set/pop_back.hpp.html index 5c0c747..86d4f25 100644 --- a/doc/headers/set/pop_back.hpp.html +++ b/doc/headers/set/pop_back.hpp.html @@ -1,19 +1,25 @@ - - set/pop_back.hpp - - - -
- The set/pop_back.hpp header defines a macro to pop the last element off a set. -
-

Usage

-
- #include <boost/preprocessor/set/pop_back.hpp> + + seq/pop_back.hpp + + + +
+ The seq/pop_back.hpp header defines a macro to pop the last element off + a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/pop_back.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/pop_front.hpp.html b/doc/headers/set/pop_front.hpp.html index 438d623..6b8a047 100644 --- a/doc/headers/set/pop_front.hpp.html +++ b/doc/headers/set/pop_front.hpp.html @@ -1,19 +1,25 @@ - - set/pop_front.hpp - - - -
- The set/pop_front.hpp header defines a macro to pop the first element off a set. -
-

Usage

-
- #include <boost/preprocessor/set/pop_front.hpp> + + seq/pop_front.hpp + + + +
+ The seq/pop_front.hpp header defines a macro to pop the first element + off a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/pop_front.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/push_back.hpp.html b/doc/headers/set/push_back.hpp.html index 9491f1a..d675d83 100644 --- a/doc/headers/set/push_back.hpp.html +++ b/doc/headers/set/push_back.hpp.html @@ -1,19 +1,24 @@ - - set/push_back.hpp - - - -
- The set/push_back.hpp header defines a macro to append an element to a set. -
-

Usage

-
- #include <boost/preprocessor/set/push_back.hpp> + + seq/push_back.hpp + + + +
+ The seq/push_back.hpp header defines a macro to append an element to a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/push_back.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/push_front.hpp.html b/doc/headers/set/push_front.hpp.html index cccbc18..ddced26 100644 --- a/doc/headers/set/push_front.hpp.html +++ b/doc/headers/set/push_front.hpp.html @@ -1,19 +1,24 @@ - - set/push_front.hpp - - - -
- The set/push_front.hpp header defines a macro to prepend an element to a set. -
-

Usage

-
- #include <boost/preprocessor/set/push_front.hpp> + + seq/push_front.hpp + + + +
+ The seq/push_front.hpp header defines a macro to prepend an element to a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/push_front.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/remove.hpp.html b/doc/headers/set/remove.hpp.html index 61a3580..e894515 100644 --- a/doc/headers/set/remove.hpp.html +++ b/doc/headers/set/remove.hpp.html @@ -1,19 +1,24 @@ - - set/remove.hpp - - - -
- The set/remove.hpp header defines a macro to remove an element from a set. -
-

Usage

-
- #include <boost/preprocessor/set/remove.hpp> + + seq/remove.hpp + + + +
+ The seq/remove.hpp header defines a macro to remove an element from a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/remove.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/replace.hpp.html b/doc/headers/set/replace.hpp.html index 453e45d..3b32773 100644 --- a/doc/headers/set/replace.hpp.html +++ b/doc/headers/set/replace.hpp.html @@ -1,19 +1,24 @@ - - set/replace.hpp - - - -
- The set/replace.hpp header defines a macro to replace an element in a set. -
-

Usage

-
- #include <boost/preprocessor/set/replace.hpp> + + seq/replace.hpp + + + +
+ The seq/replace.hpp header defines a macro to replace an element in a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/replace.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/rest_n.hpp.html b/doc/headers/set/rest_n.hpp.html index 9cb2063..dbac3b2 100644 --- a/doc/headers/set/rest_n.hpp.html +++ b/doc/headers/set/rest_n.hpp.html @@ -1,19 +1,25 @@ - - set/rest_n.hpp - - - -
- The set/rest_n.hpp header defines a macro for extracting a group of elements from the end of a set. -
-

Usage

-
- #include <boost/preprocessor/set/rest_n.hpp> + + seq/rest_n.hpp + + + +
+ The seq/rest_n.hpp header defines a macro for extracting a group of + elements from the end of a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/rest_n.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/reverse.hpp.html b/doc/headers/set/reverse.hpp.html index 94e9817..ffb5c60 100644 --- a/doc/headers/set/reverse.hpp.html +++ b/doc/headers/set/reverse.hpp.html @@ -1,20 +1,26 @@ - - set/reverse.hpp - - - -
- The set/reverse.hpp header defines macros to reverse a set. -
-

Usage

-
- #include <boost/preprocessor/set/reverse.hpp> + + seq/reverse.hpp + + + +
+ The seq/reverse.hpp header defines macros to reverse a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/reverse.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/set.hpp.html b/doc/headers/set/set.hpp.html index 6920a65..c3eaebc 100644 --- a/doc/headers/set/set.hpp.html +++ b/doc/headers/set/set.hpp.html @@ -1,21 +1,28 @@ - - set/set.hpp - - - -
- The set/set.hpp header defines basic primitives for manipulating sets. -
-

Usage

-
- #include <boost/preprocessor/set/set.hpp> + + seq/seq.hpp + + + +
+ The seq/seq.hpp header defines basic primitives for manipulating seqs.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/seq.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/size.hpp.html b/doc/headers/set/size.hpp.html index 2231438..a851711 100644 --- a/doc/headers/set/size.hpp.html +++ b/doc/headers/set/size.hpp.html @@ -1,19 +1,24 @@ - - set/size.hpp - - - -
- The set/size.hpp header defines a macro to calculate the size of a set. -
-

Usage

-
- #include <boost/preprocessor/set/size.hpp> + + seq/size.hpp + + + +
+ The seq/size.hpp header defines a macro to calculate the size of a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/size.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/subset.hpp.html b/doc/headers/set/subset.hpp.html index 6224951..f49fb6d 100644 --- a/doc/headers/set/subset.hpp.html +++ b/doc/headers/set/subset.hpp.html @@ -1,19 +1,24 @@ - - set/subset.hpp - - - -
- The set/subset.hpp header defines a macro that extracts a subset from a set. -
-

Usage

-
- #include <boost/preprocessor/set/subset.hpp> + + seq/subseq.hpp + + + +
+ The seq/subseq.hpp header defines a macro that extracts a subseq from a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/subseq.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/to_array.hpp.html b/doc/headers/set/to_array.hpp.html index 309ab11..28b28a6 100644 --- a/doc/headers/set/to_array.hpp.html +++ b/doc/headers/set/to_array.hpp.html @@ -1,19 +1,25 @@ - - set/to_array.hpp - - - -
- The set/to_array.hpp header defines a macro that converts a set to an array. -
-

Usage

-
- #include <boost/preprocessor/set/to_array.hpp> + + seq/to_array.hpp + + + +
+ The seq/to_array.hpp header defines a macro that converts a seq to + an array.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/to_array.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/to_tuple.hpp.html b/doc/headers/set/to_tuple.hpp.html index 71b26df..fed81dd 100644 --- a/doc/headers/set/to_tuple.hpp.html +++ b/doc/headers/set/to_tuple.hpp.html @@ -1,19 +1,25 @@ - - set/to_tuple.hpp - - - -
- The set/to_tuple.hpp header defines a macro that converts a set to an tuple. -
-

Usage

-
- #include <boost/preprocessor/set/to_tuple.hpp> + + seq/to_tuple.hpp + + + +
+ The seq/to_tuple.hpp header defines a macro that converts a seq to + an tuple.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/to_tuple.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/set/transform.hpp.html b/doc/headers/set/transform.hpp.html index c104193..21045b7 100644 --- a/doc/headers/set/transform.hpp.html +++ b/doc/headers/set/transform.hpp.html @@ -1,20 +1,26 @@ - - set/transform.hpp - - - -
- The set/transform.hpp header defines macros to transform a set. -
-

Usage

-
- #include <boost/preprocessor/set/transform.hpp> + + seq/transform.hpp + + + +
+ The seq/transform.hpp header defines macros to transform a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/seq/transform.hpp> +
+

+ Contents +

- + diff --git a/doc/headers/tuple/to_set.hpp.html b/doc/headers/tuple/to_set.hpp.html index bdd0e42..d347942 100644 --- a/doc/headers/tuple/to_set.hpp.html +++ b/doc/headers/tuple/to_set.hpp.html @@ -1,19 +1,25 @@ - - tuple/to_set.hpp - - - -
- The tuple/to_set.hpp header defines a macro that converts a tuple to a set. -
-

Usage

-
- #include <boost/preprocessor/tuple/to_set.hpp> + + tuple/to_seq.hpp + + + +
+ The tuple/to_seq.hpp header defines a macro that converts a tuple + to a seq.
-

Contents

+

+ Usage +

+
+ #include <boost/preprocessor/tuple/to_seq.hpp> +
+

+ Contents +

- + diff --git a/doc/index.html b/doc/index.html index b509b64..5fd2436 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,13 +1,14 @@ - - Boost.Preprocessor - - - - - - - - .. - + + Boost.Preprocessor + + + + + + + + + .. + diff --git a/doc/ref.html b/doc/ref.html index 4885308..8c199fe 100644 --- a/doc/ref.html +++ b/doc/ref.html @@ -1,269 +1,510 @@ - - ref.html - - - - -

Reference [back]

- - - \ No newline at end of file + + ref.html + + + + +

+ Reference [back] +

+ + + diff --git a/doc/ref/config_extended_line_info.html b/doc/ref/config_extended_line_info.html index 9ff752f..d4ddb23 100644 --- a/doc/ref/config_extended_line_info.html +++ b/doc/ref/config_extended_line_info.html @@ -1,33 +1,43 @@ - - 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

+ + 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

+

+ Arguments +

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

Remarks

+

+ Remarks +

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

See Also

+

+ See Also +

- + diff --git a/doc/ref/limit_set.html b/doc/ref/limit_set.html index beff5fa..2fca035 100644 --- a/doc/ref/limit_set.html +++ b/doc/ref/limit_set.html @@ -1,23 +1,30 @@ - - BOOST_PP_LIMIT_SET - - - -
- The BOOST_PP_LIMIT_SET macro defines the maximum set size supported by the library. -
-

Usage

-
- BOOST_PP_LIMIT_SET + + BOOST_PP_LIMIT_SEQ + + + +
+ The BOOST_PP_LIMIT_SEQ macro defines the maximum seq size + supported by the library.
-

Remarks

+

+ Usage +

+
+ BOOST_PP_LIMIT_SEQ +
+

+ Remarks +

This macro currently expands to 256.
-

Requirements

+

+ Requirements +

- + diff --git a/doc/ref/set_cat.html b/doc/ref/set_cat.html index a1b73fb..eef1e16 100644 --- a/doc/ref/set_cat.html +++ b/doc/ref/set_cat.html @@ -1,45 +1,60 @@ - - BOOST_PP_SET_CAT - - - -
- The BOOST_PP_SET_CAT macro concatenates all elements in a set. -
-

Usage

-
- BOOST_PP_SET_CAT(list) + + BOOST_PP_SEQ_CAT + + + +
+ The BOOST_PP_SEQ_CAT macro concatenates all elements in a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_CAT(list) +
+

+ Arguments +

-
set
+
seq
- The set whose elements are to be concatenated. + The seq whose elements are to be concatenated.
-

Remarks

+

+ Remarks +

Elements are concatenated left-to-right starting with index 0.
- For maximum efficiency, use BOOST_PP_SET_CAT_S. + For maximum efficiency, use BOOST_PP_SEQ_CAT_S.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

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

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/cat.hpp>
 
-#define SET (a)(b)(c)
+#define SEQ (a)(b)(c)
 
-BOOST_PP_SET_CAT(SET) // expands to abc
-
- +BOOST_PP_SEQ_CAT(SEQ) // expands to abc +
+
+ diff --git a/doc/ref/set_cat_s.html b/doc/ref/set_cat_s.html index 79300d0..29650f1 100644 --- a/doc/ref/set_cat_s.html +++ b/doc/ref/set_cat_s.html @@ -1,39 +1,50 @@ - - BOOST_PP_SET_CAT_S - - - -
- The BOOST_PP_SET_CAT_S macro concatenates all elements in a set.  - It reenters BOOST_PP_SET_FOLD_LEFT with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_CAT_S(s, list) + + BOOST_PP_SEQ_CAT_S + + + +
+ The BOOST_PP_SEQ_CAT_S macro concatenates all elements in a seq.  + It reenters BOOST_PP_SEQ_FOLD_LEFT with maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_CAT_S(s, list) +
+

+ Arguments +

s
- The next available BOOST_PP_SET_FOLD_LEFT fold step. + The next available BOOST_PP_SEQ_FOLD_LEFT fold step.
-
set
+
seq
- The set whose elements are to be concatenated. + The seq whose elements are to be concatenated.
-

Remarks

+

+ Remarks +

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

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

- + diff --git a/doc/ref/set_elem.html b/doc/ref/set_elem.html index 4653c9f..3cb8c04 100644 --- a/doc/ref/set_elem.html +++ b/doc/ref/set_elem.html @@ -1,42 +1,54 @@ - - BOOST_PP_SET_ELEM - - - -
- The BOOST_PP_SET_ELEM macro extracts an element from a set. -
-

Usage

-
- BOOST_PP_SET_ELEM(i, list) + + BOOST_PP_SEQ_ELEM + + + +
+ The BOOST_PP_SEQ_ELEM macro extracts an element from a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_ELEM(i, list) +
+

+ Arguments +

i
The zero-based index of the element to be extracted.
-
set
+
seq
- The set from which an element is to be extracted. + The seq from which an element is to be extracted.
-

Remarks

+

+ Remarks +

- The index i must be in the range of 0 to BOOST_PP_SET_SIZE(set) - 1. + The index i must be in the range of 0 to BOOST_PP_SEQ_SIZE(seq) + - 1.
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/elem.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/elem.hpp>
 
-BOOST_PP_SET_ELEM(1, (a)(b)(c)) // expands to b
+BOOST_PP_SEQ_ELEM(1, (a)(b)(c)) // expands to b
 
-#define SET \
+#define SEQ \
    (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \
    (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \
    (20)(21)(22)(23)(24)(25)(26)(27)(28)(29) \
@@ -49,7 +61,8 @@
    (90)(91)(92)(93)(94)(95)(96)(97)(98)(99) \
    /**/
 
-BOOST_PP_SET_ELEM(88, SET) // expands to 88
-
- +BOOST_PP_SEQ_ELEM(88, SEQ) // expands to 88 +
+
+ diff --git a/doc/ref/set_enum.html b/doc/ref/set_enum.html index 39a7b7e..4d17a00 100644 --- a/doc/ref/set_enum.html +++ b/doc/ref/set_enum.html @@ -1,42 +1,55 @@ - - BOOST_PP_SET_ENUM - - - -
- The BOOST_PP_SET_ENUM macro enumerates the elements in a set. -
-

Usage

-
- BOOST_PP_SET_ENUM(set) + + BOOST_PP_SEQ_ENUM + + + +
+ The BOOST_PP_SEQ_ENUM macro enumerates the elements in a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_ENUM(seq) +
+

+ Arguments +

-
set
+
seq
- The set from whose elements are to be enumerated. + The seq from whose elements are to be enumerated.
-

Remarks

+

+ Remarks +

- This macro expands to a comma-separated list of the elements in set.  - For example, BOOST_PP_SET_ENUM((x)(y)(z)) expands to... + This macro expands to a comma-separated list of the elements in seq.  + For example, BOOST_PP_SEQ_ENUM((x)(y)(z)) expands + to...
x, y, z
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/enum.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/enum.hpp>
 
-#define SET (B)(O)(O)(S)(T)
+#define SEQ (B)(O)(O)(S)(T)
 
-BOOST_PP_SET_ENUM(SET) // expands to B, O, O, S, T
-
- +BOOST_PP_SEQ_ENUM(SEQ) // expands to B, O, O, S, T +
+
+ diff --git a/doc/ref/set_filter.html b/doc/ref/set_filter.html index d381d2e..e3ae7f2 100644 --- a/doc/ref/set_filter.html +++ b/doc/ref/set_filter.html @@ -1,63 +1,82 @@ - - BOOST_PP_SET_FILTER - - - -
- The BOOST_PP_SET_FILTER macro filters a set according to a supplied criterion. -
-

Usage

-
- BOOST_PP_SET_FILTER(pred, data, set) + + BOOST_PP_SEQ_FILTER + + + +
+ The BOOST_PP_SEQ_FILTER macro filters a seq according to a + supplied criterion.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FILTER(pred, data, seq) +
+

+ Arguments +

pred
- A ternary predicate of the form pred(s, data, elem).  - This predicate is expanded by BOOST_PP_SET_FILTER for each element in set with the next available BOOST_PP_SET_FOLD_LEFT fold step, - the auxiliary data, and the current element in set.  - 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 set. + A ternary predicate of the form pred(s, data, elem).  + This predicate is expanded by BOOST_PP_SEQ_FILTER for each element in seq + with the next available BOOST_PP_SEQ_FOLD_LEFT fold step, the auxiliary data, + and the current element in seq.  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 seq.
data
Auxiliary data passed to pred.
-
set
+
seq
- The set to be filtered. + The seq to be filtered.
-

Remarks

+

+ Remarks +

- This macro expands pred for each element in set.  - It builds a new set out of each element for which pred returns non-zero. + This macro expands pred for each element in seq.  It builds + a new seq out of each element for which pred returns non-zero.
- For maximum efficiency, use BOOST_PP_SET_FILTER_S. + For maximum efficiency, use BOOST_PP_SEQ_FILTER_S.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/comparison/less_equal.hpp>
-#include <boost/preprocessor/set/filter.hpp>
+#include <boost/preprocessor/seq/filter.hpp>
 
-#define SET (1)(3)(2)(5)
+#define SEQ (1)(3)(2)(5)
 
 #define PRED(s, data, elem) BOOST_PP_LESS_EQUAL(elem, data)
 
-BOOST_PP_SET_FILTER(PRED, 3, SET)
+BOOST_PP_SEQ_FILTER(PRED, 3, SEQ)
    // expands to (1)(3)(2)
-
- +
+
+ diff --git a/doc/ref/set_filter_s.html b/doc/ref/set_filter_s.html index 02b1cc7..079dce1 100644 --- a/doc/ref/set_filter_s.html +++ b/doc/ref/set_filter_s.html @@ -1,53 +1,68 @@ - - BOOST_PP_SET_FILTER_S - - - -
- The BOOST_PP_SET_FILTER_S macro filters a set according to a supplied criterion.  - It reenters BOOST_PP_SET_FOLD_LEFT with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_FILTER_S(s, pred, data, set) + + BOOST_PP_SEQ_FILTER_S + + + +
+ The BOOST_PP_SEQ_FILTER_S macro filters a seq according to a + supplied criterion.  It reenters BOOST_PP_SEQ_FOLD_LEFT with + maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FILTER_S(s, pred, data, seq) +
+

+ Arguments +

s
- The next available BOOST_PP_SET_FOLD_LEFT fold step. + The next available BOOST_PP_SEQ_FOLD_LEFT fold step.
pred
- A ternary predicate of the form pred(s, data, elem).  - This predicate is expanded by BOOST_PP_SET_FILTER for each element in set with the next available BOOST_PP_SET_FOLD_LEFT fold step, - the auxiliary data, and the current element in set.  - 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 set. + A ternary predicate of the form pred(s, data, elem).  + This predicate is expanded by BOOST_PP_SEQ_FILTER for each element in seq + with the next available BOOST_PP_SEQ_FOLD_LEFT fold step, the auxiliary data, + and the current element in seq.  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 seq.
data
Auxiliary data passed to pred.
-
set
+
seq
- The set to be filtered. + The seq to be filtered.
-

Remarks

+

+ Remarks +

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

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

- + diff --git a/doc/ref/set_first_n.html b/doc/ref/set_first_n.html index 2c73099..4c5335f 100644 --- a/doc/ref/set_first_n.html +++ b/doc/ref/set_first_n.html @@ -1,17 +1,22 @@ - - BOOST_PP_SET_FIRST_N - - - -
- The BOOST_PP_SET_FIRST_N macro expands to a set of the first n elements of a set. -
-

Usage

-
- BOOST_PP_SET_FIRST_N(n, list) + + BOOST_PP_SEQ_FIRST_N + + + +
+ The BOOST_PP_SEQ_FIRST_N macro expands to a seq of the first n + elements of a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FIRST_N(n, list) +
+

+ Arguments +

n
@@ -19,28 +24,40 @@
list
- The set from which the elements are extracted. + The seq from which the elements are extracted.
-

Remarks

+

+ Remarks +

- This macro extracts n elements from the beginning of set and returns them as a new set + This macro extracts n elements from the beginning of seq and + returns them as a new seq
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/first_n.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/first_n.hpp>
 
-#define SET (a)(b)(c)(d)(e)
+#define SEQ (a)(b)(c)(d)(e)
 
-BOOST_PP_SET_FIRST_N(2, SET) // expands to (a)(b)
-
- +BOOST_PP_SEQ_FIRST_N(2, SEQ) // expands to (a)(b) +
+
+ diff --git a/doc/ref/set_fold_left.html b/doc/ref/set_fold_left.html index b339f51..42a8fac 100644 --- a/doc/ref/set_fold_left.html +++ b/doc/ref/set_fold_left.html @@ -1,62 +1,79 @@ - - BOOST_PP_SET_FOLD_LEFT - - - -
- The BOOST_PP_SET_FOLD_LEFT macro folds (or accumulates) the elements of a set left-to-right. -
-

Usage

-
- BOOST_PP_SET_FOLD_LEFT(op, state, set) + + BOOST_PP_SEQ_FOLD_LEFT + + + +
+ The BOOST_PP_SEQ_FOLD_LEFT macro folds (or accumulates) the elements of + a seq left-to-right.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOLD_LEFT(op, state, seq) +
+

+ Arguments +

op
- A ternary operation of the form op(s, state, elem).  - This macro is called for each element in set--each time returning a new state.  - This operation is expanded by BOOST_PP_SET_FOLD_LEFT with the next available fold step, - the current state, and the current element. + A ternary operation of the form op(s, state, elem).  + This macro is called for each element in seq--each time returning a new state.  + This operation is expanded by BOOST_PP_SEQ_FOLD_LEFT with the next + available fold step, the current state, and the current element.
state
The initial state of the fold.
-
set
+
seq
- The set to be folded. + The seq to be folded.
-

Remarks

+

+ Remarks +

- For the set, (0)(1)(2), this macro expands to: + For the seq, (0)(1)(2), this macro expands to:
- op(s, op(s, op(s, state, 0), 1), 2) + op(s, op(s, op(s, state, 0), + 1), 2)
- For maximum efficiency, BOOST_PP_SET_FOLD_LEFT can be reentered with BOOST_PP_SET_FOLD_LEFT_s. + For maximum efficiency, BOOST_PP_SEQ_FOLD_LEFT can be reentered with BOOST_PP_SEQ_FOLD_LEFT_s.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/set/fold_left.hpp>
+#include <boost/preprocessor/seq/fold_left.hpp>
 
-#define SET (b)(o)(o)(s)(t)
+#define SEQ (b)(o)(o)(s)(t)
 
 #define OP(s, state, x) BOOST_PP_CAT(state, x)
 
-BOOST_PP_SET_FOLD_LEFT(OP, BOOST_PP_SET_HEAD(SET), BOOST_PP_SET_TAIL(SET)) // expands to boost
-
- +BOOST_PP_SEQ_FOLD_LEFT(OP, BOOST_PP_SEQ_HEAD(SEQ), BOOST_PP_SEQ_TAIL(SEQ)) // expands to boost +
+
+ diff --git a/doc/ref/set_fold_left_s.html b/doc/ref/set_fold_left_s.html index 002bad2..431e0f0 100644 --- a/doc/ref/set_fold_left_s.html +++ b/doc/ref/set_fold_left_s.html @@ -1,68 +1,85 @@ - - BOOST_PP_SET_FOLD_LEFT_s - - - -
- The BOOST_PP_SET_FOLD_LEFT_s macro folds (or accumulates) the elements of a set left-to-right.  - It reenters BOOST_PP_SET_FOLD_LEFT with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_FOLD_LEFT_ ## s(op, state, set) + + BOOST_PP_SEQ_FOLD_LEFT_s + + + +
+ The BOOST_PP_SEQ_FOLD_LEFT_s macro folds (or accumulates) the + elements of a seq left-to-right.  It reenters BOOST_PP_SEQ_FOLD_LEFT + with maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOLD_LEFT_ ## s(op, state, seq) +
+

+ Arguments +

s
- The next available BOOST_PP_SET_FOLD_LEFT fold step. + The next available BOOST_PP_SEQ_FOLD_LEFT fold step.
op
- A ternary operation of the form op(s, state, elem).  - This macro is called for each element in set--each time returning a new state.  - This operation is expanded by BOOST_PP_SET_FOLD_LEFT with the next available fold step, - the current state, and the current element. + A ternary operation of the form op(s, state, elem).  + This macro is called for each element in seq--each time returning a new state.  + This operation is expanded by BOOST_PP_SEQ_FOLD_LEFT with the next + available fold step, the current state, and the current element.
state
The initial state of the fold.
-
set
+
seq
- The set to be folded. + The seq to be folded.
-

Remarks

+

+ Remarks +

- For the set, (0)(1)(2), this macro expands to: + For the seq, (0)(1)(2), this macro expands to:
- op(s, op(s, op(s, state, 0), 1), 2) + op(s, op(s, op(s, state, 0), + 1), 2)
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/set/fold_left.hpp>
-#include <boost/preprocessor/set/set.hpp>
+#include <boost/preprocessor/seq/fold_left.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
 
 #define S1 (a)(b)(c)
 #define S2 (S1)(S1)(S1)
 
-#define OP(s, state, x) state (BOOST_PP_SET_FOLD_LEFT_ ## s(OP_2, _, x))
+#define OP(s, state, x) state (BOOST_PP_SEQ_FOLD_LEFT_ ## s(OP_2, _, x))
 #define OP_2(s, state, x) BOOST_PP_CAT(state, x)
 
-BOOST_PP_SET_FOLD_LEFT(OP, BOOST_PP_SET_NIL, S2)
+BOOST_PP_SEQ_FOLD_LEFT(OP, BOOST_PP_SEQ_NIL, S2)
 // expands to (_abc)(_abc)(_abc)
-
- +
+
+ diff --git a/doc/ref/set_fold_right.html b/doc/ref/set_fold_right.html index da56135..55f9666 100644 --- a/doc/ref/set_fold_right.html +++ b/doc/ref/set_fold_right.html @@ -1,64 +1,81 @@ - - BOOST_PP_SET_FOLD_RIGHT - - - -
- The BOOST_PP_SET_FOLD_RIGHT macro folds (or accumulates) the elements of a set right-to-left. -
-

Usage

-
- BOOST_PP_SET_FOLD_RIGHT(op, state, set) + + BOOST_PP_SEQ_FOLD_RIGHT + + + +
+ The BOOST_PP_SEQ_FOLD_RIGHT macro folds (or accumulates) the elements of + a seq right-to-left.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOLD_RIGHT(op, state, seq) +
+

+ Arguments +

op
- A ternary operation of the form op(s, state, elem).  - This macro is called for each element in set--each time returning a new state.  - This operation is expanded by BOOST_PP_SET_FOLD_RIGHT with the next available fold step, - the current state, and the current element. + A ternary operation of the form op(s, state, elem).  + This macro is called for each element in seq--each time returning a new state.  + This operation is expanded by BOOST_PP_SEQ_FOLD_RIGHT with the next + available fold step, the current state, and the current element.
state
The initial state of the fold.
-
set
+
seq
- The set to be folded. + The seq to be folded.
-

Remarks

+

+ Remarks +

- For the set, (0)(1)(2), this macro expands to: + For the seq, (0)(1)(2), this macro expands to:
- op(s, op(s, op(s, state, 2), 1), 0) + op(s, op(s, op(s, state, 2), + 1), 0)
- For maximum efficiency, BOOST_PP_SET_FOLD_RIGHT can be reentered with BOOST_PP_SET_FOLD_RIGHT_s. + For maximum efficiency, BOOST_PP_SEQ_FOLD_RIGHT can be reentered with BOOST_PP_SEQ_FOLD_RIGHT_s.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/set/elem.hpp>
-#include <boost/preprocessor/set/fold_right.hpp>
-#include <boost/preprocessor/set/pop_back.hpp>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/preprocessor/seq/fold_right.hpp>
+#include <boost/preprocessor/seq/pop_back.hpp>
 
-#define SET (t)(s)(o)(o)(b)
+#define SEQ (t)(s)(o)(o)(b)
 
 #define OP(s, state, x) BOOST_PP_CAT(state, x)
 
-BOOST_PP_SET_FOLD_RIGHT(OP, BOOST_PP_SET_ELEM(4, SET), BOOST_PP_SET_POP_BACK(SET)) // expands to boost
-
- +BOOST_PP_SEQ_FOLD_RIGHT(OP, BOOST_PP_SEQ_ELEM(4, SEQ), BOOST_PP_SEQ_POP_BACK(SEQ)) // expands to boost +
+
+ diff --git a/doc/ref/set_fold_right_s.html b/doc/ref/set_fold_right_s.html index aa7607c..c92bd08 100644 --- a/doc/ref/set_fold_right_s.html +++ b/doc/ref/set_fold_right_s.html @@ -1,69 +1,86 @@ - - BOOST_PP_SET_FOLD_RIGHT_s - - - -
- The BOOST_PP_SET_FOLD_RIGHT_s macro folds (or accumulates) the elements of a set right-to-left.  - It reenters BOOST_PP_SET_FOLD_RIGHT with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_FOLD_RIGHT_ ## s(op, state, set) + + BOOST_PP_SEQ_FOLD_RIGHT_s + + + +
+ The BOOST_PP_SEQ_FOLD_RIGHT_s macro folds (or accumulates) the + elements of a seq right-to-left.  It reenters BOOST_PP_SEQ_FOLD_RIGHT + with maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOLD_RIGHT_ ## s(op, state, seq) +
+

+ Arguments +

s
- The next available BOOST_PP_SET_FOLD_LEFT fold step. + The next available BOOST_PP_SEQ_FOLD_LEFT fold step.
op
- A ternary operation of the form op(s, state, elem).  - This macro is called for each element in set--each time returning a new state.  - This operation is expanded by BOOST_PP_SET_FOLD_RIGHT with the next available fold step, - the current state, and the current element. + A ternary operation of the form op(s, state, elem).  + This macro is called for each element in seq--each time returning a new state.  + This operation is expanded by BOOST_PP_SEQ_FOLD_RIGHT with the next + available fold step, the current state, and the current element.
state
The initial state of the fold.
-
set
+
seq
- The set to be folded. + The seq to be folded.
-

Remarks

+

+ Remarks +

- For the set, (0)(1)(2), this macro expands to: + For the seq, (0)(1)(2), this macro expands to:
- op(s, op(s, op(s, state, 2), 1), 0) + op(s, op(s, op(s, state, 2), + 1), 0)
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/set/fold_left.hpp>
-#include <boost/preprocessor/set/fold_right.hpp>
-#include <boost/preprocessor/set/set.hpp>
+#include <boost/preprocessor/seq/fold_left.hpp>
+#include <boost/preprocessor/seq/fold_right.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
 
 #define S1 (a)(b)(c)
 #define S2 (S1)(S1)(S1)
 
-#define OP(s, state, x) state (BOOST_PP_SET_FOLD_RIGHT_ ## s(OP_2, _, x))
+#define OP(s, state, x) state (BOOST_PP_SEQ_FOLD_RIGHT_ ## s(OP_2, _, x))
 #define OP_2(s, state, x) BOOST_PP_CAT(state, x)
 
-BOOST_PP_SET_FOLD_LEFT(OP, BOOST_PP_SET_NIL, S2)
+BOOST_PP_SEQ_FOLD_LEFT(OP, BOOST_PP_SEQ_NIL, S2)
 // expands to (_cba)(_cba)(_cba)
-
- +
+
+ diff --git a/doc/ref/set_for_each.html b/doc/ref/set_for_each.html index 37d0573..06dad15 100644 --- a/doc/ref/set_for_each.html +++ b/doc/ref/set_for_each.html @@ -1,62 +1,79 @@ - - BOOST_PP_SET_FOR_EACH - - - -
- The BOOST_PP_SET_FOR_EACH macro repeats a macro for each element in a set. -
-

Usage

-
- BOOST_PP_SET_FOR_EACH(macro, data, set) + + BOOST_PP_SEQ_FOR_EACH + + + +
+ The BOOST_PP_SEQ_FOR_EACH macro repeats a macro for each element in a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOR_EACH(macro, data, seq) +
+

+ Arguments +

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

Remarks

+

+ Remarks +

- This macro is a repetition construct.  - If set is (a)(b)(c), it expands to the sequence: + This macro is a repetition construct.  If seq is (a)(b)(c), + it expands to the sequence:
- macro(r, data, a) macro(r, data, b) macro(r, data, c) + macro(r, data, a) macro(r, data, + b) macro(r, data, c)
- For maximum efficiency, use BOOST_PP_SET_FOR_EACH_R. + For maximum efficiency, use BOOST_PP_SEQ_FOR_EACH_R.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/set/for_each.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
 
-#define SET (w)(x)(y)(z)
+#define SEQ (w)(x)(y)(z)
 
 #define MACRO(r, data, elem) BOOST_PP_CAT(elem, data)
 
-BOOST_PP_SET_FOR_EACH(MACRO, _, SET) // expands to w_ x_ y_ z_
-
- +BOOST_PP_SEQ_FOR_EACH(MACRO, _, SEQ) // expands to w_ x_ y_ z_ +
+
+ diff --git a/doc/ref/set_for_each_i.html b/doc/ref/set_for_each_i.html index cad16e4..a163170 100644 --- a/doc/ref/set_for_each_i.html +++ b/doc/ref/set_for_each_i.html @@ -1,62 +1,80 @@ - - BOOST_PP_SET_FOR_EACH_I - - - -
- The BOOST_PP_SET_FOR_EACH_I macro repeats a macro for each element in a set. -
-

Usage

-
- BOOST_PP_SET_FOR_EACH_I(macro, data, set) + + BOOST_PP_SEQ_FOR_EACH_I + + + +
+ The BOOST_PP_SEQ_FOR_EACH_I macro repeats a macro for each element in a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) +
+

+ Arguments +

macro
- A macro of the form macro(r, data, i, elem).  - This macro is expanded by BOOST_PP_SET_FOR_EACH_I with each element in set.  - It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, the index of the current element, and the current element. + A macro of the form macro(r, data, i, elem).  + This macro is expanded by BOOST_PP_SEQ_FOR_EACH_I with each element in seq.  + 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.
-
set
+
seq
- The set for which macro will be invoked on each element. + The seq for which macro will be invoked on each element.
-

Remarks

+

+ Remarks +

- This macro is a repetition construct.  - If set is (a)(b)(c), it expands to the sequence: + This macro is a repetition construct.  If seq is (a)(b)(c), + it expands to the sequence:
- macro(r, data, 0, a) macro(r, data, 1, b) macro(r, data, 2, c) + macro(r, data, 0, a) macro(r, data, + 1, b) macro(r, data, 2, c)
- For maximum efficiency, use BOOST_PP_SET_FOR_EACH_I_R + For maximum efficiency, use BOOST_PP_SEQ_FOR_EACH_I_R
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/set/for_each_i.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
 
-#define SET (a)(b)(c)(d)
+#define SEQ (a)(b)(c)(d)
 
 #define MACRO(r, data, i, elem) BOOST_PP_CAT(elem, BOOST_PP_CAT(data, i))
 
-BOOST_PP_SET_FOR_EACH_I(MACRO, _, SET) // expands to a_0 b_1 c_2 d_3
-
- +BOOST_PP_SEQ_FOR_EACH_I(MACRO, _, SEQ) // expands to a_0 b_1 c_2 d_3 +
+
+ diff --git a/doc/ref/set_for_each_i_r.html b/doc/ref/set_for_each_i_r.html index 2ae499e..2cf4766 100644 --- a/doc/ref/set_for_each_i_r.html +++ b/doc/ref/set_for_each_i_r.html @@ -1,18 +1,22 @@ - - BOOST_PP_SET_FOR_EACH_I_R - - - -
- The BOOST_PP_SET_FOR_EACH_I_R macro repeats a macro for each element in a set.  - It reenters BOOST_PP_FOR with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_FOR_EACH_I_R(r, macro, data, set) + + BOOST_PP_SEQ_FOR_EACH_I_R + + + +
+ The BOOST_PP_SEQ_FOR_EACH_I_R macro repeats a macro for each element in + a seq.  It reenters BOOST_PP_FOR with maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) +
+

+ Arguments +

r
@@ -20,34 +24,44 @@
macro
- A macro of the form macro(r, data, i, elem).  - This macro is expanded by BOOST_PP_SET_FOR_EACH_I with each element in set.  - It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, the index of the current element, and the current element. + A macro of the form macro(r, data, i, elem).  + This macro is expanded by BOOST_PP_SEQ_FOR_EACH_I with each element in seq.  + 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.
-
set
+
seq
- The set for which macro will be invoked on each element. + The seq for which macro will be invoked on each element.
-

Remarks

+

+ Remarks +

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

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

- + diff --git a/doc/ref/set_for_each_product.html b/doc/ref/set_for_each_product.html index a836314..a3fd311 100644 --- a/doc/ref/set_for_each_product.html +++ b/doc/ref/set_for_each_product.html @@ -1,73 +1,89 @@ - - BOOST_PP_SET_FOR_EACH_PRODUCT - - - -
- The BOOST_PP_SET_FOR_EACH_PRODUCT macro repeats a macro for each cartesian product of several sets. -
-

Usage

-
- BOOST_PP_SET_FOR_EACH_PRODUCT(macro, sets) + + BOOST_PP_SEQ_FOR_EACH_PRODUCT + + + +
+ The BOOST_PP_SEQ_FOR_EACH_PRODUCT macro repeats a macro for each + cartesian product of several seqs.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(macro, seqs) +
+

+ 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 sets.  - It is expanded with the next available BOOST_PP_FOR repetition and a set containing a cartesian product.  + The binary macro of the form macro(r, product).  This + macro is expanded by BOOST_PP_FOR_EACH_PRODUCT with each cartesian + product in seqs.  It is expanded with the next available BOOST_PP_FOR + repetition and a seq containing a cartesian product. 
-
sets
+
seqs
- A set of sets from which cartesian products are obtained. + A seq of seqs from which cartesian products are obtained.
-

Remarks

+

+ Remarks +

- This macro is a repetition construct.  - If two sets are (a)(b)(c) and (x)(y)(z), - this macro will produce the following sequence: + This macro is a repetition construct.  If two seqs are (a)(b)(c) + and (x)(y)(z), 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, (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))
- For maximum efficiency, use BOOST_PP_SET_FOR_EACH_PRODUCT_R. + For maximum efficiency, use BOOST_PP_SEQ_FOR_EACH_PRODUCT_R.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/for_each_product.hpp>
-#include <boost/preprocessor/set/to_tuple.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/for_each_product.hpp>
+#include <boost/preprocessor/seq/to_tuple.hpp>
 
 #define S1 (a)(b)(c)
 #define S2 (x)(y)(z)
 #define S3 (p)(q)
 
-#define MACRO(r, product) BOOST_PP_SET_TO_TUPLE(product)
+#define MACRO(r, product) BOOST_PP_SEQ_TO_TUPLE(product)
 
-BOOST_PP_SET_FOR_EACH_PRODUCT(MACRO, (S1)(S2)(S3))
+BOOST_PP_SEQ_FOR_EACH_PRODUCT(MACRO, (S1)(S2)(S3))
    // expands to:
    //   (a, x, p) (a, x, q) (a, y, p) (a, y, q) (a, z, p) (a, z, q)
    //   (b, x, p) (b, x, q) (b, y, p) (b, y, q) (b, z, p) (b, z, q)
    //   (c, x, p) (c, x, q) (c, y, p) (c, y, q) (c, z, p) (c, z, q)
-
- +
+
+ diff --git a/doc/ref/set_for_each_product_r.html b/doc/ref/set_for_each_product_r.html index df65d36..cbc297b 100644 --- a/doc/ref/set_for_each_product_r.html +++ b/doc/ref/set_for_each_product_r.html @@ -1,18 +1,23 @@ - - BOOST_PP_SET_FOR_EACH_PRODUCT_R - - - -
- The BOOST_PP_SET_FOR_EACH_PRODUCT_R macro repeats a macro for each cartesian product of several sets.  - It reenters BOOST_PP_FOR with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_FOR_EACH_PRODUCT_R(r, macro, sets) + + BOOST_PP_SEQ_FOR_EACH_PRODUCT_R + + + +
+ The BOOST_PP_SEQ_FOR_EACH_PRODUCT_R macro repeats a macro for each + cartesian product of several seqs.  It reenters BOOST_PP_FOR + with maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT_R(r, macro, seqs) +
+

+ Arguments +

r
@@ -20,39 +25,46 @@
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 sets.  - It is expanded with the next available BOOST_PP_FOR repetition and a set containing a cartesian product.  + The binary macro of the form macro(r, product).  This + macro is expanded by BOOST_PP_FOR_EACH_PRODUCT with each cartesian + product in seqs.  It is expanded with the next available BOOST_PP_FOR + repetition and a seq containing a cartesian product. 
-
sets
+
seqs
- A set of sets from which cartesian products are obtained. + A seq of seqs from which cartesian products are obtained.
-

Remarks

+

+ Remarks +

- This macro is a repetition construct.  - If two sets are (a)(b)(c) and (x)(y)(z), - this macro will produce the following sequence: + This macro is a repetition construct.  If two seqs are (a)(b)(c) + and (x)(y)(z), 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, (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

+

+ See Also +

-

Requirements

+

+ Requirements +

- + diff --git a/doc/ref/set_for_each_r.html b/doc/ref/set_for_each_r.html index de600f9..99cef2c 100644 --- a/doc/ref/set_for_each_r.html +++ b/doc/ref/set_for_each_r.html @@ -1,18 +1,22 @@ - - BOOST_PP_SET_FOR_EACH_R - - - -
- The BOOST_PP_SET_FOR_EACH_R macro repeats a macro for each element in a set.  - It reenters BOOST_PP_FOR with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_FOR_EACH_R(r, macro, data, set) + + BOOST_PP_SEQ_FOR_EACH_R + + + +
+ The BOOST_PP_SEQ_FOR_EACH_R macro repeats a macro for each element in a seq.  + It reenters BOOST_PP_FOR with maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) +
+

+ Arguments +

r
@@ -20,34 +24,43 @@
macro
- A ternary macro of the form macro(r, data, elem).  - This macro is expanded by BOOST_PP_SET_FOR_EACH with each element in set.  - It is expanded with the next available BOOST_PP_FOR repetition, the auxiliary data, and the current element. + A ternary macro of the form macro(r, data, elem).  + This macro is expanded by BOOST_PP_SEQ_FOR_EACH with each element in seq.  + It is expanded with the next available BOOST_PP_FOR repetition, the + auxiliary data, and the current element.
data
Auxiliary data passed to macro.
-
set
+
seq
- The set for which macro will be invoked on each element. + The seq for which macro will be invoked on each element.
-

Remarks

+

+ Remarks +

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

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

- + diff --git a/doc/ref/set_head.html b/doc/ref/set_head.html index 9cfac73..a04bea3 100644 --- a/doc/ref/set_head.html +++ b/doc/ref/set_head.html @@ -1,39 +1,52 @@ - - BOOST_PP_SET_HEAD - - - -
- The BOOST_PP_SET_HEAD macro expands to the first element in a set. -
-

Usage

-
- BOOST_PP_SET_HEAD(set) + + BOOST_PP_SEQ_HEAD + + + +
+ The BOOST_PP_SEQ_HEAD macro expands to the first element in a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_HEAD(seq) +
+

+ Arguments +

-
set
+
seq
- The set from which the first element is extracted. + The seq from which the first element is extracted.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/set.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/seq.hpp>
 
-#define SET (a)(b)(c)
+#define SEQ (a)(b)(c)
 
-BOOST_PP_SET_HEAD(SET) // expands to a
-BOOST_PP_SET_TAIL(SET) // expands to (b)(c)
-
- +BOOST_PP_SEQ_HEAD(SEQ) // expands to a +BOOST_PP_SEQ_TAIL(SEQ) // expands to (b)(c) +
+
+ diff --git a/doc/ref/set_insert.html b/doc/ref/set_insert.html index 7731f0d..b7ec7eb 100644 --- a/doc/ref/set_insert.html +++ b/doc/ref/set_insert.html @@ -1,47 +1,59 @@ - - BOOST_PP_SET_INSERT - - - -
- The BOOST_PP_SET_INSERT macro inserts an element into an set. -
-

Usage

-
- BOOST_PP_SET_INSERT(set, i, elem) + + BOOST_PP_SEQ_INSERT + + + +
+ The BOOST_PP_SEQ_INSERT macro inserts an element into an seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_INSERT(seq, i, elem) +
+

+ Arguments +

-
set
+
seq
- The set into which an element is to be inserted. + The seq into which an element is to be inserted.
i
- The zero-based position in set where an element is to be inserted.  - Valid values range from 0 to BOOST_PP_SET_SIZE(set) - 1. + The zero-based position in seq where an element is to be inserted.  + Valid values range from 0 to BOOST_PP_SEQ_SIZE(seq) - 1.
elem
The element to insert.
-

Remarks

+

+ Remarks +

This macro inserts elem before the element at index i.
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/insert.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/insert.hpp>
 
-#define SET (a)(b)(d)
+#define SEQ (a)(b)(d)
 
-BOOST_PP_SET_INSERT(SET, 2, c) // expands to (a)(b)(c)(d)
-
- +BOOST_PP_SEQ_INSERT(SEQ, 2, c) // expands to (a)(b)(c)(d) +
+
+ diff --git a/doc/ref/set_nil.html b/doc/ref/set_nil.html index 11ee413..58666bb 100644 --- a/doc/ref/set_nil.html +++ b/doc/ref/set_nil.html @@ -1,69 +1,89 @@ - - BOOST_PP_SET_NIL - - - -
- The BOOST_PP_SET_NIL macro is a placeholder macro for an empty set.  - It is only valid if it is elements are appended to the end of this empty "set."  -
-

Usage

+ + BOOST_PP_SEQ_NIL + + + +
+ The BOOST_PP_SEQ_NIL macro is a placeholder macro for an empty seq.  + It is only valid if it is elements are appended to the end of this empty + "seq."  +
+

+ Usage +

- BOOST_PP_SET_NIL + BOOST_PP_SEQ_NIL
-

Remarks

+

+ Remarks +

- This macro is a utility macro intended as a empty starting point for appending to the tail.  - It is not a nil set.  - When an element is appended to this macro, it expands on the element and to the element--thereby removing itself.  - For example, both BOOST_PP_SET_NIL(x) - and BOOST_PP_SET_PUSH_BACK(BOOST_PP_SET_NIL, x) expand to x. + This macro is a utility macro intended as a empty starting point for appending + to the tail.  It is not a nil seq.  When an element is + appended to this macro, it expands on the element and to the element--thereby + removing itself.  For example, both BOOST_PP_SEQ_NIL(x) and BOOST_PP_SEQ_PUSH_BACK(BOOST_PP_SEQ_NIL, + x) expand to x.
- If any BOOST_PP_SET_* macro (other than BOOST_PP_SET_PUSH_BACK) is invoked with an argument that contains BOOST_PP_SET_NIL, - the behavior is undefined and in most cases will result in obscure errors. + If any BOOST_PP_SEQ_* macro (other than BOOST_PP_SEQ_PUSH_BACK) + is invoked with an argument that contains BOOST_PP_SEQ_NIL, the behavior + is undefined and in most cases will result in obscure errors.
- The closest thing available to BOOST_PP_SET_NIL for appending to the head is BOOST_PP_EMPTY.  - After all the elements have been prepended, empty parenthesis can be invoked on the tail to remove the BOOST_PP_EMPTY.  - As with BOOST_PP_SET_NIL, passing an argument that contains BOOST_PP_EMPTY to any BOOST_PP_SET_* macro (other than BOOST_PP_SET_PUSH_FRONT) is undefined.  + The closest thing available to BOOST_PP_SEQ_NIL for appending to the + head is BOOST_PP_EMPTY.  After all the elements have been + prepended, empty parenthesis can be invoked on the tail to remove the BOOST_PP_EMPTY.  + As with BOOST_PP_SEQ_NIL, passing an argument that contains BOOST_PP_EMPTY + to any BOOST_PP_SEQ_* macro (other than BOOST_PP_SEQ_PUSH_FRONT) + is undefined. 
- (It is also possible to start with an extra element and pop it off when you have finished appending to it.) + (It is also possible to start with an extra element and pop it off when you + have finished appending to it.)
- In C99, neither of these macros are necessary since it is legal to pass empty arguments. + In C99, neither of these macros are necessary since it is legal to pass empty + arguments.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

- + diff --git a/doc/ref/set_pop_back.html b/doc/ref/set_pop_back.html index 1f00277..6bfad37 100644 --- a/doc/ref/set_pop_back.html +++ b/doc/ref/set_pop_back.html @@ -1,42 +1,57 @@ - - BOOST_PP_SET_POP_BACK - - - -
- The BOOST_PP_SET_POP_BACK macro pops an element from the end of a set. -
-

Usage

-
- BOOST_PP_SET_POP_BACK(set) + + BOOST_PP_SEQ_POP_BACK + + + +
+ The BOOST_PP_SEQ_POP_BACK macro pops an element from the end of a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_POP_BACK(seq) +
+

+ Arguments +

-
set
+
seq
- The set to pop an element from. + The seq to pop an element from.
-

Remarks

+

+ Remarks +

- This macro returns set after removing the last element.  + This macro returns seq after removing the last element. 
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/pop_back.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/pop_back.hpp>
 
-#define SET (a)(b)(c)
+#define SEQ (a)(b)(c)
 
-BOOST_PP_SET_POP_BACK(SET) // expands to (a)(b)
-
- +BOOST_PP_SEQ_POP_BACK(SEQ) // expands to (a)(b) +
+
+ diff --git a/doc/ref/set_pop_front.html b/doc/ref/set_pop_front.html index 18a217a..b330559 100644 --- a/doc/ref/set_pop_front.html +++ b/doc/ref/set_pop_front.html @@ -1,42 +1,57 @@ - - BOOST_PP_SET_POP_FRONT - - - -
- The BOOST_PP_SET_POP_FRONT macro pops an element from the beginning of a set. -
-

Usage

-
- BOOST_PP_SET_POP_FRONT(set) + + BOOST_PP_SEQ_POP_FRONT + + + +
+ The BOOST_PP_SEQ_POP_FRONT macro pops an element from the beginning of a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_POP_FRONT(seq) +
+

+ Arguments +

-
set
+
seq
- The set to pop an element from. + The seq to pop an element from.
-

Remarks

+

+ Remarks +

- This macro returns set after removing the first element.  + This macro returns seq after removing the first element. 
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/pop_front.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/pop_front.hpp>
 
-#define SET (a)(b)(c)
+#define SEQ (a)(b)(c)
 
-BOOST_PP_SET_POP_FRONT(SET) // expands to (b)(c)
-
- +BOOST_PP_SEQ_POP_FRONT(SEQ) // expands to (b)(c) +
+
+ diff --git a/doc/ref/set_push_back.html b/doc/ref/set_push_back.html index d2f1bb3..97b73b1 100644 --- a/doc/ref/set_push_back.html +++ b/doc/ref/set_push_back.html @@ -1,50 +1,65 @@ - - BOOST_PP_SET_PUSH_BACK - - - -
- The BOOST_PP_SET_PUSH_BACK macro pushes an element onto the end of a set. -
-

Usage

-
- BOOST_PP_SET_PUSH_BACK(set, elem) + + BOOST_PP_SEQ_PUSH_BACK + + + +
+ The BOOST_PP_SEQ_PUSH_BACK macro pushes an element onto the end of a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_PUSH_BACK(seq, elem) +
+

+ Arguments +

-
set
+
seq
- The set onto which elem is pushed. + The seq onto which elem is pushed.
elem
- The element to push onto the end of set. + The element to push onto the end of seq.
-

Remarks

+

+ Remarks +

- This macro returns set after appending elem.  + This macro returns seq after appending elem
- This macro is an explicit form of directly appending an element.  - In other words, BOOST_PP_SET_PUSH_BACK(set, x) is equivalent to set(x). + This macro is an explicit form of directly appending an element.  In other + words, BOOST_PP_SEQ_PUSH_BACK(seq, x) is equivalent to seq(x).
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/push_back.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/push_back.hpp>
 
-#define SET (a)(b)
+#define SEQ (a)(b)
 
-BOOST_PP_SET_PUSH_BACK(SET, c) // expands to (a)(b)(c)
-
- +BOOST_PP_SEQ_PUSH_BACK(SEQ, c) // expands to (a)(b)(c) +
+
+ diff --git a/doc/ref/set_push_front.html b/doc/ref/set_push_front.html index 8518488..0f4d777 100644 --- a/doc/ref/set_push_front.html +++ b/doc/ref/set_push_front.html @@ -1,50 +1,67 @@ - - BOOST_PP_SET_PUSH_FRONT - - - -
- The BOOST_PP_SET_PUSH_FRONT macro pushes an element onto the beginning of a set. -
-

Usage

-
- BOOST_PP_SET_PUSH_FRONT(set, elem) + + BOOST_PP_SEQ_PUSH_FRONT + + + +
+ The BOOST_PP_SEQ_PUSH_FRONT macro pushes an element onto the beginning + of a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_PUSH_FRONT(seq, elem) +
+

+ Arguments +

-
set
+
seq
- The set onto which elem is pushed. + The seq onto which elem is pushed.
elem
- The element to push onto the beginning of set. + The element to push onto the beginning of seq.
-

Remarks

+

+ Remarks +

- This macro returns set after prepending elem.  + This macro returns seq after prepending elem
- This macro is an explicit form of directly prepending an element.  - In other words, BOOST_PP_SET_PUSH_FRONT(set, x) is equivalent to (x)set. + This macro is an explicit form of directly prepending an element.  In + other words, BOOST_PP_SEQ_PUSH_FRONT(seq, x) is equivalent + to (x)seq.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/push_front.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/push_front.hpp>
 
-#define SET (b)(c)
+#define SEQ (b)(c)
 
-BOOST_PP_SET_PUSH_FRONT(SET, a) // expands to (a)(b)(c)
-
- +BOOST_PP_SEQ_PUSH_FRONT(SEQ, a) // expands to (a)(b)(c) +
+
+ diff --git a/doc/ref/set_remove.html b/doc/ref/set_remove.html index 4643316..e005b25 100644 --- a/doc/ref/set_remove.html +++ b/doc/ref/set_remove.html @@ -1,43 +1,55 @@ - - BOOST_PP_SET_REMOVE - - - -
- The BOOST_PP_SET_REMOVE macro removes an element from a set. -
-

Usage

-
- BOOST_PP_SET_REMOVE(set, i) + + BOOST_PP_SEQ_REMOVE + + + +
+ The BOOST_PP_SEQ_REMOVE macro removes an element from a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_REMOVE(seq, i) +
+

+ Arguments +

-
set
+
seq
- The set from which an element is to be removed. + The seq from which an element is to be removed.
i
- The zero-based position in set of the element to be removed.  - Valid values range from 0 to BOOST_PP_SET_SIZE(set) - 1. + The zero-based position in seq of the element to be removed.  Valid + values range from 0 to BOOST_PP_SEQ_SIZE(seq) - 1.
-

Remarks

+

+ Remarks +

- This macro returns set after removing the element at index i. + This macro returns seq after removing the element at index i.
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/remove.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/remove.hpp>
 
-#define SET (a)(b)(x)(c)
+#define SEQ (a)(b)(x)(c)
 
-BOOST_PP_SET_REMOVE(SET, 2) // expands to (a)(b)(c)
-
- +BOOST_PP_SEQ_REMOVE(SEQ, 2) // expands to (a)(b)(c) +
+
+ diff --git a/doc/ref/set_replace.html b/doc/ref/set_replace.html index d2281f4..a57cd48 100644 --- a/doc/ref/set_replace.html +++ b/doc/ref/set_replace.html @@ -1,47 +1,60 @@ - - BOOST_PP_SET_REPLACE - - - -
- The BOOST_PP_SET_REPLACE macro replaces an element in a set. -
-

Usage

-
- BOOST_PP_SET_RPLACE(set, i, elem) + + BOOST_PP_SEQ_REPLACE + + + +
+ The BOOST_PP_SEQ_REPLACE macro replaces an element in a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_RPLACE(seq, i, elem) +
+

+ Arguments +

-
set
+
seq
- The set in which an element is to be replaced. + The seq in which an element is to be replaced.
i
- The zero-based position in set of the element to be replaced.  - Valid values range from 0 to BOOST_PP_SET_SIZE(set) - 1. + The zero-based position in seq of the element to be replaced.  + Valid values range from 0 to BOOST_PP_SEQ_SIZE(seq) - 1.
elem
- The element to replace the element at index i within set. + The element to replace the element at index i within seq.
-

Remarks

+

+ Remarks +

- This macro returns set after replacing the element at index i with elem. + This macro returns seq after replacing the element at index i with + elem.
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/replace.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/replace.hpp>
 
-#define SET (a)(b)(x)(d)
+#define SEQ (a)(b)(x)(d)
 
-BOOST_PP_SET_REPLACE(SET, 2, c) // expands to (a)(b)(c)(d)
-
- +BOOST_PP_SEQ_REPLACE(SEQ, 2, c) // expands to (a)(b)(c)(d) +
+
+ diff --git a/doc/ref/set_rest_n.html b/doc/ref/set_rest_n.html index 58055f5..8723a9d 100644 --- a/doc/ref/set_rest_n.html +++ b/doc/ref/set_rest_n.html @@ -1,17 +1,22 @@ - - BOOST_PP_SET_REST_N - - - -
- The BOOST_PP_SET_REST_N macro expands to a set of all but the first n elements of a set. -
-

Usage

-
- BOOST_PP_SET_REST_N(n, list) + + BOOST_PP_SEQ_REST_N + + + +
+ The BOOST_PP_SEQ_REST_N macro expands to a seq of all but the + first n elements of a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_REST_N(n, list) +
+

+ Arguments +

n
@@ -19,28 +24,39 @@
list
- The set from which the elements are to be removed. + The seq from which the elements are to be removed.
-

Remarks

+

+ Remarks +

- This macro extracts n elements from the beginning of set and returns the remainder of set as a new set + This macro extracts n elements from the beginning of seq and + returns the remainder of seq as a new seq
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/set/elem.hpp>
-#include <boost/preprocessor/set/first_n.hpp>
-#include <boost/preprocessor/set/rest_n.hpp>
-#include <boost/preprocessor/set/size.hpp>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/preprocessor/seq/first_n.hpp>
+#include <boost/preprocessor/seq/rest_n.hpp>
+#include <boost/preprocessor/seq/size.hpp>
 
 #define NUMBERS \
    (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \
@@ -71,15 +87,15 @@
    (250)(251)(252)(253)(254)(255)(256) \
    /**/
 
-#define SUPER_ADD(x, y) BOOST_PP_SET_ELEM(y, BOOST_PP_SET_REST_N(x, NUMBERS))
+#define SUPER_ADD(x, y) BOOST_PP_SEQ_ELEM(y, BOOST_PP_SEQ_REST_N(x, NUMBERS))
 
 SUPER_ADD(100, 100) // expands to 200
 
 #define SUPER_SUB(x, y) \
-   BOOST_PP_SET_SIZE( \
-      BOOST_PP_SET_REST_N( \
+   BOOST_PP_SEQ_SIZE( \
+      BOOST_PP_SEQ_REST_N( \
          BOOST_PP_INC(y), \
-         BOOST_PP_SET_FIRST_N( \
+         BOOST_PP_SEQ_FIRST_N( \
             BOOST_PP_INC(x), NUMBERS \
          ) \
       ) \
@@ -87,6 +103,7 @@ SUPER_ADD(100, 100) // expands to 200
    /**/
 
 SUPER_SUB(67, 25) // expands to 42
-
- +
+
+ diff --git a/doc/ref/set_reverse.html b/doc/ref/set_reverse.html index 07a8720..b5117c8 100644 --- a/doc/ref/set_reverse.html +++ b/doc/ref/set_reverse.html @@ -1,42 +1,57 @@ - - BOOST_PP_SET_REVERSE - - - -
- The BOOST_PP_SET_REVERSE macro reverses a set. -
-

Usage

-
- BOOST_PP_SET_REVERSE(set) + + BOOST_PP_SEQ_REVERSE + + + +
+ The BOOST_PP_SEQ_REVERSE macro reverses a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_REVERSE(seq) +
+

+ Arguments +

-
set
+
seq
- The set to be reversed. + The seq to be reversed.
-

Remarks

+

+ Remarks +

- For maximum efficiency, use BOOST_PP_SET_REVERSE_S. + For maximum efficiency, use BOOST_PP_SEQ_REVERSE_S.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/reverse.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/reverse.hpp>
 
-#define SET (1)(2)(3)
+#define SEQ (1)(2)(3)
 
-BOOST_PP_SET_REVERSE(SET) // expands to (3)(2)(1)
-
- +BOOST_PP_SEQ_REVERSE(SEQ) // expands to (3)(2)(1) +
+
+ diff --git a/doc/ref/set_reverse_s.html b/doc/ref/set_reverse_s.html index 8c8736f..dd0f3fa 100644 --- a/doc/ref/set_reverse_s.html +++ b/doc/ref/set_reverse_s.html @@ -1,35 +1,44 @@ - - BOOST_PP_SET_REVERSE_S - - - -
- The BOOST_PP_SET_REVERSE_S macro reverses a set.  - It reenters BOOST_PP_SET_FOLD_LEFT with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_REVERSE_S(s, set) + + BOOST_PP_SEQ_REVERSE_S + + + +
+ The BOOST_PP_SEQ_REVERSE_S macro reverses a seq.  It + reenters BOOST_PP_SEQ_FOLD_LEFT with maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_REVERSE_S(s, seq) +
+

+ Arguments +

s
- The next available BOOST_PP_SET_FOLD_LEFT fold step. + The next available BOOST_PP_SEQ_FOLD_LEFT fold step.
-
set
+
seq
- The set to be reversed. + The seq to be reversed.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

- + diff --git a/doc/ref/set_size.html b/doc/ref/set_size.html index ac0f54f..d5490d5 100644 --- a/doc/ref/set_size.html +++ b/doc/ref/set_size.html @@ -1,34 +1,44 @@ - - BOOST_PP_SET_SIZE - - - -
- The BOOST_PP_SET_SIZE macro expands to the size of a set. -
-

Usage

-
- BOOST_PP_SET_SIZE(set) + + BOOST_PP_SEQ_SIZE + + + +
+ The BOOST_PP_SEQ_SIZE macro expands to the size of a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_SIZE(seq) +
+

+ Arguments +

-
set
+
seq
- The set whose size is to be calculated. + The seq whose size is to be calculated.
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/size.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/size.hpp>
 
-#define SET (a)(b)(c)
+#define SEQ (a)(b)(c)
 
-BOOST_PP_SET_SIZE(SET) // expands to 3
-
- +BOOST_PP_SEQ_SIZE(SEQ) // expands to 3 +
+
+ diff --git a/doc/ref/set_subset.html b/doc/ref/set_subset.html index a5b1a65..b9d64a5 100644 --- a/doc/ref/set_subset.html +++ b/doc/ref/set_subset.html @@ -1,46 +1,58 @@ - - BOOST_PP_SET_SUBSET - - - -
- The BOOST_PP_SET_SUBSET macro expands to a subset of elements in a set. -
-

Usage

-
- BOOST_PP_SET_SUBSET(set, i, len) + + BOOST_PP_SEQ_SUBSEQ + + + +
+ The BOOST_PP_SEQ_SUBSEQ macro expands to a subseq of elements in a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_SUBSEQ(seq, i, len) +
+

+ Arguments +

-
set
+
seq
- The set whose size is to be calculated. + The seq whose size is to be calculated.
i
- The index of the first element of the subset to be extracted. + The index of the first element of the subseq to be extracted.
len
- The length of the subset to be extracted. + The length of the subseq to be extracted.
-

Remarks

+

+ Remarks +

- This macro expands to a set extracted from set. + This macro expands to a seq extracted from seq.
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/subset.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/subseq.hpp>
 
-#define SET (0)(1)(2)(3)(4)(5)
+#define SEQ (0)(1)(2)(3)(4)(5)
 
-BOOST_PP_SET_SUBSET(SET, 2, 3) // expands to (2)(3)(4)
-
- +BOOST_PP_SEQ_SUBSEQ(SEQ, 2, 3) // expands to (2)(3)(4) +
+
+ diff --git a/doc/ref/set_tail.html b/doc/ref/set_tail.html index 9c742e2..8bfb0a9 100644 --- a/doc/ref/set_tail.html +++ b/doc/ref/set_tail.html @@ -1,39 +1,52 @@ - - BOOST_PP_SET_TAIL - - - -
- The BOOST_PP_SET_HEAD macro expands to all but the first element of a set. -
-

Usage

-
- BOOST_PP_SET_TAIL(set) + + BOOST_PP_SEQ_TAIL + + + +
+ The BOOST_PP_SEQ_HEAD macro expands to all but the first element of a seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_TAIL(seq) +
+

+ Arguments +

-
set
+
seq
- The set from which the tail is extracted. + The seq from which the tail is extracted.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/set.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/seq.hpp>
 
-#define SET (a)(b)(c)
+#define SEQ (a)(b)(c)
 
-BOOST_PP_SET_HEAD(SET) // expands to a
-BOOST_PP_SET_TAIL(SET) // expands to (b)(c)
-
- +BOOST_PP_SEQ_HEAD(SEQ) // expands to a +BOOST_PP_SEQ_TAIL(SEQ) // expands to (b)(c) +
+
+ diff --git a/doc/ref/set_to_array.html b/doc/ref/set_to_array.html index 2643136..50f5840 100644 --- a/doc/ref/set_to_array.html +++ b/doc/ref/set_to_array.html @@ -1,34 +1,44 @@ - - BOOST_PP_SET_TO_ARRAY - - - -
- The BOOST_PP_SET_TO_ARRAY macro converts a set to an array. -
-

Usage

-
- BOOST_PP_SET_TO_ARRAY(set) + + BOOST_PP_SEQ_TO_ARRAY + + + +
+ The BOOST_PP_SEQ_TO_ARRAY macro converts a seq to an array.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_TO_ARRAY(seq) +
+

+ Arguments +

-
set
+
seq
- The set to be converted. + The seq to be converted.
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/to_array.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/to_array.hpp>
 
-#define SET (a)(b)(c)
+#define SEQ (a)(b)(c)
 
-BOOST_PP_SET_TO_ARRAY(SET) // expands to (3, (a, b, c))
-
- +BOOST_PP_SEQ_TO_ARRAY(SEQ) // expands to (3, (a, b, c)) +
+
+ diff --git a/doc/ref/set_to_tuple.html b/doc/ref/set_to_tuple.html index 1210886..4a6fb9a 100644 --- a/doc/ref/set_to_tuple.html +++ b/doc/ref/set_to_tuple.html @@ -1,34 +1,44 @@ - - BOOST_PP_SET_TO_TUPLE - - - -
- The BOOST_PP_SET_TO_TUPLE macro converts a set to an tuple. -
-

Usage

-
- BOOST_PP_SET_TO_TUPLE(set) + + BOOST_PP_SEQ_TO_TUPLE + + + +
+ The BOOST_PP_SEQ_TO_TUPLE macro converts a seq to an tuple.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_TO_TUPLE(seq) +
+

+ Arguments +

-
set
+
seq
- The set to be converted. + The seq to be converted.
-

Requirements

+

+ Requirements +

-

Sample Code

-
-#include <boost/preprocessor/set/to_tuple.hpp>
+		

+ Sample Code +

+
+
+#include <boost/preprocessor/seq/to_tuple.hpp>
 
-#define SET (a)(b)(c)
+#define SEQ (a)(b)(c)
 
-BOOST_PP_SET_TO_TUPLE(SET) // expands to (a, b, c)
-
- +BOOST_PP_SEQ_TO_TUPLE(SEQ) // expands to (a, b, c) +
+
+ diff --git a/doc/ref/set_transform.html b/doc/ref/set_transform.html index 2fad2bb..78b0379 100644 --- a/doc/ref/set_transform.html +++ b/doc/ref/set_transform.html @@ -1,65 +1,82 @@ - - BOOST_PP_SET_TRANSFORM - - - -
- The BOOST_PP_SET_TRANSFORM macro transforms each element in a set according to a supplied transformation. -
-

Usage

-
- BOOST_PP_SET_TRANSFORM(op, data, set) + + BOOST_PP_SEQ_TRANSFORM + + + +
+ The BOOST_PP_SEQ_TRANSFORM macro transforms each element in a seq + according to a supplied transformation.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_TRANSFORM(op, data, seq) +
+

+ Arguments +

op
- A ternary predicate of the form op(s, data, elem).  - This transformation is expanded by BOOST_PP_SET_TRANSFORM for each element in set with the next available BOOST_PP_SET_FOLD_LEFT fold step, - the auxiliary data, and the current element in set.  + A ternary predicate of the form op(s, data, elem).  + This transformation is expanded by BOOST_PP_SEQ_TRANSFORM for each + element in seq with the next available BOOST_PP_SEQ_FOLD_LEFT fold + step, the auxiliary data, and the current element in seq
data
Auxiliary data passed to pred.
-
set
+
seq
- The set to be transformed. + The seq to be transformed.
-

Remarks

+

+ Remarks +

- This macro expands op for each element in set.  - It builds a new set out of the results of each call.  - If, for example, set is (a)(b)(c), - this macro expands to... + This macro expands op for each element in seq.  It builds a + new seq out of the results of each call.  If, for example, seq + is (a)(b)(c), this macro expands to...
- (op(d, data, a))(op(d, data, b))(op(d, data, c)) + (op(d, data, a))(op(d, data, b))(op(d, + data, c))
- For maximum efficiency, use BOOST_PP_SET_TRANSFORM_S. + For maximum efficiency, use BOOST_PP_SEQ_TRANSFORM_S.
-

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

-

Sample Code

-
+		

+ Sample Code +

+
+
 #include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/set/transform.hpp>
+#include <boost/preprocessor/seq/transform.hpp>
 
-#define SET (1)(3)(2)(5)
+#define SEQ (1)(3)(2)(5)
 
 #define OP(s, data, elem) BOOST_PP_DEC(elem)
 
-BOOST_PP_SET_TRANSFORM(OP, 3, SET)
+BOOST_PP_SEQ_TRANSFORM(OP, 3, SEQ)
    // expands to (0)(2)(1)(4)
-
- +
+
+ diff --git a/doc/ref/set_transform_s.html b/doc/ref/set_transform_s.html index b1383a2..6c2e31e 100644 --- a/doc/ref/set_transform_s.html +++ b/doc/ref/set_transform_s.html @@ -1,55 +1,68 @@ - - BOOST_PP_SET_TRANSFORM_S - - - -
- The BOOST_PP_SET_TRANSFORM_S macro transforms each element in a set according to a supplied transformation.  - It reenters BOOST_PP_SET_FOLD_LEFT with maximum efficiency. -
-

Usage

-
- BOOST_PP_SET_TRANSFORM_S(s, op, data, set) + + BOOST_PP_SEQ_TRANSFORM_S + + + +
+ The BOOST_PP_SEQ_TRANSFORM_S macro transforms each element in a seq + according to a supplied transformation.  It reenters BOOST_PP_SEQ_FOLD_LEFT + with maximum efficiency.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) +
+

+ Arguments +

s
- The next available BOOST_PP_SET_FOLD_LEFT fold step. + The next available BOOST_PP_SEQ_FOLD_LEFT fold step.
op
- A ternary predicate of the form op(s, data, elem).  - This transformation is expanded by BOOST_PP_SET_TRANSFORM for each element in set with the next available BOOST_PP_SET_FOLD_LEFT fold step, - the auxiliary data, and the current element in set.  + A ternary predicate of the form op(s, data, elem).  + This transformation is expanded by BOOST_PP_SEQ_TRANSFORM for each + element in seq with the next available BOOST_PP_SEQ_FOLD_LEFT fold + step, the auxiliary data, and the current element in seq
data
Auxiliary data passed to pred.
-
set
+
seq
- The set to be transformed. + The seq to be transformed.
-

Remarks

+

+ Remarks +

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

See Also

+

+ See Also +

-

Requirements

+

+ Requirements +

- + diff --git a/doc/ref/tuple_to_set.html b/doc/ref/tuple_to_set.html index c6da0dd..88a4303 100644 --- a/doc/ref/tuple_to_set.html +++ b/doc/ref/tuple_to_set.html @@ -1,17 +1,21 @@ - - BOOST_PP_TUPLE_TO_SET - - - -
- The BOOST_PP_TUPLE_TO_SET macro converts a tuple to an set. -
-

Usage

-
- BOOST_PP_TUPLE_TO_SET(size, tuple) + + BOOST_PP_TUPLE_TO_SEQ + + + +
+ The BOOST_PP_TUPLE_TO_SEQ macro converts a tuple to an seq.
-

Arguments

+

+ Usage +

+
+ BOOST_PP_TUPLE_TO_SEQ(size, tuple) +
+

+ Arguments +

size
@@ -22,15 +26,21 @@ The tuple to be converted.
-

Requirements

+

+ Requirements +

-

Sample Code

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

+ Sample Code +

+
+
+#include <boost/preprocessor/tuple/to_seq.hpp>
 
-BOOST_PP_TUPLE_TO_SET(3, (a, b, c)) // expands to (a)(b)(c)
-
- +BOOST_PP_TUPLE_TO_SEQ(3, (a, b, c)) // expands to (a)(b)(c) +
+
+ diff --git a/doc/top.html b/doc/top.html index 408da5b..6f1b2dc 100644 --- a/doc/top.html +++ b/doc/top.html @@ -1,27 +1,23 @@ - - top.html - - - - - - - - -
- The Boost Library
- Preprocessor Subset for C/C++ -
- + + top.html + + + + + + + + +
+ The Boost + Library +
+ Preprocessor + Subseq for C/C++ +
+ diff --git a/doc/topics/file_iteration.html b/doc/topics/file_iteration.html index 6b72479..437ce49 100644 --- a/doc/topics/file_iteration.html +++ b/doc/topics/file_iteration.html @@ -1,158 +1,196 @@ - - file_iteration.html - - - -

File Iteration

-
- File iteration is a complex, but powerful, vertical repetition construct.  - It repeatedly includes a file for each number in a user-specified range. -
-

Tutorial

-
- This mechanism requires two pieces of information to operate:  - a range to iterate over and a file to include on each iteration.  - It can optionally take a third piece of information that represents flags used to discriminate between - different iterations of the same file.  - This information is obtained by the mechanism through one or two named external arguments.  - These arguments are specified as user-defined macros named BOOST_PP_ITERATION_PARAMS_x - or the combination of BOOST_PP_FILENAME_x and BOOST_PP_ITERATION_LIMITS. -
-
- BOOST_PP_ITERATION_LIMITS specifies the range of values to iterate over.  - It must expand to a tuple containing two elements--a lower and upper bound.  - Both the upper and lower bounds must be numeric values in the range of 0 to BOOST_PP_LIMIT_ITERATION.  - For example, if the user wishes a file to be included for numbers ranging from 0 to 10, - BOOST_PP_ITERATION_LIMITS would be defined like this: -
-
+	
+		file_iteration.html
+		
+	
+	
+		

+ File Iteration +

+
+ File iteration is a complex, but powerful, vertical repetition construct.  + It repeatedly includes a file for each number in a user-specified range. +
+

+ Tutorial +

+
+ This mechanism requires two pieces of information to operate:  a range to + iterate over and a file to include on each iteration.  It can optionally + take a third piece of information that represents flags used to discriminate + between different iterations of the same file.  This information is + obtained by the mechanism through one or two named external arguments.  + These arguments are specified as user-defined macros named BOOST_PP_ITERATION_PARAMS_x + or the combination of BOOST_PP_FILENAME_x and BOOST_PP_ITERATION_LIMITS. +
+
+ BOOST_PP_ITERATION_LIMITS specifies the range of values to iterate + over.  It must expand to a tuple containing two elements--a + lower and upper bound.  Both the upper and lower bounds must be numeric + values in the range of 0 to BOOST_PP_LIMIT_ITERATION.  For + example, if the user wishes a file to be included for numbers ranging from 0 + to 10, BOOST_PP_ITERATION_LIMITS would be defined like this: +
+
+
 #define BOOST_PP_ITERATION_LIMITS (0, 10)
-
-
- Note that there is whitespace after the name of the macro.  - The macro does not take two arguments.  - In the case above, if there was no whitespace, a preprocessing error would occur because 0 and 10 - are invalid identifiers. -
-
- Both the upper and lower bounds specified in the BOOST_PP_ITERATION_LIMITS macro are evaluated parameters.  - This implies that they can include simple arithmetic or logical expressions.  - For instance, the above definition could easily have been written like this: -
-
+
+
+
+ Note that there is whitespace after the name of the macro.  The macro does + not take two arguments.  In the case above, if there was + no whitespace, a preprocessing error would occur because 0 and 10 + are invalid identifiers. +
+
+ Both the upper and lower bounds specified in the BOOST_PP_ITERATION_LIMITS + macro are evaluated parameters.  This implies that they can include + simple arithmetic or logical expressions.  For instance, the above + definition could easily have been written like this: +
+
+
 #define N() 5
 #define BOOST_PP_ITERATION_LIMITS (0, N() + 5)
-
-
- Because of this, if the whitespace after the macro name is elided, it is possible for the - definition to be syntactically valid: -
-
+
+
+
+ Because of this, if the whitespace after the macro name is elided, it is + possible for the definition to be syntactically valid: +
+
+
 #define A 0
 #define B 10
 #define BOOST_PP_ITERATION_LIMITS(A, B)
    // note:  no whitespace       ^
-
-
- If this happens, an error will occur inside the mechanism when it attempts to use this macro.  - The error messages that result may be obscure, so always remember to include the whitespace.  - A correct version of the above looks like this: -
-
+
+
+
+ If this happens, an error will occur inside the mechanism when it attempts to + use this macro.  The error messages that result may be obscure, so always + remember to include the whitespace.  A correct version of the above + looks like this: +
+
+
 #define A 0
 #define B 10
 #define BOOST_PP_ITERATION_LIMITS (A, B)
    // note:  has whitespace      ^
-
-
- BOOST_PP_FILENAME_x specifies the file to iterate over.  - The x is a placeholder for the dimension of iteration.  - (For now, we'll assume this is 1--i.e. the first dimension, - so we are actually dealing with BOOST_PP_FILENAME_1.)  - This macro must expand to a valid filename--in quotes or in angle brackets depending on how the file is accessed: -
-
+
+
+
+ BOOST_PP_FILENAME_x specifies the file to iterate over.  The x + is a placeholder for the dimension of iteration.  (For now, we'll assume + this is 1--i.e. the first dimension, so we are actually dealing with BOOST_PP_FILENAME_1.)  + This macro must expand to a valid filename--in quotes or in angle brackets + depending on how the file is accessed: +
+
+
 #define BOOST_PP_FILENAME_1 "file.h"
 // -or-
 #define BOOST_PP_FILENAME_1 <file.h>
-
-
- All that we need now to perform a simple file iteration is to invoke the mechanism: -
-
+
+
+
+ All that we need now to perform a simple file iteration is to invoke the + mechanism: +
+
+
 ??=include BOOST_PP_ITERATE()
-
-
- (The ??= token is a trigraph for #.  - I use the trigraph to make it clear that I am including a file rather than defining or expanding a macro, but it is not necessary.  - Even the digraph version, %:, could be used.  - Some compilers do not readily accept trigraphs and digraphs, so keep that in mind.  - Other than that, use whichever one you prefer.) -
-
- So, if we wish to iterate "file.h" from 1 to 10, we just need to put the pieces together: -
-
+
+
+
+ (The ??= token is a trigraph for #.  I use the + trigraph to make it clear that I am including a file rather than + defining or expanding a macro, but it is not necessary.  Even the digraph + version, %:, could be used.  Some compilers do not readily + accept trigraphs and digraphs, so keep that in mind.  Other than that, use + whichever one you prefer.) +
+
+ So, if we wish to iterate "file.h" from 1 to 10, we just need to + put the pieces together: +
+
+
 #define BOOST_PP_ITERATION_LIMITS (1, 10)
 #define BOOST_PP_FILENAME_1 "file.h"
 ??=include BOOST_PP_ITERATE()
-
-
- The above code has the effect of including "file.h" ten times in succession.  -
-
- Alternately, both the range and the file to iterate over can be expressed in one macro, BOOST_PP_ITERATION_PARAMS_x.  - Once again, the x is a placeholder for the dimension of iteration--which we'll assume is 1.  - This macro must expand to an array that includes the lower bound, upper bound, filename, and optional flags (in that order). -
-
+
+
+
+ The above code has the effect of including "file.h" ten times in + succession.  +
+
+ Alternately, both the range and the file to iterate over can be expressed in + one macro, BOOST_PP_ITERATION_PARAMS_x.  Once again, the x + is a placeholder for the dimension of iteration--which we'll assume is 1.  + This macro must expand to an array that includes the lower bound, upper + bound, filename, and optional flags (in that order). +
+
+
 #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
 ??=include BOOST_PP_ITERATE()
-
-
- This has the same effect as the previous version.  - Only one of these two ways to specify the parameters can be used at a time.  - (The reason that there are two different methods has to do with dimensional abstraction which I'll get to later.) -
-
- There is nothing particularly useful about including a file ten times.  - The difference is that the current macro state changes each time.  - For example, the current "iteration value" is available with BOOST_PP_ITERATION().  - If "file.h" is defined like this... -
-
+
+
+
+ This has the same effect as the previous version.  Only one of these two + ways to specify the parameters can be used at a time.  (The reason that + there are two different methods has to do with dimensional abstraction which + I'll get to later.) +
+
+ There is nothing particularly useful about including a file ten times.  + The difference is that the current macro state changes each time.  For + example, the current "iteration value" is available with BOOST_PP_ITERATION().  + If "file.h" is defined like this... +
+
+
 // file.h
 template<> struct sample<BOOST_PP_ITERATION()> { };
-
-
- ...and it is iterated as follows... -
-
+
+
+
+ ...and it is iterated as follows... +
+
+
 template<int> struct sample;
 
 #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 5, "file.h"))
 ??=include BOOST_PP_ITERATE()
-
-
- ...the result is different each time: -
-
+
+
+
+ ...the result is different each time: +
+
+
 template<> struct sample<1> { };
 template<> struct sample<2> { };
 template<> struct sample<3> { };
 template<> struct sample<4> { };
 template<> struct sample<5> { };
-
-
- There is no reason that a file can't iterate over itself.  - This has the advantage of keeping the code together.  - The problem is that you have to discriminate the "regular" section of the file from the iterated section of the file.  - The library provides the BOOST_PP_IS_ITERATING macro to help in this regard.  - This macro is defined as 1 if an iteration is in progress.  - For example, to merge the contents of "file.h" into the file that iterates it: -
-
+
+
+
+ There is no reason that a file can't iterate over itself.  This has the + advantage of keeping the code together.  The problem is that you have to + discriminate the "regular" section of the file from the iterated section of the + file.  The library provides the BOOST_PP_IS_ITERATING macro to help + in this regard.  This macro is defined as 1 if an iteration is in + progress.  For example, to merge the contents of "file.h" into the file + that iterates it: +
+
+
 // sample.h
 #if !BOOST_PP_IS_ITERATING
 
@@ -173,14 +211,16 @@ template<> struct sample<5> { };
    template<> struct sample<BOOST_PP_ITERATION()> { };
 
 #endif
-
-
- Using the same file like this raises another issue.  - What happens when a file performs two separate file iterations over itself?  - This is the purpose of the optional flags parameter.  - It is used to discriminate between separate iterations. -
-
+
+
+
+ Using the same file like this raises another issue.  What happens when a + file performs two separate file iterations over itself?  This is the + purpose of the optional flags parameter.  It is used to discriminate + between separate iterations. +
+
+
 // sample.h
 #if !BOOST_PP_IS_ITERATING
 
@@ -239,19 +279,24 @@ template<> struct sample<5> { };
    #undef N
 
 #endif
-
-
- Notice the use of the "flags" parameter (which is accessed through BOOST_PP_ITERATION_FLAGS()).  - It discriminates between our recurring sample iteration and a typelist linearization iteration.  -
-
- The second iteration illustrates the power of the file iteration mechanism.  - It generates typelist linearizations of the form typelist<3>::args<int, double, char>::type. -
-
- Actually, to continue the typelist example, with the help of another iteration we can fully linearize typelist creation.... -
-
+
+
+
+ Notice the use of the "flags" parameter (which is accessed through BOOST_PP_ITERATION_FLAGS()).  + It discriminates between our recurring sample iteration and a + typelist linearization iteration.  +
+
+ The second iteration illustrates the power of the file iteration + mechanism.  It generates typelist linearizations of the form typelist<3>::args<int, + double, char>::type. +
+
+ Actually, to continue the typelist example, with the help of another iteration + we can fully linearize typelist creation.... +
+
+
 // extract.h
 #if !BOOST_PP_IS_ITERATING
 
@@ -304,68 +349,80 @@ template<> struct sample<5> { };
    #undef N
 
 #endif
-
-
- Now we can define a helper macro to finish the job: -
-
+
+
+
+ Now we can define a helper macro to finish the job: +
+
+
 #define TYPELIST(args) extract<typelist, void args>::type
 
 typedef TYPELIST((int, double, incomplete<void>)) xyz;
-
-
- There are two minor caveats with this result.  - First, certain types like void can't be the type of an argument, so they have to be - wrapped with incomplete<T>.  - Second, the necessary double parenthesis is annoying.  - If and when C++ gets C99's variadic macros, TYPELIST can be redefined: -
-
+
+
+
+ There are two minor caveats with this result.  First, certain types like void + can't be the type of an argument, so they have to be wrapped with incomplete<T>.  + Second, the necessary double parenthesis is annoying.  If and when C++ + gets C99's variadic macros, TYPELIST can be redefined: +
+
+
 #define TYPELIST(...) extract<typelist, void (__VA_ARGS__)>::type
 
 typedef TYPELIST(int, double, short) xyz;
-
-
- Note also that both the lower and upper bounds of an iteration are also accessible inside an iteration with - BOOST_PP_ITERATION_START() and BOOST_PP_ITERATION_FINISH(). -
-
- It is my hope that the explanation and examples presented here demonstrate the power of file iteration.  - Even so, this is just the beginning.  - The file iteration mechanism also defines a full suite of facilities to support multidimensional iteration. -
-

Multiple Dimensions

-
- The file iteration mechanism supports up to BOOST_PP_LIMIT_ITERATION_DIM dimensions.  - The first dimension (i.e. the outermost) we have already used above.  - In order to use the second dimension (inside the first), we simply have to replace the placeholder x - with 2 instead of 1. -
-
+
+
+
+ Note also that both the lower and upper bounds of an iteration are also + accessible inside an iteration with BOOST_PP_ITERATION_START() and BOOST_PP_ITERATION_FINISH(). +
+
+ It is my hope that the explanation and examples presented here demonstrate the + power of file iteration.  Even so, this is just the beginning.  The + file iteration mechanism also defines a full suite of facilities to support + multidimensional iteration. +
+

+ Multiple Dimensions +

+
+ The file iteration mechanism supports up to BOOST_PP_LIMIT_ITERATION_DIM + dimensions.  The first dimension (i.e. the outermost) we have already used + above.  In order to use the second dimension (inside the first), we simply + have to replace the placeholder x with 2 instead of 1. +
+
+
 #define BOOST_PP_ITERATION_PARAMS_2 /* ... */
                                   ^
-
-
-...or... -
-
+
+
+
+ ...or... +
+
+
 #define BOOST_PP_FILENAME_2 /* ... */
                           ^
-
-
- Each dimension must be used in order starting with 1.  - Therefore, the above can only be valid immediately inside the first dimension.  -
-
- At this point, further explanation is necessary regarding BOOST_PP_ITERATION, - BOOST_PP_ITERATION_START, and BOOST_PP_ITERATION_FINISH.  - BOOST_PP_ITERATION() expands to the iteration value of the current dimension--regardless - of what dimension that is.  - Likewise, BOOST_PP_ITERATION_START() and BOOST_PP_ITERATION_FINISH() expand to the lower - and upper bounds of the current dimension.  - Using the following pseudo-code as reference: -
-
+
+
+
+ Each dimension must be used in order starting with 1.  + Therefore, the above can only be valid immediately inside the first + dimension.  +
+
+ At this point, further explanation is necessary regarding BOOST_PP_ITERATION, + BOOST_PP_ITERATION_START, and BOOST_PP_ITERATION_FINISHBOOST_PP_ITERATION() + expands to the iteration value of the current dimension--regardless of + what dimension that is.  Likewise, BOOST_PP_ITERATION_START() and BOOST_PP_ITERATION_FINISH() + expand to the lower and upper bounds of the current dimension.  + Using the following pseudo-code as reference: +
+
+
 for (int i = start(1); i <= finish(1); ++i) {
    // A
    for (int j = start(2); j <= finish(2); ++j) {
@@ -373,21 +430,25 @@ for (int i = start(1); i <= finish(1); ++i) {
    }
    // C
 }
-
-
- At point A, BOOST_PP_ITERATION() refers to i.  - BOOST_PP_ITERATION_START() and BOOST_PP_ITERATION_FINISH() - refer to start(1) and finish(1) respectively.  - At point B, however, BOOST_PP_ITERATION() refers to j--the current - iteration value at point B.  - The same is true for BOOST_PP_ITERATION_START() which refers to start(2), etc.. -
-
- If separate files are used for each dimension, then there are no major problems, and using multiple dimensions is straightforward.  - However, if more than one dimension is located in the same file, they need to be distinguished from one another.  - The file iteration mechanism provides the macro BOOST_PP_ITERATION_DEPTH for this purpose: -
-
+
+
+
+ At point A, BOOST_PP_ITERATION() refers to iBOOST_PP_ITERATION_START() + and BOOST_PP_ITERATION_FINISH() refer to start(1) and finish(1) + respectively.  At point B, however, BOOST_PP_ITERATION() + refers to j--the current iteration value at point B.  + The same is true for BOOST_PP_ITERATION_START() which refers to start(2), + etc.. +
+
+ If separate files are used for each dimension, then there are no major + problems, and using multiple dimensions is straightforward.  However, if + more than one dimension is located in the same file, they need to be + distinguished from one another.  The file iteration mechanism provides the + macro BOOST_PP_ITERATION_DEPTH for this purpose: +
+
+
 // file.h
 #if !BOOST_PP_IS_ITERATING
 
@@ -417,25 +478,29 @@ for (int i = start(1); i <= finish(1); ++i) {
    - BOOST_PP_ITERATION()
 
 #endif
-
-
- This will result to the following: -
-
+
+
+
+ This will result to the following: +
+
+
 + 1
 - 1
 - 2
 + 2
 - 1
 - 2
-
-
- Multiple dimensions raise another question.  - How does one access the state of dimensions other than the current dimension?  - In other words, how does one access i at point A?  - Because of the preprocessor's lazy evaluation, this doesn't work.... -
-
+
+
+
+ Multiple dimensions raise another question.  How does one access the state + of dimensions other than the current dimension?  In other words, + how does one access i at point A?  Because of the + preprocessor's lazy evaluation, this doesn't work.... +
+
+
 // ...
 
 #elif BOOST_PP_ITERATION_DEPTH() == 1
@@ -456,25 +521,31 @@ for (int i = start(1); i <= finish(1); ++i) {
    #undef I
 
 #endif
-
-
- The problem here is that I refers to BOOST_PP_ITERATION(), - not to the value of BOOST_PP_ITERATION() at the point of I's definition. -
-
- The library provides macros to access these values in two ways--absolutely or relatively.  - The first variety accesses a value of a specific iteration frame (i.e. dimension).  - To access the iteration value of the first dimension--from any dimension--BOOST_PP_FRAME_ITERATION(1) is used.  - To access the iteration value of the second dimension, BOOST_PP_FRAME_ITERATION(2) is used, and so on.  -
-
- There are also frame versions to access the lower bound, the upper bound, and the flags of a dimension:  - BOOST_PP_FRAME_START, BOOST_PP_FRAME_FINISH, and BOOST_PP_FRAME_FLAGS. -
-
- So, to fix the last example, we modify the definition of I.... -
-
+
+
+
+ The problem here is that I refers to BOOST_PP_ITERATION(), + not to the value of BOOST_PP_ITERATION() at the point of I's + definition. +
+
+ The library provides macros to access these values in two ways--absolutely or + relatively.  The first variety accesses a value of a specific iteration + frame (i.e. dimension).  To access the iteration value of the first + dimension--from any dimension--BOOST_PP_FRAME_ITERATION(1) + is used.  To access the iteration value of the second dimension, BOOST_PP_FRAME_ITERATION(2) + is used, and so on.  +
+
+ There are also frame versions to access the lower bound, the upper bound, and + the flags of a dimension:  BOOST_PP_FRAME_START, BOOST_PP_FRAME_FINISH, + and BOOST_PP_FRAME_FLAGS. +
+
+ So, to fix the last example, we modify the definition of I.... +
+
+
 // ...
 
 #elif BOOST_PP_ITERATION_DEPTH() == 1
@@ -482,49 +553,61 @@ for (int i = start(1); i <= finish(1); ++i) {
    #define I BOOST_PP_FRAME_ITERATION(1)
 
 // ...
-
-
- The library also provides macros to access values in dimensions relative to the current dimension (e.g. the previous dimension).  - These macros take an argument that is interpreted as an offset from the current frame.  - For example, BOOST_PP_RELATIVE_ITERATION(1) always refers to the outer dimension immediately previous to the current dimension.  - An argument of 0 is interpreted as an offset of 0 which causes - BOOST_PP_RELATIVE_ITERATION(0) to be equivalent to BOOST_PP_ITERATION().  - BOOST_PP_RELATIVE_ITERATION(2) refers to the iteration value of the dimension immediately preceding - the dimension that precedes the current dimension.  -
-
- The lower and upper bounds of a dimension can be accessed in this fashion as well - with BOOST_PP_RELATIVE_START and BOOST_PP_RELATIVE_FINISH.  - The flags of a relative dimension can be accessed with BOOST_PP_RELATIVE_FLAGS. -
-

Relativity

-
- I mentioned earlier that there is a reason that there are two ways to parametize the mechanism.  - The reason is dimensional abstraction.  - In certain situations the dimension is unknown by the code that is being iterated--possibly - because the code is reused at multiple, different dimensions.  - If that code needs to iterate again, it has to define the right parameters (based on the dimension) for the mechanism to consume.  -
-
- All of the macro state maintained by the mechanism can be referred to in an indirect way relative to a dimension.  - This is the purpose of the BOOST_PP_RELATIVE_ accessors.  -
-
- Likewise, the user-defined named external arguments can be defined this way as well--except the name of the file to iterate.  - Because the lower and upper boundaries are evaluated by the mechanism, the implementation no longer needs - the macro BOOST_PP_ITERATION_LIMITS, and the identifier can be reused for each dimension of iteration.  -
-
- Unfortunately, the filename is a different story.  - The library has no way to evaluate the quoted (or angle-bracketed) text.  - Therefore, it has to use a different macro for each dimension.  - That is the purpose of the BOOST_PP_FILENAME_x macros.  - They exist to isolate the only non-abstractable piece of data required by the mechanism.  -
-
- In order to define the filename in an abstract fashion, you need to do something like this: -
-
+
+
+
+ The library also provides macros to access values in dimensions relative + to the current dimension (e.g. the previous dimension).  These + macros take an argument that is interpreted as an offseq from the current + frame.  For example, BOOST_PP_RELATIVE_ITERATION(1) always + refers to the outer dimension immediately previous to the current + dimension.  An argument of 0 is interpreted as an offseq of 0 + which causes BOOST_PP_RELATIVE_ITERATION(0) to be equivalent to BOOST_PP_ITERATION().  + BOOST_PP_RELATIVE_ITERATION(2) refers to the iteration value of + the dimension immediately preceding the dimension that precedes the current + dimension.  +
+
+ The lower and upper bounds of a dimension can be accessed in this fashion as + well with BOOST_PP_RELATIVE_START and BOOST_PP_RELATIVE_FINISH.  + The flags of a relative dimension can be accessed with BOOST_PP_RELATIVE_FLAGS. +
+

+ Relativity +

+
+ I mentioned earlier that there is a reason that there are two ways to + parametize the mechanism.  The reason is dimensional abstraction.  In + certain situations the dimension is unknown by the code that is being + iterated--possibly because the code is reused at multiple, different + dimensions.  If that code needs to iterate again, it has to define the + right parameters (based on the dimension) for the mechanism to consume.  +
+
+ All of the macro state maintained by the mechanism can be referred to in an + indirect way relative to a dimension.  This is the purpose of the BOOST_PP_RELATIVE_ + accessors.  +
+
+ Likewise, the user-defined named external arguments can be defined this + way as well--except the name of the file to iterate.  Because the + lower and upper boundaries are evaluated by the mechanism, the + implementation no longer needs the macro BOOST_PP_ITERATION_LIMITS, and + the identifier can be reused for each dimension of iteration.  +
+
+ Unfortunately, the filename is a different story.  The library has no way + to evaluate the quoted (or angle-bracketed) text.  Therefore, it has to + use a different macro for each dimension.  That is the purpose of the BOOST_PP_FILENAME_x + macros.  They exist to isolate the only non-abstractable piece of data + required by the mechanism.  +
+
+ In order to define the filename in an abstract fashion, you need to do + something like this: +
+
+
 #define UNIQUE_TO_FILE "some_file.h"
 
 #if BOOST_PP_ITERATION_DEPTH() == 0
@@ -537,14 +620,16 @@ for (int i = start(1); i <= finish(1); ++i) {
 // ... up to BOOST_PP_LIMIT_ITERATION_DIM
 
 #endif
-
-
- The intent is to avoid having to do this for anything but the filename.  - If this needs to be done more than once in a file - (BOOST_PP_FILENAME_x is undefined by the mechanism after it is used.), - consider using a separate file to make the proper definition: -
-
+
+
+
+ The intent is to avoid having to do this for anything but the filename.  + If this needs to be done more than once in a file (BOOST_PP_FILENAME_x + is undefined by the mechanism after it is used.), consider using a separate + file to make the proper definition: +
+
+
 # // detail/define_file_h.h
 # ifndef FILE_H
 #   error FILE_H is not defined
@@ -563,11 +648,13 @@ for (int i = start(1); i <= finish(1); ++i) {
 # else
 #   error unsupported iteration dimension
 # endif
-
-
- And then use it like this.... -
-
+
+
+
+ And then use it like this.... +
+
+
 // file.h
 #if !BOOST_PP_IS_ITERATING
 
@@ -584,65 +671,83 @@ for (int i = start(1); i <= finish(1); ++i) {
 #else
    // iterated portion
 #endif
-
-
- With a little effort like this, it is possible to maintain the abstraction without the code bloat that would - otherwise be required.  - Unfortunately, this is not a completely general solution as it would need to be done for each unique filename, - but it is better than nothing. -
-

Conclusion

-
- That about covers the facilities that are available from the mechanism.  - Using these facilities, let's implement a function_traits template to demonstrate a full-fledge - use of the mechanism. -
-

Function Traits - An Involved Example

-
- Implementing a comprehensive function_traits template metafunction requires the use - of every major part of the file iteration mechanism.  -
-
- (This example makes no attempt of work around compiler deficiencies and exists only to illustrate the mechanism.) -
-
- The result should have the following features: -
-
    -
  • return type
  • -
  • number and types of parameters
  • -
  • whether or not the type is a pointer-to-function, reference-to-function, pointer-to-member-function, or a plain function type
  • -
  • whether the type has an ellipsis
  • -
  • if not a pointer-to-member-function, the equivalent pointer-to-function, reference-to-function, and function type
  • -
  • otherwise, the pointer-to-member type, the class type to which it refers, and whether it is const and/or volatile qualified
  • -
-
- There are a myriad of ways that this can be implemented.  - I'll give a brief summary here of what is happening in the implementation below.  -
-
- The implementation inherently has to deal with function arity.  - Therefore, at minimum, we need to iterate over function arities and define partial specializations of - the primary template function_traits.  - The situation is further complicated by variadic functions (i.e. functions with an ellipsis).  - Therefore, for every arity, we need a variadic version as well. -
-
- We also need to handle pointers-to-member-functions.  - This implies that we have to handle not just arity and variadics, but also cv-qualifications.  -
-
- For the sake of clarity, the implementation below handles function types and pointers-to-member-functions - separately.  - They could be merged, but the result would be significantly messier. -
-
- To handle function types, the implementation below iterates over function arities.  - For each arity, it iterates over each parameter to provide access to each individually.  - It then re-includes itself to define a variadic specialization of the same arity.  - It performs the rough equivalent of the following pseudo-code: -
-
+
+
+
+ With a little effort like this, it is possible to maintain the abstraction + without the code bloat that would otherwise be required.  Unfortunately, + this is not a completely general solution as it would need to be done for each + unique filename, but it is better than nothing. +
+

+ Conclusion +

+
+ That about covers the facilities that are available from the mechanism.  + Using these facilities, let's implement a function_traits template + to demonstrate a full-fledge use of the mechanism. +
+

+ Function Traits - An Involved Example +

+
+ Implementing a comprehensive function_traits template metafunction + requires the use of every major part of the file iteration mechanism.  +
+
+ (This example makes no attempt of work around compiler deficiencies and exists + only to illustrate the mechanism.) +
+
+ The result should have the following features: +
+
    +
  • + return type
  • +
  • + number and types of parameters
  • +
  • + whether or not the type is a pointer-to-function, reference-to-function, + pointer-to-member-function, or a plain function type
  • +
  • + whether the type has an ellipsis
  • +
  • + if not a pointer-to-member-function, the equivalent pointer-to-function, + reference-to-function, and function type
  • +
  • + otherwise, the pointer-to-member type, the class type to which it refers, and + whether it is const and/or volatile qualified
  • +
+
+ There are a myriad of ways that this can be implemented.  I'll give a + brief summary here of what is happening in the implementation below.  +
+
+ The implementation inherently has to deal with function arity.  Therefore, + at minimum, we need to iterate over function arities and define partial + specializations of the primary template function_traits.  The + situation is further complicated by variadic functions (i.e. functions with an + ellipsis).  Therefore, for every arity, we need a variadic version as + well. +
+
+ We also need to handle pointers-to-member-functions.  This implies that we + have to handle not just arity and variadics, but also cv-qualifications.  +
+
+ For the sake of clarity, the implementation below handles function types and + pointers-to-member-functions separately.  They could be merged, but the + result would be significantly messier. +
+
+ To handle function types, the implementation below iterates over function + arities.  For each arity, it iterates over each parameter to provide + access to each individually.  It then re-includes itself to define a + variadic specialization of the same arity.  It performs the rough + equivalent of the following pseudo-code: +
+
+
 void make_spec(int i, bool variadic) {
    :open function_traits<i, variadic>
       for (int j = 0; j < i; ++j) {
@@ -661,15 +766,17 @@ void function_types(int max_arity) {
    }
    return;
 }
-
-
- The implementation of pointers-to-member-functions is a bit different.  - First, it iterates over cv-qualifiers.  - For each cv-qualifier, it iterates over function arities.  - For each function arity, it iterates again over each parameter.  - It then re-includes itself to define a variadic specialization of the same arity.... -
-
+
+
+
+ The implementation of pointers-to-member-functions is a bit different.  + First, it iterates over cv-qualifiers.  For each cv-qualifier, it iterates + over function arities.  For each function arity, it iterates again over + each parameter.  It then re-includes itself to define a variadic + specialization of the same arity.... +
+
+
 void make_spec(int j, const char* cv, bool variadic) {
    :open function_traits<j, cv, variadic>
       for (int k = 0; k < j; ++k) {
@@ -696,13 +803,15 @@ void pointers_to_members(int max_arity) {
    }
    return;
 }
-
-
- Here is the complete implementation.  - This example represents the power of the file iteration mechanism as well as the library in general, - so follow it carefully if you wish to fully understand what the mechanism does.... -
-
+
+
+
+ Here is the complete implementation.  This example represents the power of + the file iteration mechanism as well as the library in general, so follow it + carefully if you wish to fully understand what the mechanism does.... +
+
+
 // function_traits.hpp
 
 #if !BOOST_PP_IS_ITERATING
@@ -899,23 +1008,30 @@ template<class T> struct function_traits<T&> : function_traits&l
    #undef X
 
 #endif
-
-
- One problem that still exists is the lack of support for throw specifications.  - There is no way that we can completely handle it anyway because we cannot partially specialize - on throw specifications.  - However, we could accurately report the "actual" function type, etc., including the throw - specification (which the above implementation doesn't do, as it reconstructs those types).  - If you like, you can figure out how to do that on your own as an exercise.  -
- -

See Also

- -
- Paul Mensonides
- +

+ See Also +

+ +
+ - Paul Mensonides +
+