MCPcopy Create free account
hub / github.com/pybind/pybind11 / expected_num_args

Function expected_num_args

include/pybind11/attr.h:722–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720 size_t named = constexpr_sum(std::is_base_of<arg, Extra>::value...),
721 size_t self = constexpr_sum(std::is_same<is_method, Extra>::value...)>
722constexpr bool expected_num_args(size_t nargs, bool has_args, bool has_kwargs) {
723 PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(nargs, has_args, has_kwargs);
724 return named == 0
725 || (self + named + static_cast<size_t>(has_args) + static_cast<size_t>(has_kwargs))
726 == nargs;
727}
728
729PYBIND11_NAMESPACE_END(detail)
730PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected