]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/preprocessor/doc/ref/lparen_if.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / preprocessor / doc / ref / lparen_if.html
CommitLineData
7c673cae
FG
1<html>
2<head>
3 <title>BOOST_PP_LPAREN_IF</title>
4 <link rel="stylesheet" type="text/css" href="../styles.css">
5</head>
6<body>
7 <div style="margin-left: 0px;">
8 The <b>BOOST_PP_LPAREN_IF</b> macro conditionally expands to a left parenthesis.
9 </div>
10 <h4>Usage</h4>
11 <div class="code">
12 <b>BOOST_PP_LPAREN_IF</b>(<i>cond</i>)
13 </div>
14 <h4>Arguments</h4>
15 <dl>
16 <dt>cond</dt>
17 <dd>
18 The condition that determines if a the macro expands to a left parenthesis or nothing.&nbsp;
19 Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
20 </dd>
21 </dl>
22 <h4>Remarks</h4>
23 <div>
24 If <i>cond</i> expands to <i>0</i>, this macro expands to nothing.&nbsp;
25 Otherwise, it expands to a left parenthesis.
26 </div>
27 <div>
28 The preprocessor interprets parentheses as delimiters in macro invocations.&nbsp;
29 Because of this, parentheses require special handling.
30 </div>
31 <h4>See Also</h4>
32 <ul>
33 <li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
34 <li><a href="rparen_if.html">BOOST_PP_RPAREN_IF</a></li>
35 </ul>
36 <h4>Requirements</h4>
37 <div>
38 <b>Header:</b> &nbsp;<a href="../headers/punctuation/paren_if.html">&lt;boost/preprocessor/punctuation/paren_if.hpp&gt;</a>
39 </div>
40 <h4>Sample Code</h4>
41<div><pre>
42#include &lt;<a href="../headers/punctuation/paren_if.html">boost/preprocessor/punctuation/paren_if.hpp</a>&gt;
43
44#define MACRO(c, x) <a href="lparen_if.html">BOOST_PP_LPAREN_IF</a>(c) x <a href="rparen_if.html">BOOST_PP_RPAREN_IF</a>(c)
45
46MACRO(0, text) // expands to text
47MACRO(1, text) // expands to (text)
48</pre></div>
49 <hr size="1">
50 <div style="margin-left: 0px;">
51