The BOOST_PP_IS_BEGIN_PARENS determines whether the input starts with a set of parenthesis.

Usage

BOOST_PP_IS_BEGIN_PARENS(...) (v)

Arguments

    ...            The input as variadic data.

Remarks

If the input input begins with a parenthesis, with any data within that parenthesis, the macro returns 1, otherwise it returns 0. Data may follow the beginning parenthesis and the macro still will return 1.

For Visual Studio 2005 ( VC8 ) the input data must be a single parameter else a compilation error will occur.

See Also

Requirements

Header:  <boost/preprocessor/punctuation/is_begin_parens.hpp>

Sample Code

#include <boost/preprocessor/punctuation/is_begin_parens.hpp>

#define VARDATA more_data , more_params
#define VARDATAP ( data ) more_data , more_params
#define DATA data
#define DATAP ( data ) more_data
BOOST_PP_IS_BEGIN_PARENS(VARDATA) // expands to 0, compiler error with VC8 BOOST_PP_IS_BEGIN_PARENS(VARDATAP) // expands to 1, compiler error with VC8

BOOST_PP_IS_BEGIN_PARENS(DATA) // expands to 0 BOOST_PP_IS_BEGIN_PARENS(DATAP) // expands to 1

BOOST_PP_IS_BEGIN_PARENS() // expands to 0

© Copyright Edward Diener 2014

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)