forked from boostorg/preprocessor
..
[SVN r25856]
This commit is contained in:
@ -47,7 +47,7 @@
|
||||
<a href="repeat.html">BOOST_PP_REPEAT</a>( \
|
||||
<a href="inc.html">BOOST_PP_INC</a>( \
|
||||
<a href="sub.html">BOOST_PP_SUB</a>(last, first) \
|
||||
, \
|
||||
), \
|
||||
RANGE_M, \
|
||||
(first, <a href="deduce_d.html">BOOST_PP_DEDUCE_D</a>()) \
|
||||
) \
|
||||
|
@ -36,11 +36,11 @@
|
||||
#define MACRO(a, b, c) (a)(b)(c)
|
||||
#define ARGS() (1, 2, 3)
|
||||
|
||||
<a href="expand.html">BOOST_PP_EXPAND</a>(MACRO ARGS) // expands to (1)(2)(3)
|
||||
<a href="expand.html">BOOST_PP_EXPAND</a>(MACRO ARGS()) // expands to (1)(2)(3)
|
||||
|
||||
#define SAMPLE(n) \
|
||||
<a href="expand.html">BOOST_PP_EXPAND</a>( \
|
||||
MACRO, \
|
||||
MACRO \
|
||||
<a href="if.html">BOOST_PP_IF</a>( \
|
||||
n, \
|
||||
(x, y, z), \
|
||||
|
@ -44,11 +44,12 @@
|
||||
<h4>Sample Code</h4>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/control/iif.html">boost/preprocessor/control/iif.hpp</a>>
|
||||
#include <<a href="../headers/logical/or.html">boost/preprocessor/logical/or.hpp</a>
|
||||
|
||||
#define OR_IF(p, q, t, f) <a href="iif.html">BOOST_PP_IIF</a>(<a href="or.html">BOOST_PP_OR</a>(p, q), t, f)
|
||||
|
||||
OR_IF(1, 0, abc, xyz) // expands to abc
|
||||
OF_IF(0, 0, abc, xyz) // expands to xyz
|
||||
OR_IF(0, 0, abc, xyz) // expands to xyz
|
||||
</pre></div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -51,7 +51,7 @@
|
||||
#define L1 (a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))
|
||||
#define L2 (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>)))
|
||||
|
||||
<a href="list_append.html">BOOST_PP_LIST_APPEND</a>e(L1, L2)
|
||||
<a href="list_append.html">BOOST_PP_LIST_APPEND</a>(L1, L2)
|
||||
// expands to (a, (b, (c, (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>))))))
|
||||
</pre></div>
|
||||
</body>
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#define LISTS \
|
||||
((a, (b, <a href="nil.html">BOOST_PP_NIL</a>)), \
|
||||
((d, (e, <a href="nil.html">BOOST_PP_NIL</a>)), \
|
||||
((c, (d, <a href="nil.html">BOOST_PP_NIL</a>)), \
|
||||
((e, (f, <a href="nil.html">BOOST_PP_NIL</a>)), \
|
||||
<a href="nil.html">BOOST_PP_NIL</a>))) \
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user