From 2b46c0f6bd76f25443fd97c656eb13bf74ba2fbf Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Thu, 27 Feb 2014 16:49:57 -0500 Subject: [PATCH 1/5] Added topics for showing lists of macros which re-enter FOR, REPEAT, and WHILE. --- doc/ref/for_r_macros.html | 39 +++++++++++++++++ doc/ref/repeat_z_macros.html | 43 +++++++++++++++++++ doc/ref/while_d_macros.html | 82 ++++++++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 doc/ref/for_r_macros.html create mode 100644 doc/ref/repeat_z_macros.html create mode 100644 doc/ref/while_d_macros.html diff --git a/doc/ref/for_r_macros.html b/doc/ref/for_r_macros.html new file mode 100644 index 0000000..854d826 --- /dev/null +++ b/doc/ref/for_r_macros.html @@ -0,0 +1,39 @@ + + + + BOOST_PP_FOR_r_macros + + + This is a list, based on functionality, of the macros which have an + alternate _r name, representing a reentry into the BOOST_PP_FOR + looping construct: +

repetition

+ + list
+ + seq
+ +
+ +
+
© Copyright Edward Diener 2014
+
+

Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt + or copy at www.boost.org/LICENSE_1_0.txt)

+
+ + diff --git a/doc/ref/repeat_z_macros.html b/doc/ref/repeat_z_macros.html new file mode 100644 index 0000000..878a9f7 --- /dev/null +++ b/doc/ref/repeat_z_macros.html @@ -0,0 +1,43 @@ + + + + BOOST_PP_REPEAT_z_macros + + + This is a list, based on functionality, of the macros which have an + alternate _z name, representing a reentry into the BOOST_PP_REPEAT + looping construct:
+
+ array
+ + repetition
+ +
+
+
+
+
© Copyright Edward Diener 2014
+
+

Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt + or copy at www.boost.org/LICENSE_1_0.txt)

+
+ + diff --git a/doc/ref/while_d_macros.html b/doc/ref/while_d_macros.html new file mode 100644 index 0000000..9d2aabb --- /dev/null +++ b/doc/ref/while_d_macros.html @@ -0,0 +1,82 @@ + + + + BOOST_PP_WHILE_d_macros + + + This is a list, based on functionality, of the macros which have an + alternate _d name, representing a reentry into the BOOST_PP_WHILE + looping construct:
+
+ arithmetic
+ + array
+ + comparison
+ + control
+ + list
+ + + selection
+ + repetition
+ + tuple
+ +
+
+
© Copyright Edward Diener 2014
+
+

Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt + or copy at www.boost.org/LICENSE_1_0.txt)

+
+ + From 042fb29bf1c223276dc7a94f5aeee7530a5db284 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Thu, 27 Feb 2014 17:06:00 -0500 Subject: [PATCH 2/5] Added links to topics with macros which use re-entrancy versions. --- doc/ref/for_r.html | 157 ++++++++++++++++++++--------------------- doc/ref/repeat_z.html | 140 +++++++++++++++++-------------------- doc/ref/while_d.html | 158 +++++++++++++++++++----------------------- 3 files changed, 211 insertions(+), 244 deletions(-) diff --git a/doc/ref/for_r.html b/doc/ref/for_r.html index 1c23bb4..a566ea7 100644 --- a/doc/ref/for_r.html +++ b/doc/ref/for_r.html @@ -1,75 +1,68 @@ - - BOOST_PP_FOR_r - - - -
- The BOOST_PP_FOR_r macro represents a reentry into the BOOST_PP_FOR repetition construct. -
-

Usage

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

Arguments

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

Remarks

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

See Also

- -

Requirements

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

Sample Code

-
-#include <boost/preprocessor/arithmetic/dec.hpp>
+  
+    
+    BOOST_PP_FOR_r
+    
+  
+  
+    
The BOOST_PP_FOR_r macro + represents a reentry into the BOOST_PP_FOR repetition construct.
+

Usage

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

Arguments

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

Remarks

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

See Also

+ +

Requirements

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

Sample Code

+
+
#include <boost/preprocessor/arithmetic/dec.hpp>
 #include <boost/preprocessor/arithmetic/inc.hpp>
 #include <boost/preprocessor/comparison/not_equal.hpp>
 #include <boost/preprocessor/punctuation/comma_if.hpp>
@@ -140,16 +133,14 @@ TEMPLATE_TEMPLATE(2, 4, T)
    template<class, class, class, class> class T4
 */
 
-
-
- © Copyright Housemarque Oy 2002 -
© Copyright Paul Mensonides 2002 -
-
-

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

-
- +
+
© Copyright Housemarque Oy 2002
+ © Copyright Paul Mensonides 2002
+
+

Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt + or copy at www.boost.org/LICENSE_1_0.txt)

+
+ diff --git a/doc/ref/repeat_z.html b/doc/ref/repeat_z.html index 36d0d03..e808135 100644 --- a/doc/ref/repeat_z.html +++ b/doc/ref/repeat_z.html @@ -1,67 +1,59 @@ - - BOOST_PP_REPEAT_z - - - -
- The BOOST_PP_REPEAT_z macro represents a reentry into the BOOST_PP_REPEAT repetition construct. -
-

Usage

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

Arguments

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

Remarks

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

See Also

- -

Requirements

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

Sample Code

-
-#include <boost/preprocessor/arithmetic/inc.hpp>
+  
+    
+    BOOST_PP_REPEAT_z
+    
+  
+  
+    
The BOOST_PP_REPEAT_z macro + represents a reentry into the BOOST_PP_REPEAT repetition + construct.
+

Usage

+
BOOST_PP_REPEAT_ ## z(count, macro, + data)
+

Arguments

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

Remarks

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

See Also

+ +

Requirements

+ +

Sample Code

+
+
#include <boost/preprocessor/arithmetic/inc.hpp>
 #include <boost/preprocessor/punctuation/comma_if.hpp>
 #include <boost/preprocessor/repetition/repeat.hpp>
 
@@ -85,16 +77,14 @@
       template<class, class, class> class T2
    */
 
-
-
- © Copyright Housemarque Oy 2002 -
© Copyright Paul Mensonides 2002 -
-
-

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

-
- +
+
© Copyright Housemarque Oy 2002
+ © Copyright Paul Mensonides 2002
+
+

Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt + or copy at www.boost.org/LICENSE_1_0.txt)

+
+ diff --git a/doc/ref/while_d.html b/doc/ref/while_d.html index 8b59f10..0be1bcb 100644 --- a/doc/ref/while_d.html +++ b/doc/ref/while_d.html @@ -1,78 +1,66 @@ - - BOOST_PP_WHILE_d - - - -
- The BOOST_PP_WHILE_d macro represents a reentry into the BOOST_PP_WHILE looping construct. -
-

Usage

-
- BOOST_PP_WHILE_ ## d(pred, op, state) -
-

Arguments

-
-
d
-
- The next available BOOST_PP_WHILE iteration. -
-
pred
-
- A binary predicate of the form pred(d, state).  - This predicate is expanded by BOOST_PP_WHILE with the next available - iteration d and the current state.  - This predicate must expand to value in the range of 0 to BOOST_PP_LIMIT_MAG. - The construct continues to loop until this predicate returns 0.  - When this predicate returns 0, BOOST_PP_WHILE returns the current state. -
-
op
-
- A binary operation of the form op(d, state).  - This operation is expanded by BOOST_PP_WHILE with the next available - iteration d and the current state.  - This macro is repeatedly applied to the state, each time producing a new state, until pred returns 0. -
-
state
-
- The initial state.  - Often this argument is a tuple. -
-
-

Remarks

-
- This macro iterates op(d, state) while pred(d, state) is non-zero.  - In other words expands to: -
- op(d, ... op(d, op(d, state)) ... ). -
-
-
- At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.  - This happens when the d value is a macro invocation itself.  - It needs a delay to allow it to expand.  - The syntax in such a scenario becomes: -
- BOOST_PP_CAT(BOOST_PP_WHILE_, d)(pred, op, state). -
-
-
- Previously, it was possible to concatenate d directly to BOOST_PP_WHILE (without the trailing underscore).  - This is no longer supported. -
-

See Also

- -

Requirements

- -

Sample Code

-
-#include <boost/preprocessor/arithmetic/add.hpp>
+  
+    
+    BOOST_PP_WHILE_d
+    
+  
+  
+    
The BOOST_PP_WHILE_d macro + represents a reentry into the BOOST_PP_WHILE looping construct.
+

Usage

+
BOOST_PP_WHILE_ ## d(pred, op, + state)
+

Arguments

+
+
d
+
The next available BOOST_PP_WHILE iteration.
+
pred
+
A binary predicate of the form pred(d, state).  + This predicate is expanded by BOOST_PP_WHILE with the next + available iteration d and the current state.  This + predicate must expand to value in the range of 0 to BOOST_PP_LIMIT_MAG. + The construct continues to loop until this predicate returns 0.  + When this predicate returns 0, BOOST_PP_WHILE returns + the current state.
+
op
+
A binary operation of the form op(d, state).  + This operation is expanded by BOOST_PP_WHILE with the next + available iteration d and the current state.  This + macro is repeatedly applied to the state, each time producing a + new state, until pred returns 0.
+
state
+
The initial state.  Often this argument is a tuple.
+
+

Remarks

+
This macro iterates op(d, state) while pred(d, + state) is non-zero.  In other words expands to: +
op(d, ... op(d, op(d, state)) + ... ).
+
+
At certain times, it may be necessary to perform the concatenation + with BOOST_PP_CAT rather than the preprocessor token-pasting + operator.  This happens when the d value is a macro + invocation itself.  It needs a delay to allow it to expand.  The + syntax in such a scenario becomes: +
BOOST_PP_CAT(BOOST_PP_WHILE_, d)(pred, + op, state).
+
+
Previously, it was possible to concatenate d directly to BOOST_PP_WHILE + (without the trailing underscore).  This is no longer supported.
+

See Also

+ +

Requirements

+ +

Sample Code

+
+
#include <boost/preprocessor/arithmetic/add.hpp>
 #include <boost/preprocessor/arithmetic/dec.hpp>
 #include <boost/preprocessor/array/elem.hpp>
 #include <boost/preprocessor/array/size.hpp>
@@ -114,16 +102,14 @@
 
 ACCUMULATE_D(1, ARRAY)// expands to 10
 
-
-
- © Copyright Housemarque Oy 2002 -
© Copyright Paul Mensonides 2002 -
-
-

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

-
- +
+
© Copyright Housemarque Oy 2002
+ © Copyright Paul Mensonides 2002
+
+

Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt + or copy at www.boost.org/LICENSE_1_0.txt)

+
+ From a5ed4fe7d8c97f2d51971613f35ca441612d494c Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Thu, 27 Feb 2014 17:25:32 -0500 Subject: [PATCH 3/5] Added copyright and base link back to original macro. --- doc/ref/for_r.html | 4 +++- doc/ref/for_r_macros.html | 5 +++++ doc/ref/repeat_z.html | 4 +++- doc/ref/repeat_z_macros.html | 6 ++++-- doc/ref/while_d.html | 4 +++- doc/ref/while_d_macros.html | 4 ++++ 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/doc/ref/for_r.html b/doc/ref/for_r.html index a566ea7..cba1678 100644 --- a/doc/ref/for_r.html +++ b/doc/ref/for_r.html @@ -136,7 +136,9 @@ TEMPLATE_TEMPLATE(2, 4, T)
© Copyright Housemarque Oy 2002
- © Copyright Paul Mensonides 2002
+ © Copyright Paul Mensonides 2002
+
© Copyright Edward Diener 2014
+

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt diff --git a/doc/ref/for_r_macros.html b/doc/ref/for_r_macros.html index 854d826..e5dda58 100644 --- a/doc/ref/for_r_macros.html +++ b/doc/ref/for_r_macros.html @@ -25,6 +25,11 @@

  • BOOST_PP_SEQ_FOR_EACH_PRODUCT_R
  • BOOST_PP_SEQ_FOR_EACH_R
  • + base
    +
    diff --git a/doc/ref/repeat_z.html b/doc/ref/repeat_z.html index e808135..7bd4eb2 100644 --- a/doc/ref/repeat_z.html +++ b/doc/ref/repeat_z.html @@ -80,7 +80,9 @@
    © Copyright Housemarque Oy 2002
    - © Copyright Paul Mensonides 2002
    + © Copyright Paul Mensonides 2002
    +
    © Copyright Edward Diener 2014
    +

    Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt diff --git a/doc/ref/repeat_z_macros.html b/doc/ref/repeat_z_macros.html index 878a9f7..14b8182 100644 --- a/doc/ref/repeat_z_macros.html +++ b/doc/ref/repeat_z_macros.html @@ -27,11 +27,13 @@

  • BOOST_PP_ENUM_z
  • BOOST_PP_REPEAT_FROM_TO_D_z
  • BOOST_PP_REPEAT_FROM_TO_z
  • + + base
    +
    -
    -
    +
    
         
    © Copyright Edward Diener 2014
    diff --git a/doc/ref/while_d.html b/doc/ref/while_d.html index 0be1bcb..1738922 100644 --- a/doc/ref/while_d.html +++ b/doc/ref/while_d.html @@ -105,7 +105,9 @@ ACCUMULATE_D(1, ARRAY)// expands to 10
    © Copyright Housemarque Oy 2002
    - © Copyright Paul Mensonides 2002
    + © Copyright Paul Mensonides 2002
    +
    © Copyright Edward Diener 2014
    +

    Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt diff --git a/doc/ref/while_d_macros.html b/doc/ref/while_d_macros.html index 9d2aabb..09ca380 100644 --- a/doc/ref/while_d_macros.html +++ b/doc/ref/while_d_macros.html @@ -70,6 +70,10 @@

  • BOOST_PP_TUPLE_REMOVE_D
  • BOOST_PP_TUPLE_REPLACE_D
  • + base
    +

    © Copyright Edward Diener 2014
    From cc9fbc3734f5e55da03ba699ae99ffaf8baefddb Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Thu, 27 Feb 2014 17:37:30 -0500 Subject: [PATCH 4/5] Fix incorrect line ending. --- doc/ref/for_r.html | 3 ++- doc/ref/repeat_z.html | 3 ++- doc/ref/while_d.html | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/ref/for_r.html b/doc/ref/for_r.html index cba1678..3221f88 100644 --- a/doc/ref/for_r.html +++ b/doc/ref/for_r.html @@ -134,7 +134,8 @@ TEMPLATE_TEMPLATE(2, 4, T) */

    -
    © Copyright © Copyright Housemarque Oy 2002
    © Copyright Paul Mensonides 2002
    © Copyright Edward Diener 2014
    diff --git a/doc/ref/repeat_z.html b/doc/ref/repeat_z.html index 7bd4eb2..a2f21b8 100644 --- a/doc/ref/repeat_z.html +++ b/doc/ref/repeat_z.html @@ -78,7 +78,8 @@ */

    -
    © Copyright © Copyright Housemarque Oy 2002
    © Copyright Paul Mensonides 2002
    © Copyright Edward Diener 2014
    diff --git a/doc/ref/while_d.html b/doc/ref/while_d.html index 1738922..42f9eab 100644 --- a/doc/ref/while_d.html +++ b/doc/ref/while_d.html @@ -103,7 +103,8 @@ ACCUMULATE_D(1, ARRAY)// expands to 10

    -
    © Copyright © Copyright Housemarque Oy 2002
    © Copyright Paul Mensonides 2002
    © Copyright Edward Diener 2014
    From 91fb925e1ca752699c2947b3d5562e64a74973f0 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Thu, 27 Feb 2014 22:43:23 -0500 Subject: [PATCH 5/5] Correct line ending. --- doc/ref/while_d_macros.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/ref/while_d_macros.html b/doc/ref/while_d_macros.html index 09ca380..7d8a945 100644 --- a/doc/ref/while_d_macros.html +++ b/doc/ref/while_d_macros.html @@ -12,13 +12,13 @@ array