Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
Data Structures | Typedefs
ruby::backward::cxxanyargs::define_method Namespace Reference

Driver for *_define_method. More...

Data Structures

struct  driver
 Template metaprogramming to generate function prototypes. More...
 
struct  driver0
 
struct  rb_define_global_function
 Dispatches appropriate driver for rb_define_global_function. More...
 
struct  rb_define_method
 Dispatches appropriate driver for rb_define_method. More...
 
struct  rb_define_method_id
 Dispatches appropriate driver for rb_define_method_id. More...
 
struct  rb_define_module_function
 Dispatches appropriate driver for rb_define_module_function. More...
 
struct  rb_define_private_method
 Dispatches appropriate driver for rb_define_private_method. More...
 
struct  rb_define_protected_method
 Dispatches appropriate driver for rb_define_protected_method. More...
 
struct  rb_define_singleton_method
 Dispatches appropriate driver for rb_define_singleton_method. More...
 

Typedefs

typedef VALUE notimpl_type(int, const VALUE *, VALUE, VALUE)
 Type of rb_f_notimplement(). More...
 

Detailed Description

Driver for *_define_method.

rb_define_method function for instance takes a pointer to ANYARGS-ed functions, which in fact varies 18 different prototypes. We still need to preserve ANYARGS for storages but why not check the consistencies if possible. In C++ a function has its own prototype, which is a compile-time constant (static type) by nature. We can list up all the possible input types and provide warnings for other cases. This is such attempt.

Typedef Documentation

◆ notimpl_type

typedef VALUE ruby::backward::cxxanyargs::define_method::notimpl_type(int, const VALUE *, VALUE, VALUE)

Type of rb_f_notimplement().

Definition at line 515 of file cxxanyargs.hpp.