Files
boost_preprocessor/docs.1/ref/iteration_depth.html
Paul Mensonides cdc4be5256 initial revision
[SVN r15198]
2002-09-08 09:40:56 +00:00

59 lines
1.5 KiB
HTML

<html>
<head>
<title>BOOST_PP_ITERATION_DEPTH</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="javascript" type="text/javascript" src="../scripts.js"></script>
</head>
<body onload="init('sample');">
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATION_DEPTH</b> macro expands to the current <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ITERATION_DEPTH</b>()
</div>
<h4>Remarks</h4>
<div>
If a <i>file-iteration</i> is not in progress, this macro expands to <i>0</i>.&nbsp;
Otherwise, it expands to the current depth of <i>file-iteration</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
<h4><a class="local" onclick="toggle('sample');" onmouseover="change(this);" onmouseout="revert(this);">Sample Code</a></h4>
<div id="sample"><pre>
// file.h
#if !BOOST_PP_IS_ITERATING
#ifndef FILE_H_
#define FILE_H_
#include &lt;boost/preprocessor/iteration/iterate.hpp&gt;
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 3, "file.h"))
#include BOOST_PP_ITERATE()
#endif
#elif BOOST_PP_ITERATION_DEPTH() == 1
+ depth BOOST_PP_ITERATION_DEPTH()
// ...
#define BOOST_PP_ITERATION_PARAMS_2 /* ... */ \
(3, (1, BOOST_PP_ITERATION(), "file.h")) \
/**/
#include BOOST_PP_ITERATE()
#elif BOOST_PP_ITERATION_DEPTH() == 2
- depth BOOST_PP_ITERATION_DEPTH()
// ...
#endif
<pre></div>
</body>
</html>