Brian Silverman | f27e085 | 2018-08-04 23:56:45 -0700 | [diff] [blame^] | 1 | <html> |
| 2 | <head> |
| 3 | <meta content="text/html; charset=windows-1252" http-equiv="content-type"> |
| 4 | <title>BOOST_PP_IS_BEGIN_PARENS</title> |
| 5 | <link rel="stylesheet" type="text/css" href="../styles.css"> |
| 6 | </head> |
| 7 | <body> |
| 8 | <div style="margin-left: 0px;"> The <b>BOOST_PP_IS_BEGIN_PAREN</b>S |
| 9 | determines whether the input starts with a set of parenthesis.</div> |
| 10 | <h4>Usage</h4> |
| 11 | <div class="code"> <b>BOOST_PP_IS_BEGIN_PARENS</b>(...) <a href="../topics/variadic_macros.html#VNotation" |
| 12 | target="_self"><sup>(v)</sup></a></div> |
| 13 | <h4>Arguments</h4> |
| 14 | <h4> ... <span style="font-weight: normal;"> |
| 15 | The input as variadic data.</span></h4> |
| 16 | <h4>Remarks</h4> |
| 17 | <div> If the input input begins with a parenthesis, with any data within |
| 18 | that parenthesis, the macro returns 1, otherwise it returns 0. Data may |
| 19 | follow the beginning parenthesis and the macro still will return 1.<br> |
| 20 | <br> |
| 21 | For Visual Studio 2005 ( VC8 ) the input data must be a single parameter |
| 22 | else a compilation error will occur.</div> |
| 23 | <h4>See Also</h4> |
| 24 | <ul> |
| 25 | <li><a href="remove_parens.html">BOOST_PP_REMOVE_PARENS</a></li> |
| 26 | </ul> |
| 27 | <h4>Requirements</h4> |
| 28 | <div> <b>Header:</b> <a href="../headers/punctuation/is_begin_parens.html"><boost/preprocessor/punctuation/is_begin_parens.hpp></a> |
| 29 | </div> |
| 30 | <h4>Sample Code</h4> |
| 31 | <div> |
| 32 | <pre>#include <<a href="../headers/punctuation/is_begin_parens.html">boost/preprocessor/punctuation/is_begin_parens.hpp</a>> |
| 33 | |
| 34 | #define VARDATA more_data , more_params<br>#define VARDATAP ( data ) more_data , more_params<br>#define DATA data<br>#define DATAP ( data ) more_data<br> |
| 35 | BOOST_PP_IS_BEGIN_PARENS(VARDATA) // expands to 0, compiler error with VC8 |
| 36 | BOOST_PP_IS_BEGIN_PARENS(VARDATAP) // expands to 1, compiler error with VC8<br><br>BOOST_PP_IS_BEGIN_PARENS(DATA) // expands to 0 |
| 37 | BOOST_PP_IS_BEGIN_PARENS(DATAP) // expands to 1<br><br>BOOST_PP_IS_BEGIN_PARENS() // expands to 0<br> |
| 38 | </pre></div> |
| 39 | <hr size="1"> |
| 40 | <div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2014</i> </div> |
| 41 | <div style="margin-left: 0px;"> |
| 42 | <p><small>Distributed under the Boost Software License, Version 1.0. (See |
| 43 | accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> |
| 44 | or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> |
| 45 | </div> |
| 46 | </body> |
| 47 | </html> |