Skip to content

doc: remove trigraph #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 19 additions & 27 deletions doc/topics/file_iteration.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,9 @@ <h4>
</div>
<div class="code">
<pre>
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()
</pre>
</div>
<div>
(The <code>??=</code> token is a trigraph for <code>#</code>.&nbsp; I use the
trigraph to make it clear that I am <i>including</i> a file rather than
defining or expanding a macro, but it is not necessary.&nbsp; Even the digraph
version, <code>%:</code>, could be used.&nbsp; Some compilers do not readily
accept trigraphs and digraphs, so keep that in mind.&nbsp; Other than that, use
whichever one you prefer.)
</div>
<div>
So, if we wish to iterate "file.h" from <i>1</i> to <i>10</i>, we just need to
put the pieces together:
Expand All @@ -119,7 +111,7 @@ <h4>
<pre>
#define BOOST_PP_ITERATION_LIMITS (1, 10)
#define BOOST_PP_FILENAME_1 "file.h"
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()
</pre>
</div>
<div>
Expand All @@ -136,7 +128,7 @@ <h4>
<div class="code">
<pre>
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()
</pre>
</div>
<div>
Expand Down Expand Up @@ -165,7 +157,7 @@ <h4>
template&lt;int&gt; struct sample;

#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 5, "file.h"))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()
</pre>
</div>
<div>
Expand Down Expand Up @@ -202,7 +194,7 @@ <h4>
template&lt;int&gt; struct sample;

#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 5, "sample.h"))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

#endif // SAMPLE_H

Expand Down Expand Up @@ -234,7 +226,7 @@ <h4>
template&lt;int&gt; struct sample;

#define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, "sample.h", 1))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

template&lt;class T, class U&gt; struct typelist_t {
typedef T head;
Expand All @@ -255,7 +247,7 @@ <h4>
#endif

#define BOOST_PP_ITERATION_PARAMS_1 (4, (2, TYPELIST_MAX, "sample.h", 2))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

#endif // SAMPLE_H

Expand Down Expand Up @@ -329,7 +321,7 @@ <h4>
#endif

#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, EXTRACT_MAX, "extract.h"))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

#endif // EXTRACT_H

Expand Down Expand Up @@ -458,7 +450,7 @@ <h4>
#include &lt;boost/preprocessor/iteration/iterate.hpp&gt;

#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 2, "file.h"))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

#endif // FILE_H

Expand All @@ -468,7 +460,7 @@ <h4>
+ BOOST_PP_ITERATION()

#define BOOST_PP_ITERATION_PARAMS_2 (3, (1, 2, "file.h"))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

// C

Expand Down Expand Up @@ -508,7 +500,7 @@ <h4>
#define I BOOST_PP_ITERATION()

#define BOOST_PP_ITERATION_PARAMS_2 (3, (1, 2, "file.h"))
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

#undef I

Expand Down Expand Up @@ -664,7 +656,7 @@ <h4>
#define BOOST_PP_ITERATION_LIMITS (1, 10)
#include "detail/define_file_h.h"

??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

#endif // FILE_H

Expand Down Expand Up @@ -858,7 +850,7 @@ <h4>
#define BOOST_PP_ITERATION_PARAMS_1 \
(4, (0, FUNCTION_TRAITS_MAX_ARITY, "function_traits.hpp", 0)) \
/**/
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

// obtain a cv-qualifier by index
#define QUALIFIER(n) \
Expand All @@ -874,7 +866,7 @@ <h4>
#define BOOST_PP_ITERATION_PARAMS_1 \
(4, (0, 3, "function_traits.hpp", 1)) \
/**/
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

// remove temporary macros
#undef QUALIFIER
Expand Down Expand Up @@ -925,7 +917,7 @@ <h4>
#define BOOST_PP_ITERATION_PARAMS_2 \
(3, (0, N - 1, "function_traits.hpp")) \
/**/
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()
#endif
};

Expand All @@ -935,7 +927,7 @@ <h4>
// re-include this section for an ellipsis variant
#if !BOOST_PP_IS_SELFISH
#define BOOST_PP_INDIRECT_SELF "function_traits.hpp"
??=include BOOST_PP_INCLUDE_SELF()
#include BOOST_PP_INCLUDE_SELF()
#endif

// iteration over cv-qualifiers
Expand All @@ -946,7 +938,7 @@ <h4>
#define BOOST_PP_ITERATION_PARAMS_2 \
(3, (0, FUNCTION_TRAITS_MAX_ARITY, "function_traits.hpp")) \
/**/
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()

// generate specializations for pointers-to-members
#elif BOOST_PP_ITERATION_DEPTH() == 2 \
Expand Down Expand Up @@ -982,7 +974,7 @@ <h4>
#define BOOST_PP_ITERATION_PARAMS_3 \
(3, (0, N - 1, "function_traits.hpp")) \
/**/
??=include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()
#endif
};

Expand All @@ -993,7 +985,7 @@ <h4>
// re-include this section for an ellipsis variant
#if !BOOST_PP_IS_SELFISH
#define BOOST_PP_INDIRECT_SELF "function_traits.hpp"
??=include BOOST_PP_INCLUDE_SELF()
#include BOOST_PP_INCLUDE_SELF()
#endif

// parameter specializations
Expand Down
13 changes: 3 additions & 10 deletions doc/topics/local_iteration.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,8 @@ <h4>Tutorial</h4>
Once these two macros are defined, the local iteration is initiated by <i>including</i> <b>BOOST_PP_LOCAL_ITERATE</b>().
</div>
<div class="code"><pre>
??=include BOOST_PP_LOCAL_ITERATE()
#include BOOST_PP_LOCAL_ITERATE()
</pre></div>
<div>
(The <code>??=</code> token is a trigraph for <code>#</code>.&nbsp;
I use the trigraph to make it clear that I am <i>including</i> a file rather than defining or expanding a macro, but it is not necessary.&nbsp;
Even the digraph version, <code>%:</code>, could be used.&nbsp;
Some compilers do not readily accept trigraphs and digraphs, so keep that in mind.&nbsp;
Other than that, use whichever one you prefer.)
</div>
<div>
In order to repeat the <code>sample</code> specialization, the pieces must be put together....
</div>
Expand All @@ -103,7 +96,7 @@ <h4>Tutorial</h4>
/**/

#define BOOST_PP_LOCAL_LIMITS (0, 10)
??=include BOOST_PP_LOCAL_ITERATE()
#include BOOST_PP_LOCAL_ITERATE()
</pre></div>
<div>
This will result in a specialization of <code>sample</code> for each number in the range of <i>0</i> to <i>10</i>.&nbsp;
Expand Down Expand Up @@ -132,7 +125,7 @@ <h4>Tutorial</h4>
#define BOOST_PP_LOCAL_LIMITS LIMITS
#define BOOST_PP_LOCAL_MACRO(n) SAMPLE(n)

??=include BOOST_PP_LOCAL_ITERATE()
#include BOOST_PP_LOCAL_ITERATE()
</pre></div>
<h4>See Also</h4>
<ul>
Expand Down