Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add optional compile time check #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 include/boost/python/args_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ namespace detail
{
typedef char too_many_keywords[keywords > function_args ? -1 : 1];
};
template <int keywords, int function_args>
struct less_keywords_than_function_arguments
{
typedef char too_few_keywords[(keywords!=0 && keywords < function_args) ? -1 : 1];
};
}
}

Expand Down
8 changes: 7 additions & 1 deletion 8 include/boost/python/make_function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ namespace detail
typedef typename detail::error::more_keywords_than_function_arguments<
NumKeywords::value, arity
>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED;


#ifdef BOOST_PYTHON_NUM_KEYWORDS_EQUALS_ARITY
typedef typename detail::error::less_keywords_than_function_arguments<
NumKeywords::value, arity
>::too_few_keywords assertion2 BOOST_ATTRIBUTE_UNUSED;
#endif

return objects::function_object(
detail::caller<F,CallPolicies,Sig>(f, p)
, kw);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.