Go to the source code of this file.
Classes | |
struct | is_method |
Annotation for methods. More... | |
struct | is_operator |
Annotation for operators. More... | |
struct | is_final |
Annotation for classes that cannot be subclassed. More... | |
struct | scope |
Annotation for parent scope. More... | |
struct | doc |
Annotation for documentation. More... | |
struct | name |
Annotation for function names. More... | |
struct | sibling |
Annotation indicating that a function is an overload associated with a given "sibling". More... | |
struct | base< T > |
Annotation indicating that a class derives from another given type. More... | |
struct | keep_alive< Nurse, Patient > |
Keep patient alive while nurse lives. More... | |
struct | multiple_inheritance |
Annotation indicating that a class is involved in a multiple inheritance relationship. More... | |
struct | dynamic_attr |
Annotation which enables dynamic attributes, i.e. adds __dict__ to a class. More... | |
struct | buffer_protocol |
Annotation which enables the buffer protocol for a type. More... | |
struct | metaclass |
Annotation which requests that a special metaclass is created for a type. More... | |
struct | custom_type_setup |
Specifies a custom callback with signature void (PyHeapTypeObject*) that may be used to customize the Python type. More... | |
struct | module_local |
Annotation that marks a class as local to the module: More... | |
struct | arithmetic |
Annotation to mark enums as an arithmetic type. More... | |
struct | prepend |
Mark a function for addition at the beginning of the existing overload chain instead of the end. More... | |
struct | call_guard<> |
struct | call_guard< T > |
struct | call_guard< T, Ts... > |
struct | call_guard< T, Ts... >::type |
struct | argument_record |
Internal data structure which holds metadata about a keyword argument. More... | |
struct | function_record |
Internal data structure which holds metadata about a bound function (signature, overloads, etc.) More... | |
struct | type_record |
Special data structure which (temporarily) holds metadata about a bound class. More... | |
struct | is_new_style_constructor |
Tag for a new-style __init__ defined in detail/init.h More... | |
struct | process_attribute_default< T > |
struct | process_attribute< name > |
Process an attribute specifying the function's name. More... | |
struct | process_attribute< doc > |
Process an attribute specifying the function's docstring. More... | |
struct | process_attribute< const char * > |
Process an attribute specifying the function's docstring (provided as a C-style string) More... | |
struct | process_attribute< char * > |
struct | process_attribute< return_value_policy > |
Process an attribute indicating the function's return value policy. More... | |
struct | process_attribute< sibling > |
Process an attribute which indicates that this is an overloaded function associated with a given sibling. More... | |
struct | process_attribute< is_method > |
Process an attribute which indicates that this function is a method. More... | |
struct | process_attribute< scope > |
Process an attribute which indicates the parent scope of a method. More... | |
struct | process_attribute< is_operator > |
Process an attribute which indicates that this function is an operator. More... | |
struct | process_attribute< is_new_style_constructor > |
struct | process_attribute< arg > |
Process a keyword argument attribute (without a default value) More... | |
struct | process_attribute< arg_v > |
Process a keyword argument attribute (with a default value) More... | |
struct | process_attribute< kw_only > |
Process a keyword-only-arguments-follow pseudo argument. More... | |
struct | process_attribute< pos_only > |
Process a positional-only-argument maker. More... | |
struct | process_attribute< T, enable_if_t< is_pyobject< T >::value > > |
Process a parent class attribute. More... | |
struct | process_attribute< base< T > > |
Process a parent class attribute (deprecated, does not support multiple inheritance) More... | |
struct | process_attribute< multiple_inheritance > |
Process a multiple inheritance attribute. More... | |
struct | process_attribute< dynamic_attr > |
struct | process_attribute< custom_type_setup > |
struct | process_attribute< is_final > |
struct | process_attribute< buffer_protocol > |
struct | process_attribute< metaclass > |
struct | process_attribute< module_local > |
struct | process_attribute< prepend > |
Process a 'prepend' attribute, putting this at the beginning of the overload chain. More... | |
struct | process_attribute< arithmetic > |
Process an 'arithmetic' attribute for enums (does nothing here) More... | |
struct | process_attribute< call_guard< Ts... > > |
struct | process_attribute< keep_alive< Nurse, Patient > > |
Process a keep_alive call policy – invokes keep_alive_impl during the pre-call handler if both Nurse, Patient != 0 and use the post-call handler otherwise. More... | |
struct | process_attributes< Args > |
Recursively iterate over variadic template arguments. More... | |
Typedefs | |
template<typename T > | |
using | is_call_guard = is_instantiation< call_guard, T > |
template<typename... Extra> | |
using | extract_guard_t = typename exactly_one_t< is_call_guard, call_guard<>, Extra... >::type |
Extract the type from the first call_guard in Extras... (or void_type if none found) More... | |
Functions | |
void | keep_alive_impl (size_t Nurse, size_t Patient, function_call &call, handle ret) |
void | check_kw_only_arg (const arg &a, function_record *r) |
void | append_self_arg_if_needed (function_record *r) |
template<typename... Extra, size_t named = constexpr_sum(std::is_base_of<arg, Extra>::value...), size_t self = constexpr_sum(std::is_same<is_method, Extra>::value...)> | |
constexpr bool | expected_num_args (size_t nargs, bool has_args, bool has_kwargs) |
Check the number of named arguments at compile time. More... | |
using extract_guard_t = typename exactly_one_t<is_call_guard, call_guard<>, Extra...>::type |
Extract the type
from the first call_guard
in Extras...
(or void_type
if none found)
using is_call_guard = is_instantiation<call_guard, T> |
|
inline |
Definition at line 454 of file attr.h.
References function_record::args, and function_record::is_method.
Referenced by process_attribute< arg >::init(), process_attribute< kw_only >::init(), and process_attribute< pos_only >::init().
|
inline |
Definition at line 447 of file attr.h.
References function_record::args, arg::name, function_record::nargs_pos, and pybind11_fail().
Referenced by process_attribute< arg >::init(), and process_attribute< arg_v >::init().
|
constexpr |
Check the number of named arguments at compile time.
Definition at line 669 of file attr.h.
References PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100, and self.
Referenced by cpp_function::initialize().
void keep_alive_impl | ( | size_t | Nurse, |
size_t | Patient, | ||
function_call & | call, | ||
handle | ret | ||
) |
Definition at line 2239 of file pybind11.h.
References function_call::args, function_call::init_self, and keep_alive_impl().
Referenced by process_attribute< keep_alive< Nurse, Patient > >::postcall(), and process_attribute< keep_alive< Nurse, Patient > >::precall().