Issue for BOOST_PP_REMOVE_PARENS macro

Open
#50 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp
Domain
tooling

Research direction

Inspect remove_parens.hpp lines 24-36, focusing on the BOOST_PP_REMOVE_PARENS expansion identified in the report. Reproduce the macro expansion for parenthesized and non-parenthesized parameters, then verify that the resulting expansion matches the requested behavior.

Written by the indexing model from the issue text.

Description

I'm now using BOOST preprocess library for generate set/get/to_json/from_json code automatically. But I find some problem when using BOOST_PP_REMOVE_PARENS macro. Please check it.
Follow is the code in remove_parens.hpp with line 24-36.
The code for line 31 which should be (param) not (param)() in the original code.

#define BOOST_PP_REMOVE_PARENS(param)
BOOST_PP_IIF
(
BOOST_PP_IS_BEGIN_PARENS(param),
BOOST_PP_REMOVE_PARENS_DO,
BOOST_PP_IDENTITY
)
(param)() \ /// The content should be (param) not (param)().
/**/

#define BOOST_PP_REMOVE_PARENS_DO(param)
BOOST_PP_IDENTITY(BOOST_PP_TUPLE_ENUM(param))
/**/

Dominant language
C++
Stars
118
Forks
76
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/preprocessor

All issues in boostorg/preprocessor

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.