preprocessor/doc/ref/remove_parens.html

45 lines
2.2 KiB
HTML

<html>
<head>
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
<title>BOOST_PP_REMOVE_PARENS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_REMOVE_PAREN</b>S macro
removes the beginning parenthesis, if it exists, from the input data and
expands to the result</div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_REMOVE_PARENS</b>(param) <a href="../topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a></div>
<h4>Arguments&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: normal;"></span></h4>
<h4><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp; param</span>&nbsp;&nbsp;
<span style="font-weight: normal;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
The input data.</span></h4>
<h4>Remarks</h4>
<div> If the input begins with a parenthesis, with any data within that
parenthesis, the macro removes the parenthesis and expands to the result.
If the input does not begin with a parenthesis the macro expands to the
input.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="is_begin_parens.html">BOOST_PP_IS_BEGIN_PARENS</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/punctuation/remove_parens.html">&lt;boost/preprocessor/punctuation/remove_parens.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/punctuation/remove_parens.html">boost/preprocessor/punctuation/remove_parens.hpp</a>&gt;<br><br>#define DATA data<br>#define DATAP ( data ) more_data<br><br>BOOST_PP_REMOVE_PARENS(DATA) // expands to 'data'
BOOST_PP_REMOVE_PARENS(DATAP) // expands to 'data more_data'<br>
</pre></div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2014</i> </div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>