Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Compile time check to assert # keywords == arity

Open
#378 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start in include/boost/python/make_function.hpp, specifically make_function_aux and its existing check for too many keywords. Trace how argument arity and keyword counts are represented, then verify that the relevant Boost.Python tests cover both matching and mismatched counts; done means an incorrect count is rejected at compile time.

Written by the indexing model from the issue text.

Description

Experience has shown that C++ signatures may change over time: often arguments are added. Unfortunately, boost python will not complain if developers forget to update the bp export code.

make_function_aux in make_function.hpp already contains a check that the user did not provide too many keywords.
It would be useful if we could enable a check to assert that the number of keywords always is exactly equal to the number of arguments.

Dominant language
C++
Stars
537
Forks
223
Avg merge
11h 22m
Merged PRs (30d)
2

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/python

All issues in boostorg/python

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.