|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
The stored forms of the annotation vocabulary. More...
Classes | |
| struct | accessor_spec |
| The stored form of a getter / setter mark: which property half the function supplies, for which languages, under which (optional) explicit name. More... | |
| struct | any_type |
| A placeholder class type for shape-probing a member template inside a concept. More... | |
| struct | container_spec |
| One row of the reference-container table: a container template paired with the opaque binder kind it uses. More... | |
| struct | doc_spec |
| The stored form of a doc annotation: a summary docstring. More... | |
| struct | enum_doc |
| The raw documentation pieces of an enum, handed to a style to assemble. More... | |
| struct | enumerator_doc |
| One enumerator's documentation for the enum_doc list: its bound (target-language) name and its doc text. More... | |
| struct | exclude_spec |
| The stored form of an exclude mark: the languages a member is hidden from. More... | |
| struct | field_access |
| Splice-based accessors for data member Mem — the pointer-to-member-free route the rods bind a protected field through. More... | |
| struct | fixed_string |
| A string literal captured by value, length included, so it can live in a structural annotation constant. More... | |
| struct | function_doc |
| The raw documentation pieces of a function, handed to a style to assemble. More... | |
| struct | include_spec |
| The stored form of an include mark: the languages a member is opted into. More... | |
| struct | keep_alive_pair |
| A keep_alive lifetime dependency: a (nurse, patient) index pair. More... | |
| struct | keep_alive_spec |
| The stored form of a keep_alive annotation: a lifetime dependency between two of a call's entities, addressed by pybind11/nanobind's index convention (0 = the return value, 1 = the first argument — the implicit this for a method — 2 = the second, …). More... | |
| struct | module_welder |
| Pick the entry macro's welder: the user's optional override, else the rod's default welder::welder<rod>. More... | |
| struct | module_welder< Default, First, Rest... > |
| struct | no_reassign_spec |
| The stored form of a no_reassign mark: the languages a data member is bound read-only** for, independent of whether its C++ type is const. More... | |
| struct | only_spec |
| The stored form of an only mark: the complete set of languages a member may bind for — implicitly, not for any other. More... | |
| struct | param_doc |
| One function parameter's documentation: its identifier (nullptr if unnamed) and its doc text (nullptr if undocumented). More... | |
| struct | policy_spec |
| The stored form of a policy annotation. More... | |
| struct | property_entry |
| One resolved property: its getter and its (optional) setter. More... | |
| struct | return_doc_spec |
| The stored form of a returns annotation: a function's return-value doc. More... | |
| struct | return_policy_spec |
| The stored form of a return_policy annotation: a return-value policy, optionally scoped to some languages. More... | |
| struct | scoped_registration |
| The scope-aware registration oracle: Resolution widened with the member-alias registrations of one class. More... | |
| struct | synthesized_comparison |
| struct | tparam_doc |
| One documented template parameter of an entity: the parameter's name (as spelled in the tparam annotation) and its doc text. More... | |
| struct | tparam_spec |
| The stored form of a tparam annotation: one template parameter's doc. More... | |
| struct | trust_bindable_spec |
| The stored form of a trust_bindable member mark. More... | |
| struct | weld_as_spec |
| The stored form of a weld_as annotation: a forced target-language name. More... | |
| struct | weld_protected_spec |
| The stored form of a policy::weld_protected annotation: the languages a type's protected members are admitted for. More... | |
| struct | weld_spec |
| The stored form of a weld annotation: the mask of target languages. More... | |
| struct | wrapper_spec |
| One row of the element-wise STL-wrapper table. More... | |
Typedefs | |
| using | overload_selector |
| The signature of an overload-set selector specialization: the representative overload, the language, and the entity the group binds into. | |
| template<class Default, class... Override> | |
| using | module_welder_t = typename module_welder<Default, Override...>::type |
Enumerations | |
| enum class | cmp_slot : std::uint8_t { lt = 0 , le = 1 , gt = 2 , ge = 3 } |
| The rewritten-expression comparison a rod binds for a type whose C++ comparisons come from operator<=>: plain a < b (etc.), so C++'s own operator-rewriting rules ([over.match.oper]) pick the spaceship overload — heterogeneous and reversed operands included — and the target language sees exactly what a C++ caller sees. More... | |
| enum class | any_enum |
| A placeholder enum type for shape-probing the enum hooks against a rod's enum_handle_type<E> — any_type is a class, so it cannot stand in for an enum. More... | |
Functions | |
| consteval unsigned | accessor_mask () |
| The language mask of an accessor argument list: the OR of its leading lang markers (a trailing name contributes nothing; none → 0 = all). | |
| template<size_type N> | |
| consteval unsigned | accessor_mask (const char(&)[N]) |
| template<class... Rest> | |
| consteval unsigned | accessor_mask (lang l, Rest &&... rest) |
| consteval void | accessor_name (char(&)[accessor_name_capacity]) |
| Copy an accessor argument list's trailing explicit name into dst (left empty when the list carries none — the derive-from-identifier sentinel). | |
| template<size_type N> | |
| consteval void | accessor_name (char(&dst)[accessor_name_capacity], const char(&s)[N]) |
| template<class... Rest> | |
| consteval void | accessor_name (char(&dst)[accessor_name_capacity], lang, Rest &&... rest) |
| consteval unsigned | weld_as_mask () |
| The language mask of a weld_as argument list: the OR of its leading lang markers (the trailing name contributes nothing; no markers → 0 = all). | |
| template<size_type N> | |
| consteval unsigned | weld_as_mask (const char(&)[N]) |
| template<class... Rest> | |
| consteval unsigned | weld_as_mask (lang l, Rest &&... rest) |
| template<size_type N> | |
| consteval fixed_string< N > | weld_as_name (const char(&s)[N]) |
| The verbatim name of a weld_as argument list: the trailing string, reached by dropping the leading lang markers (its extent N preserved by reference). | |
| template<class... Rest> | |
| consteval auto | weld_as_name (lang, Rest &&... rest) |
| consteval unsigned | return_policy_mask (rv_kind) |
| The language mask of a return_policy argument list: the OR of its leading lang markers (the trailing kind contributes nothing; no markers → 0 = all). | |
| template<class... Rest> | |
| consteval unsigned | return_policy_mask (lang l, Rest... rest) |
| consteval rv_kind | return_policy_kind (rv_kind k) |
| The policy of a return_policy argument list: the trailing kind, reached by dropping the leading lang markers. | |
| template<class... Rest> | |
| consteval rv_kind | return_policy_kind (lang, Rest... rest) |
| template<std::meta::info Fn> | |
| consteval auto | param_types () |
| A function's parameter types, as a static array of reflections. | |
| template<std::meta::info Fn> | |
| consteval std::size_t | trailing_default_count () |
| How many TRAILING parameters of Fn carry a C++ default argument. | |
| template<std::meta::info Fn> | |
| consteval auto | param_names () |
| A function's parameter names, in order. | |
| template<std::meta::info Fn> | |
| consteval auto | keep_alive_pairs () |
| The keep_alive dependencies declared on Fn, in declaration order. | |
| template<std::meta::info Fn> | |
| consteval bool | all_params_named () |
| Whether every parameter of Fn carries an identifier. | |
| consteval bool | is_bindable_constructor (std::meta::info c) |
| A non-default, non-copy/move public constructor a backend should expose. | |
| consteval bool | is_method_candidate (std::meta::info f) |
| The shape of a bindable method: a plain non-private member function. | |
| consteval bool | is_operator_candidate (std::meta::info f) |
| The shape of a bindable member operator. | |
| consteval bool | decays_to (std::meta::info t, std::meta::info type) |
| Whether type reflection t is exactly the (welded) type type once stripped of cv/ref qualifiers and aliases. | |
| consteval bool | is_free_operator_candidate (std::meta::info f) |
| The shape of a bindable freestanding operator: a non-deleted namespace-scope operator function. | |
| consteval bool | is_stringifier_for (std::meta::info f, std::meta::info type) |
| Whether f is the stream-inserter ("stringifier") shape for type: operator<<(std::ostream&, T). | |
| consteval bool | free_operator_anchored (std::meta::info f, std::meta::info type) |
| Whether free operator f is anchored on type: some parameter decays to exactly type (an rvalue-reference operand disqualifies — it consumes the object, which no binding call form expresses). | |
| consteval bool | free_operator_reflected (std::meta::info f, std::meta::info type) |
| Whether anchored free operator f binds reflected for type: type is the right operand and the left is something else (operator*(double,
Vec)). | |
| template<auto Fns, std::meta::info Type, bool Reflected> | |
| consteval auto | partition_reflected () |
| Split slot group Fns by free_operator_reflected — the entries whose reflectedness equals Reflected, in group order. | |
| consteval std::meta::info | enclosing_namespace (std::meta::info type) |
| The nearest enclosing namespace of type — the scope its anchored free operators are swept from (for a nested class, the namespace enclosing the outermost class, mirroring where C++ requires such operators to live). | |
| consteval std::meta::info | comparison_operand (std::meta::info f, std::meta::info type) |
| The operand a comparison synthesized from spaceship overload f takes: the parameter type that is not the anchor type itself — or type for the homogeneous form. | |
| template<auto Fns, std::meta::info Type> | |
| consteval bool | has_heterogeneous_comparison () |
| Whether spaceship group Fns contains a heterogeneous overload (an operand that is not Type itself) — the trigger for a reversed-operand fallback on rods whose framework registers by exact signature shape. | |
| template<class T, std::meta::info Fn> | |
| std::string | stringify (const T &self) |
| The stringifier wrapper every runtime rod binds for a swept ostream inserter (see is_stringifier_for): run the specific participating overload Fn into a string stream and hand back the text — the body of Python's __str__ and Lua's __tostring. | |
| template<class Resolution> | |
| consteval bool | member_access_admitted (std::meta::info mem, lang L, std::meta::info bound_into) |
| Is mem's access level admitted for binding under Resolution? | |
| consteval bool | is_unary_operator (std::meta::info f) |
| Whether an operator function is unary vs binary. | |
| template<class T> | |
| consteval auto | aggregate_fields () |
| The fields an aggregate is initialized from: its non-static data members in declaration order (all public, by the aggregate rules). | |
| template<class T, lang L, class Resolution> | |
| consteval bool | aggregate_initializable () |
| Whether to synthesize an aggregate field constructor for T (language L, resolution Resolution). | |
| template<class T> | |
| consteval std::size_t | aggregate_required_arity () |
| How many leading fields the synthesized aggregate field constructor REQUIRES: everything up to and including the last field without a default member initializer. | |
| template<class T> | |
| consteval std::size_t | aggregate_defaults_from () |
| The field index from which a value-extracting backend (the Python rods) can attach the NSDMI defaults as real parameter default values. | |
| consteval bool | is_bindable_kind (std::meta::info mem) |
| The member kinds welder can expose from a namespace. | |
| consteval bool | entity_bound (std::meta::info mem, lang L, policy_kind pol) |
| Whether a leaf entity binds: a welded candidate that also resolves as bound. | |
| consteval bool | namespace_has_bound (std::meta::info ns, lang L) |
| Whether ns holds anything that would bind, directly or nested. | |
| consteval bool | namespace_has_bindable (std::meta::info ns, lang L) |
| The greedy twin of namespace_has_bound: whether ns holds any bindable kind (ignoring the weld marker), directly or nested. | |
| template<class Resolution> | |
| consteval std::vector< std::meta::info > | method_overload_set (std::meta::info fn, lang L, std::meta::info bound_into) |
| The participating method overloads sharing fn's name and static-ness, from the class where fn is declared, in declaration order. | |
| template<class Resolution> | |
| consteval void | collect_member_operators (std::meta::info src, lang L, std::meta::info bound_into, std::vector< std::meta::info > &out) |
| Collect the participating member operators visible on bound_into's binding: src's own, preceded by those of its flattened (non-native according to Resolution) bases, recursively — mirroring bind_members' flattening, so a slot's group spans exactly what the class surface exposes. | |
| template<class Resolution> | |
| consteval std::vector< std::meta::info > | operator_entries (std::meta::info type, lang L) |
| Every participating operator entry of type's binding — member operators (own + flattened bases') and the anchored free operators of the type's enclosing namespace — in one list, so the carriage can slot-group across all sources (a one-value-per-slot backend must receive each slot whole). | |
| template<class Resolution> | |
| consteval std::vector< std::meta::info > | operator_slot_set (std::meta::info fn, lang L, std::meta::info bound_into) |
| The participating operator entries sharing fn's target slot (same operator and arity — hence the same special-method name) on bound_into's binding, across every source operator_entries sweeps (member + free). | |
| template<class Resolution> | |
| consteval std::vector< std::meta::info > | stringifier_entries (std::meta::info type, lang L) |
| The participating stringifier entries for type: free operator<<(std::ostream&, T) overloads of its enclosing namespace, resolved like the anchored operators. | |
| template<class Resolution> | |
| consteval std::array< bool, 4 > | covered_comparison_slots (std::meta::info type, lang L) |
| Which relational slots (lt, le, gt, ge — indexed by cmp_slot) are already covered by an explicit participating operator on type's binding. | |
| template<class Resolution> | |
| consteval std::vector< std::meta::info > | function_overload_set (std::meta::info fn, lang L, std::meta::info bound_into) |
| The participating free-function overloads sharing fn's name, from fn's declaring namespace, in declaration order. | |
| template<overload_selector Select, std::meta::info Fn, lang L, std::meta::info BoundInto> | |
| consteval auto | overload_group () |
| Select's overload set for Fn as a fixed-size, splice-ready static array. | |
| template<overload_selector Select> | |
| consteval bool | is_overload_leader (std::meta::info fn, lang L, std::meta::info bound_into) |
| Whether fn is the first (declaration order) member of its Select overload set — the single visit on which the carriage emits the whole group. | |
| template<class Resolution, std::meta::info Fn, lang L> | |
| consteval auto | manual_function_group () |
| The semi-manual (weld_function<Fn>) group: Fn first — the user's named entity resolves the group's target name — then Fn's participating siblings. | |
| template<class Resolution, std::meta::info Type, lang L, policy_kind Pol> | |
| consteval auto | ctor_group () |
| The participating constructors of Type under policy Pol: every bindable-shape constructor (see is_bindable_constructor) the resolution admits, in declaration order. | |
| template<class Resolution, std::meta::info Type, lang L> | |
| consteval bool | default_ctor_admitted () |
| Whether the resolution admits Type's DEFAULT constructor. | |
| template<class Resolution, std::meta::info Type, lang L> | |
| consteval bool | copy_ctor_admitted () |
| Whether the resolution admits Type's copy constructor — the marks half of the copy decision; the carriage pairs it with std::is_copy_constructible_v<T> (which also rules out abstract, deleted-copy and inaccessible-copy types) and hands the result to the rod's add_constructors as its Copyable flag. | |
| template<std::meta::info Type> | |
| consteval void | validate_move_ctor_marks () |
| Reject an include/only mark on a move constructor of Type. | |
| consteval bool | carries_weld_as (std::meta::info m) |
| Does m carry a (templated) weld_as annotation? | |
| consteval std::vector< std::string > | property_key (std::meta::info mem, accessor_role role, lang L) |
| The pairing key of accessor mem's property for language L: the case-normalized word sequence of its explicit name (when the mark carries one) or of its identifier with the leading get/set word stripped. | |
| template<class Resolution> | |
| consteval void | collect_accessors (std::meta::info src, lang L, std::meta::info bound_into, std::vector< std::meta::info > &out) |
| Collect the participating accessor-marked member functions visible on bound_into's binding: src's own, preceded by its flattened (non-native) bases' — mirroring bind_members' flattening, exactly like collect_member_operators. | |
| template<class Resolution> | |
| consteval void | validate_property_shadowing (std::meta::info src, lang L, std::meta::info bound_into, const std::vector< std::vector< std::string > > &keys) |
| Guard the property surface against name shadowing: no property's key may equal a bound data member's or (non-accessor) method's identifier key on the same class surface (own + flattened bases). | |
| template<class Resolution> | |
| consteval std::vector< property_entry > | property_entries (std::meta::info type, lang L) |
| The resolved properties of type for language L: every participating accessor collected (own + flattened bases), shape-validated, and paired by property key — getters first (in declaration order, which fixes the emission order), then each setter matched to its getter. | |
| template<std::meta::info Getter, lang L, class Style> | |
| consteval const char * | property_bound_name () |
| The bound name of the property Getter defines, for language L under name style Style: the mark's explicit name verbatim when present (never styled — the accessor analogue of weld_as), else the getter's identifier styled through Style's field hook (a property is attribute-shaped) with the leading get/set word then stripped in the styled spelling's own convention (see welder::naming::strip_accessor_word). | |
| consteval void | collect_native_bases (std::meta::info type, lang L, std::vector< std::meta::info > &out) |
| Collect the native bases of type for L: its nearest welded ancestors. | |
| template<std::meta::info Type, lang L> | |
| consteval auto | native_base_types () |
| The native bases of Type for L as a static array of type reflections. | |
| template<caster_oracle B, class T, lang L, class Reg> | |
| consteval bool | bindable () |
| Forward declaration: bindable() recurses through a container's element types. | |
| consteval std::array< wrapper_spec, 18 > | stl_wrappers () |
| The element-wise STL-wrapper table welder recurses into. | |
| consteval long | wrapper_value_count (std::meta::info type) |
| How many leading arguments of type to recurse if it is a listed wrapper. | |
| template<std::meta::info Type, std::size_t N> | |
| consteval std::array< std::meta::info, N > | leading_args () |
| The first N template arguments of Type, as a splice-ready static array. | |
| consteval bool | is_expected_specialization (std::meta::info type) |
| Is type a std::expected specialization — the fallible-result family? | |
| consteval std::meta::info | expected_value_arg (std::meta::info type) |
| The VALUE argument of the std::expected type (its first). | |
| consteval bool | is_span_specialization (std::meta::info type) |
| Is type a std::span specialization — the non-owning sequence view? | |
| consteval std::meta::info | span_element_arg (std::meta::info type) |
| The ELEMENT argument of the std::span type (its first). | |
| template<caster_oracle B, lang L, class Reg, auto Args, std::size_t... I> | |
| consteval bool | args_bindable (std::index_sequence< I... >) |
| Whether every one of a wrapper's value arguments (spliced back to types) binds. | |
| template<class T> | |
| consteval bool | mentions_union () |
| Forward declaration: mentions_union() recurses like bindable() does. | |
| template<auto Args, std::size_t... I> | |
| consteval bool | args_mention_union (std::index_sequence< I... >) |
| Whether every one of a wrapper's value arguments mentions a union. | |
| template<caster_oracle B, std::meta::info Fn, lang L, class Reg, std::size_t... I> | |
| consteval void | assert_params_bindable (std::index_sequence< I... >) |
| Assert every parameter type of Fn binds. | |
| template<caster_oracle B, std::meta::info Fn, std::meta::info Type, lang L, class Reg, std::size_t... I> | |
| consteval void | assert_operands (std::index_sequence< I... >) |
| The parameter walk behind assert_operands_bindable — gate each parameter that is not the anchor type itself. | |
| template<class Resolution, std::meta::info Ns, std::meta::info Alias> | |
| consteval bool | sole_alias_of_target (lang L, policy_kind pol) |
| Is Alias the only participating alias in Ns welding its specialization? | |
| template<std::meta::info Alias, lang L, class Style, ent_kind Kind = ent_kind::class_> | |
| consteval const char * | alias_bound_name () |
| The bound name of the type welded through Alias (a namespace-scope alias to a specialization, or a member alias inside a welded class). | |
| template<class Resolution> | |
| consteval bool | nested_type_registered (std::meta::info type, lang L) |
| The GATE side of the nested-type sweep: does class-scoped type register with its enclosing class's binding under Resolution? | |
| template<class Resolution, std::meta::info Outer, std::meta::info Alias> | |
| consteval bool | sole_member_alias_of_target (lang L, policy_kind pol) |
| Is Alias the only member alias of Outer whose participation would register its target? | |
| template<class Resolution> | |
| consteval bool | registered_by_member_alias (std::meta::info scope, std::meta::info type, lang L) |
| Does a participating member alias of scope name type — i.e. | |
| consteval std::array< container_spec, 4 > | reference_containers () |
| The containers welder binds opaquely — exactly those the frameworks' bind_vector / bind_map support. | |
| consteval bool | same_slot (std::meta::info a, std::meta::info b) |
| Do a and b declare the same vtable slot? | |
| consteval void | collect_virtuals (std::meta::info type, std::vector< std::meta::info > &slots) |
| Accumulate the most-derived declaration of every virtual member function reachable in type's complete object into slots, deduplicating by vtable slot (same_slot — name + parameters + cv/ref, so a covariant override is one slot, not two). | |
Variables | |
| constexpr size_type | accessor_name_capacity {64} |
| The inline capacity of an accessor's explicit property name. | |
The stored forms of the annotation vocabulary.
The raw documentation pieces doc_style assembles; its full definition (a data struct) lives in <welder/doc.hpp>.
Each *_spec here is what a factory below (weld, doc, …) or a policy / mark object produces and what the reflection layer extracts back off an entity's annotations. Users never name these types — they spell the factories — so they live in detail to keep welder:: uncluttered.
Forward-declared here so this concepts header stays a dependency-light leaf the machinery headers can include.
| using welder::detail::module_welder_t = typename module_welder<Default, Override...>::type |
Definition at line 26 of file module.hpp.
The signature of an overload-set selector specialization: the representative overload, the language, and the entity the group binds into.
Definition at line 905 of file bind_traits.hpp.
|
strong |
A placeholder enum type for shape-probing the enum hooks against a rod's enum_handle_type<E> — any_type is a class, so it cannot stand in for an enum.
Empty on purpose; the concept never inspects its enumerators.
Definition at line 56 of file concepts.hpp.
|
strong |
The rewritten-expression comparison a rod binds for a type whose C++ comparisons come from operator<=>: plain a < b (etc.), so C++'s own operator-rewriting rules ([over.match.oper]) pick the spaceship overload — heterogeneous and reversed operands included — and the target language sees exactly what a C++ caller sees.
The four relational forms are synthesized; == never is (C++ itself only rewrites == from operator==, which a defaulted* spaceship implicitly declares — and that member then binds through the ordinary operator path).
| A | the left operand type. |
| B | the right operand type. |
| S | which relational slot this wrapper fills. |
| Enumerator | |
|---|---|
| lt | |
| le | |
| gt | |
| ge | |
Definition at line 357 of file bind_traits.hpp.
|
consteval |
The language mask of an accessor argument list: the OR of its leading lang markers (a trailing name contributes nothing; none → 0 = all).
Definition at line 339 of file annotations.hpp.
Referenced by accessor_mask(), and welder::detail::accessor_spec::operator()().
|
consteval |
Definition at line 341 of file annotations.hpp.
|
consteval |
Definition at line 343 of file annotations.hpp.
References accessor_mask(), and welder::lang_bit().
|
consteval |
Copy an accessor argument list's trailing explicit name into dst (left empty when the list carries none — the derive-from-identifier sentinel).
| diag::accessor_name_too_long | (a constant-evaluation error) when the name exceeds the inline capacity. |
Definition at line 351 of file annotations.hpp.
References accessor_name_capacity.
Referenced by accessor_name(), and welder::detail::accessor_spec::operator()().
|
consteval |
Definition at line 353 of file annotations.hpp.
References accessor_name_capacity.
|
consteval |
Definition at line 361 of file annotations.hpp.
References accessor_name(), and accessor_name_capacity.
|
consteval |
The field index from which a value-extracting backend (the Python rods) can attach the NSDMI defaults as real parameter default values.
Stricter than aggregate_required_arity, because extracting a default VALUE — rather than merely omitting the argument — needs two things the arity form doesn't: the whole aggregate must be value-initializable (the defaults are read off a T{} probe instance at registration time; reading an NSDMI's value directly is outside P2996), and each defaulted field must be copy-constructible (the value is copied out of the probe). A field that fails the copy test pushes the start past itself — later fields can still default.
| T | the aggregate type. |
Definition at line 612 of file bind_traits.hpp.
References aggregate_fields(), and aggregate_required_arity().
Referenced by welder::rods::nanobind::rod< DocStyle >::_aggregate_arg(), welder::rods::pybind11::rod< DocStyle >::_aggregate_arg(), welder::rods::nanobind::rod< DocStyle >::_def_aggregate_init(), welder::rods::pybind11::rod< DocStyle >::_def_aggregate_init(), welder::rods::nanobind::rod< DocStyle >::_lazy_default(), and welder::rods::pybind11::rod< DocStyle >::_lazy_default().
|
consteval |
The fields an aggregate is initialized from: its non-static data members in declaration order (all public, by the aggregate rules).
| T | the aggregate type. |
Definition at line 514 of file bind_traits.hpp.
Referenced by welder::rods::nanobind::rod< DocStyle >::_aggregate_arg(), welder::rods::pybind11::rod< DocStyle >::_aggregate_arg(), welder::rods::luacats::rod::_aggregate_fun_params(), welder::rods::luacats::rod::_aggregate_param_lines(), welder::rods::luabridge::rod::_ctor_arg_lists(), welder::rods::sol2::rod::_ctor_signatures(), welder::rods::nanobind::rod< DocStyle >::_def_aggregate_init(), welder::rods::pybind11::rod< DocStyle >::_def_aggregate_init(), welder::rods::nanobind::rod< DocStyle >::_init_value(), welder::rods::pybind11::rod< DocStyle >::_init_value(), welder::rods::nanobind::rod< DocStyle >::_lazy_default(), welder::rods::pybind11::rod< DocStyle >::_lazy_default(), welder::rods::luacats::rod::add_constructors(), welder::rods::nanobind::rod< DocStyle >::add_constructors(), welder::rods::pybind11::rod< DocStyle >::add_constructors(), aggregate_defaults_from(), and aggregate_required_arity().
|
consteval |
Whether to synthesize an aggregate field constructor for T (language L, resolution Resolution).
Only for a baseless aggregate with at least one field, all of which participate: a based aggregate's brace-init nests the base (a flat field ctor can't express it), and a partially-excluded one would leak an excluded field as a positional parameter (aggregate init is positional and all-or-nothing). An empty aggregate is already covered by the default constructor.
| T | the aggregate type. |
| L | the target language. |
| Resolution | the carriage's resolution (its class_member_participates decides whether each field binds). |
Definition at line 544 of file bind_traits.hpp.
References welder::policy_of(), and welder::public_bases().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_class_interior().
|
consteval |
How many leading fields the synthesized aggregate field constructor REQUIRES: everything up to and including the last field without a default member initializer.
The trailing fields after that point — all NSDMI'd — are the omissible suffix: aggregate initialization (braced or C++26 parenthesized) fills omitted trailing elements from their NSDMIs, so a backend may expose them as optional (Python keyword defaults, Lua per-arity constructor overloads, LuaCATS ? parameters). An NSDMI'd field before a required one counts as required — a parameter list allows no gaps, exactly like C++ default function arguments.
| T | the aggregate type. |
Definition at line 582 of file bind_traits.hpp.
References aggregate_fields().
Referenced by welder::rods::luacats::rod::_aggregate_fun_params(), welder::rods::luacats::rod::_aggregate_param_lines(), welder::rods::luabridge::rod::_ctor_arg_lists(), welder::rods::sol2::rod::_ctor_signatures(), and aggregate_defaults_from().
|
consteval |
The bound name of the type welded through Alias (a namespace-scope alias to a specialization, or a member alias inside a welded class).
Resolution order: a weld_as on the alias (most specific, verbatim) → a weld_as on the target type (read through an instantiation from its template; note a template-level one names every instantiation alike, so pairing it with several aliases of one template collides) → the alias's identifier, reshaped by Style. This is welder::name_of applied to the alias, with the target-level weld_as fallback spliced in between its two steps.
| Alias | the alias through which the type is welded. |
| L | the target language. |
| Style | the name style. |
| Kind | the entity kind the style hook receives (class_ or enum_). |
Definition at line 90 of file carriage.hpp.
References welder::name_of(), and welder::weld_as_of().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_namespace(), and welder::carriages::basic_carriage< carriages::marker_resolution >::bind_nested_types().
|
consteval |
Whether every parameter of Fn carries an identifier.
Keyword-argument naming is all-or-nothing across backends, so an unnamed parameter means positional.
| Fn | a reflection of the function. |
Definition at line 127 of file bind_traits.hpp.
Referenced by welder::rods::nanobind::rod< DocStyle >::_def_function(), welder::rods::pybind11::rod< DocStyle >::_def_function(), welder::rods::nanobind::rod< DocStyle >::_def_init(), welder::rods::pybind11::rod< DocStyle >::_def_init(), welder::rods::nanobind::rod< DocStyle >::_def_truncated(), and welder::rods::pybind11::rod< DocStyle >::_def_truncated().
|
consteval |
Whether every one of a wrapper's value arguments (spliced back to types) binds.
| B | the rod. |
| L | the target language. |
| Reg | the registration oracle (see welder::welded_registration). |
| Args | the static array of value-argument reflections. |
| I | the index pack over Args. |
Definition at line 201 of file bindable.hpp.
References bindable().
Referenced by bindable().
|
consteval |
Whether every one of a wrapper's value arguments mentions a union.
| Args | the static array of value-argument reflections. |
| I | the index pack over Args. |
Definition at line 287 of file bindable.hpp.
References mentions_union().
Referenced by mentions_union().
|
consteval |
The parameter walk behind assert_operands_bindable — gate each parameter that is not the anchor type itself.
| B | the rod. |
| Fn | the spaceship overload. |
| Type | the anchor type reflection. |
| L | the language. |
| I | the index pack. |
Definition at line 470 of file bindable.hpp.
References welder::assert_bindable(), and param_types().
Referenced by welder::assert_operands_bindable().
|
consteval |
Assert every parameter type of Fn binds.
| B | the rod. |
| Fn | a reflection of the function. |
| L | the target language. |
| I | the index pack over the parameters. |
Definition at line 376 of file bindable.hpp.
References welder::assert_bindable(), and param_types().
Referenced by welder::assert_setter_bindable(), and welder::assert_signature_bindable().
|
consteval |
Forward declaration: bindable() recurses through a container's element types.
Can the backend convert T — stripped of cv/ref/pointer — to a meaningful target value?
A listed wrapper is bindable iff its value arguments are; a type with a native/user converter binds as-is; otherwise it is a program-defined class/enum the backend must register, so it binds iff the registration oracle Reg promises one (by default: iff it is welded for L).
| B | the rod. |
| T | the type to test. |
| L | the target language. |
| Reg | the registration oracle (see welder::welded_registration). |
Definition at line 218 of file bindable.hpp.
References args_bindable(), bindable(), expected_value_arg(), is_expected_specialization(), is_span_specialization(), leading_args(), welder::trust_bindable, and wrapper_value_count().
Referenced by args_bindable(), welder::bindable(), and bindable().
|
consteval |
Does m carry a (templated) weld_as annotation?
Property machinery diagnoses it on accessors — the explicit accessor name is the rename tool there. Readable off a dynamic reflection (only the template is compared, nothing extracted).
Definition at line 1133 of file bind_traits.hpp.
Referenced by property_entries().
|
consteval |
Collect the participating accessor-marked member functions visible on bound_into's binding: src's own, preceded by its flattened (non-native) bases' — mirroring bind_members' flattening, exactly like collect_member_operators.
| Resolution | the carriage's resolution. |
| src | the class whose members to collect (a base during recursion). |
| L | the target language. |
| bound_into | the welded type whose binding receives the properties. |
| out | the collection target (bases append first). |
Definition at line 1168 of file bind_traits.hpp.
References collect_accessors(), welder::is_accessor_for(), is_method_candidate(), member_access_admitted(), welder::policy_of(), and welder::public_bases().
Referenced by collect_accessors(), and property_entries().
|
consteval |
Collect the participating member operators visible on bound_into's binding: src's own, preceded by those of its flattened (non-native according to Resolution) bases, recursively — mirroring bind_members' flattening, so a slot's group spans exactly what the class surface exposes.
Each candidate passes access admission and the resolution under its declaring* class's policy.
| Resolution | the carriage's resolution. |
| src | the class whose members to collect (a base during recursion). |
| L | the target language. |
| bound_into | the welded type whose binding receives the operators. |
| out | the collection target (bases append first). |
Definition at line 757 of file bind_traits.hpp.
References collect_member_operators(), is_operator_candidate(), member_access_admitted(), welder::policy_of(), and welder::public_bases().
Referenced by collect_member_operators(), and operator_entries().
|
consteval |
Collect the native bases of type for L: its nearest welded ancestors.
Found by looking past non-welded bases (whose members are flattened instead), so a welded base reachable only through a non-welded one is still linked. A virtual diamond can reach the same welded base by several paths, so the list is deduplicated.
| type | a reflection of the derived type. | |
| L | the target language. | |
| [out] | out | accumulates the deduplicated native base reflections. |
Definition at line 1347 of file bind_traits.hpp.
References collect_native_bases(), welder::public_bases(), and welder::welded_for().
Referenced by collect_native_bases(), and native_base_types().
|
consteval |
Accumulate the most-derived declaration of every virtual member function reachable in type's complete object into slots, deduplicating by vtable slot (same_slot — name + parameters + cv/ref, so a covariant override is one slot, not two).
members_of lists a class's own members only, so a virtual a subclass merely inherits is invisible there — the reason a whole-hierarchy walk is needed. type's own members are visited before its bases, so the first declaration recorded for a given slot is the most-derived one; a base's re-declaration of an already-seen slot is skipped. Members are enumerated with access_context::unchecked() (like the rest of welder's core): a protected virtual — the NVI/template-method hook — is a real overridable slot even though it is never bound (Python overrides it via attribute lookup, which needs no binding). Neither bind_flat nor access is filtered here — a private declaration still claims its slot in the dedup, and the filters are applied by overridable_virtuals on the kept most-derived declaration. So a subclass can un-flatten a virtual its base marked bind_flat (and vice versa), and privatizing an inherited virtual withdraws the slot rather than resurrecting the base's public declaration.
| type | a reflection of the class type. |
| slots | the accumulator of most-derived virtual declarations. |
Definition at line 135 of file virtuals.hpp.
References collect_virtuals(), and same_slot().
Referenced by collect_virtuals(), and welder::overridable_virtuals().
|
consteval |
The operand a comparison synthesized from spaceship overload f takes: the parameter type that is not the anchor type itself — or type for the homogeneous form.
| f | a reflection of an operator<=> overload (member or anchored free). |
| type | the anchor type. |
Definition at line 324 of file bind_traits.hpp.
References decays_to().
Referenced by welder::rods::luabridge::rod::_cmp_dispatch(), has_heterogeneous_comparison(), and welder::rods::python::synthesize_comparisons().
|
consteval |
Whether the resolution admits Type's copy constructor — the marks half of the copy decision; the carriage pairs it with std::is_copy_constructible_v<T> (which also rules out abstract, deleted-copy and inaccessible-copy types) and hands the result to the rod's add_constructors as its Copyable flag.
A copy constructor never binds as an init overload (see is_bindable_constructor); its target-language spelling is the rod's — the Python rods emit __copy__/__deepcopy__ over it, the Lua rods ignore it (Lua has no copy protocol).
Mirrors default_ctor_admitted exactly: the copy constructor may be implicit* — no declaration, so no marks and nothing for opt_in to filter: admitted whenever the type is copy-constructible. A declared copy constructor is consulted under policy_kind::automatic — its explicit marks are honored (so [[=welder::mark::exclude]] T(const T&); suppresses the copy binding, per language when the mark is scoped), but opt_in's default-out is not: you cannot include an implicit constructor, so filtering the declared spelling by default would make T(const T&) = default; (a C++ no-op) silently change the binding.
| Resolution | the carriage's resolution. |
| Type | the class type reflection. |
| L | the target language. |
Definition at line 1072 of file bind_traits.hpp.
References welder::automatic.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_class_interior().
|
consteval |
Which relational slots (lt, le, gt, ge — indexed by cmp_slot) are already covered by an explicit participating operator on type's binding.
Comparison synthesis from operator<=> fills only the uncovered slots: an explicit operator beats synthesis (mirroring C++ overload resolution's preference for non-rewritten candidates), and a slot is skipped whole so a one-value-per-slot backend never sees two writers.
| Resolution | the carriage's resolution. |
| type | the welded type. |
| L | the target language. |
Definition at line 853 of file bind_traits.hpp.
References is_unary_operator(), and operator_entries().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_operators().
|
consteval |
The participating constructors of Type under policy Pol: every bindable-shape constructor (see is_bindable_constructor) the resolution admits, in declaration order.
Constructors resolve symmetrically with every other member — the type's policy and the constructor's own marks decide, per constructor (opt_in binds only marked-include constructors). The carriage guards the silent consequence: filtering that leaves a type with no constructor at all is a hard error unless the emptiness is explicit (see bind_type's no-constructor-left static_assert), which is why Pol is a parameter — the guard probes the same resolution under policy_kind::automatic as its baseline.
The default constructor is decided separately (it may be implicit, hence not a member — see default_ctor_admitted), as is the synthesized aggregate constructor.
| Resolution | the carriage's resolution. |
| Type | the class type reflection. |
| L | the target language. |
| Pol | the policy to resolve under (the type's own, or automatic for the guard's baseline). |
Definition at line 1004 of file bind_traits.hpp.
References is_bindable_constructor().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_class_interior().
|
consteval |
Whether type reflection t is exactly the (welded) type type once stripped of cv/ref qualifiers and aliases.
The anchor test — exact identity, never a base: a base-anchored free operator rides through the target language's class inheritance when the base is welded.
| t | a type reflection (possibly qualified / aliased). |
| type | the plain type to compare against. |
Definition at line 209 of file bind_traits.hpp.
Referenced by comparison_operand(), free_operator_anchored(), free_operator_reflected(), has_heterogeneous_comparison(), and is_stringifier_for().
|
consteval |
Whether the resolution admits Type's DEFAULT constructor.
The default constructor may be implicit — no declaration, so no marks and nothing for opt_in to filter: it is admitted whenever the type is default-constructible (the carriage checks constructibility itself, against the rod's construction type). A declared default constructor is consulted under policy_kind::automatic — its explicit marks are honored (so [[=welder::mark::exclude]] T() = default; suppresses default construction), but opt_in's default-out is not: you cannot include an implicit constructor, so filtering the declared spelling by default would make T() = default; (a C++ no-op) silently change the binding.
| Resolution | the carriage's resolution. |
| Type | the class type reflection. |
| L | the target language. |
Definition at line 1040 of file bind_traits.hpp.
References welder::automatic.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_class_interior().
|
consteval |
The nearest enclosing namespace of type — the scope its anchored free operators are swept from (for a nested class, the namespace enclosing the outermost class, mirroring where C++ requires such operators to live).
| type | a reflection of the type. |
Definition at line 311 of file bind_traits.hpp.
Referenced by operator_entries(), and stringifier_entries().
|
consteval |
Whether a leaf entity binds: a welded candidate that also resolves as bound.
| mem | a reflection of the namespace member. |
| L | the target language. |
| pol | the namespace's policy. |
Definition at line 651 of file bind_traits.hpp.
References is_bindable_kind(), welder::member_bound(), and welder::welded_for().
Referenced by namespace_has_bound().
|
consteval |
The VALUE argument of the std::expected type (its first).
| type | a reflection of the expected specialization. |
Definition at line 168 of file bindable.hpp.
Referenced by bindable().
|
consteval |
Whether free operator f is anchored on type: some parameter decays to exactly type (an rvalue-reference operand disqualifies — it consumes the object, which no binding call form expresses).
The stringifier shape is excluded (it has its own route).
| f | a reflection of the function. |
| type | the candidate anchor type. |
Definition at line 251 of file bind_traits.hpp.
References decays_to(), is_free_operator_candidate(), and is_stringifier_for().
Referenced by operator_entries().
|
consteval |
Whether anchored free operator f binds reflected for type: type is the right operand and the left is something else (operator*(double, Vec)).
The Python rods bind such an entry under the reflected dunder (__rmul__, or the operand-swapped comparison); the Lua rods need no distinction (a metamethod receives the operands as passed).
| f | a reflection of the anchored operator. |
| type | the anchor type. |
Definition at line 270 of file bind_traits.hpp.
References decays_to().
Referenced by welder::rods::luacats::rod::add_operator(), welder::rods::nanobind::rod< DocStyle >::add_operator(), welder::rods::pybind11::rod< DocStyle >::add_operator(), and partition_reflected().
|
consteval |
The participating free-function overloads sharing fn's name, from fn's declaring namespace, in declaration order.
Membership is the resolution's namespace-member verdict, so the set is exactly what the namespace walk binds.
| Resolution | the carriage's resolution. |
| fn | a reflection of one participating namespace-scope function. |
| L | the target language. |
| bound_into | the namespace being swept (== parent_of(fn); passed for hook-signature uniformity). |
Definition at line 889 of file bind_traits.hpp.
References welder::policy_of().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_namespace(), and manual_function_group().
|
consteval |
Whether spaceship group Fns contains a heterogeneous overload (an operand that is not Type itself) — the trigger for a reversed-operand fallback on rods whose framework registers by exact signature shape.
| Fns | the spaceship group. |
| Type | the anchor type's reflection. |
Definition at line 339 of file bind_traits.hpp.
References comparison_operand(), and decays_to().
Referenced by welder::rods::luabridge::rod::_add_synth_cmp().
|
consteval |
A non-default, non-copy/move public constructor a backend should expose.
The default constructor is handled separately (it may be implicit, hence not a member), as is the copy constructor — it has a target-language spelling of its own (copy_ctor_admitted; Python __copy__/__deepcopy__), never an init overload. Move constructors never bind at all (no target language has move semantics; a marked one is diagnosed — validate_move_ctor_marks).
| c | a reflection of the constructor. |
Definition at line 147 of file bind_traits.hpp.
Referenced by ctor_group().
|
consteval |
The member kinds welder can expose from a namespace.
is_class_type/is_enum_type throw on a non-type reflection, so they are reached only after is_type; the other predicates are total and safe on any reflection.
| mem | a reflection of the namespace member. |
Definition at line 637 of file bind_traits.hpp.
Referenced by entity_bound(), and namespace_has_bindable().
|
consteval |
Is type a std::expected specialization — the fallible-result family?
Deliberately NOT a row in stl_wrappers — that table's contract is that every leading argument it names is value-bearing, and std::expected's two arguments are not alike — T crosses, E does not. It gets its own branch in bindable instead.
| type | a reflection of the cv/ref/pointer-stripped type. |
Definition at line 161 of file bindable.hpp.
Referenced by bindable().
|
consteval |
The shape of a bindable freestanding operator: a non-deleted namespace-scope operator function.
Participation is still the resolution's call (under the anchor type's policy, with the operator's own marks).
| f | a reflection of the function. |
Definition at line 219 of file bind_traits.hpp.
Referenced by free_operator_anchored(), and is_stringifier_for().
|
consteval |
The shape of a bindable method: a plain non-private member function.
Shape only — whether it participates is the resolution's decision (its class_member_participates hook; member_bound under the shipped resolutions), and whether its access level is admitted is member_access_admitted's (public always, protected under policy::weld_protected / the resolution's protected_participates hook); both are composed by the carriage. Private members are rejected here, in the shape — exposing a private member is a violation of welder's design, so no resolution can readmit one. Special members, destructors and operators are skipped (operators are classified separately).
| f | a reflection of the member function. |
Definition at line 169 of file bind_traits.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_members(), collect_accessors(), method_overload_set(), and validate_property_shadowing().
|
consteval |
The shape of a bindable member operator.
Shape only, like is_method_candidate — participation is the resolution's call, access admission member_access_admitted's, and private is rejected here for the same design reason. Whether it maps to something in the target language — and under what name — is a backend decision (see rod::special_method_name).
| f | a reflection of the operator function. |
Definition at line 187 of file bind_traits.hpp.
Referenced by collect_member_operators().
|
consteval |
Whether fn is the first (declaration order) member of its Select overload set — the single visit on which the carriage emits the whole group.
| Select | the selector specialization. |
| fn | the candidate overload. |
| L | the target language. |
| bound_into | the entity whose binding receives the group. |
Definition at line 936 of file bind_traits.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_members(), welder::carriages::basic_carriage< carriages::marker_resolution >::bind_namespace(), and welder::carriages::basic_carriage< carriages::marker_resolution >::bind_operators().
|
consteval |
Is type a std::span specialization — the non-owning sequence view?
Also kept OUT of stl_wrappers, for a different reason than std::expected: a span is element-wise, but adding the row would make the gate recurse into the element for EVERY rod, and the Python rods reach spans through a whole-type caster today (nanobind has no converter for, say, a bare std::byte element). Recursing behind the native-caster check keeps that path byte-for-byte unchanged while letting a rod without such a caster still admit the span by its element.
| type | a reflection of the cv/ref/pointer-stripped type. |
Definition at line 182 of file bindable.hpp.
Referenced by bindable().
|
consteval |
Whether f is the stream-inserter ("stringifier") shape for type: operator<<(std::ostream&, T).
Never bound as a shift slot — a rod maps it to the target's to-string protocol (Python __str__, Lua __tostring), so the std::ostream& parameter is deliberately not gated for bindability.
| f | a reflection of the function. |
| type | the anchor type. |
Definition at line 231 of file bind_traits.hpp.
References decays_to(), and is_free_operator_candidate().
Referenced by free_operator_anchored(), and stringifier_entries().
|
consteval |
Whether an operator function is unary vs binary.
Told apart by arity — this disambiguates the operators with both forms (+, -); backends use it to pick, e.g., __neg__ vs __sub__. A non-static member operator's left operand is the implicit object (unary = 0 parameters); a namespace-scope (or static member) operator spells both operands out (unary = 1 parameter).
| f | a reflection of the operator function. |
Definition at line 493 of file bind_traits.hpp.
Referenced by welder::rods::luacats::rod::add_operator(), covered_comparison_slots(), welder::rods::python::dunder_uses_not_implemented(), welder::rods::lua::lua_metamethod_name(), welder::rods::python::operator_dunder(), welder::rods::luacats::operator_luacats(), welder::rods::sol2::operator_mm(), operator_slot_set(), and welder::rods::python::reflected_dunder().
|
consteval |
The keep_alive dependencies declared on Fn, in declaration order.
Materialized as a fixed-size static array so a rod can splice each pair back as a keep_alive<nurse, patient>() call-policy template argument. Empty when Fn carries no keep_alive annotation.
| Fn | a reflection of the callable. |
Definition at line 105 of file bind_traits.hpp.
Referenced by welder::rods::nanobind::rod< DocStyle >::_def_function(), welder::rods::nanobind::rod< DocStyle >::_def_function(), welder::rods::pybind11::rod< DocStyle >::_def_function(), welder::rods::pybind11::rod< DocStyle >::_def_function(), welder::rods::nanobind::rod< DocStyle >::_def_operator(), welder::rods::pybind11::rod< DocStyle >::_def_operator(), welder::rods::nanobind::rod< DocStyle >::add_operator(), and welder::rods::pybind11::rod< DocStyle >::add_operator().
|
consteval |
The first N template arguments of Type, as a splice-ready static array.
| Type | the specialization to read. |
| N | how many leading arguments to take. |
Definition at line 143 of file bindable.hpp.
Referenced by bindable(), and mentions_union().
|
consteval |
The semi-manual (weld_function<Fn>) group: Fn first — the user's named entity resolves the group's target name — then Fn's participating siblings.
Gathering the siblings keeps weld_function consistent with the namespace walk (and keeps one-value-per-name frameworks from silently clobbering): one call welds the name's participating overload set. Fn itself is included even when its own marks would resolve it out — the explicit call is the stronger statement of intent. An identifier-less Fn (a template instantiation formed with substitute) has no name for siblings to share, so its group is just itself.
| Resolution | the carriage's resolution. |
| Fn | the explicitly welded function. |
| L | the target language. |
Definition at line 957 of file bind_traits.hpp.
References function_overload_set().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_function().
|
consteval |
Is mem's access level admitted for binding under Resolution?
The access counterpart of class_member_participates: public members are always admitted; private members never are (hard-wired here, before the resolution is consulted — exposing a private member is a violation of welder's design, not a policy a resolution may choose); protected members are arbitrated by the resolution's optional protected_participates(mem, L, bound_into) hook, falling back — when the resolution declares none — to the declaring class's policy::weld_protected annotation (welder::protected_welded). The fallback keeps the annotation honored under any bespoke resolution unless it deliberately takes the decision over; the tack-welding greedy_resolution exposes it as a template knob for libraries that cannot be annotated.
bound_into is the entity whose binding receives the member — the welded (most-derived) type, held fixed through the base-flattening recursion, or the enum for an enumerator. It equals parent_of(mem) except when a non-welded base's member is flattened onto a derived binding — exactly the case a bespoke hook may want to key on ("admit this mixin's protected members, but only into `Derived`"). The shipped resolutions ignore it (the declaring-class annotation rule).
A protected member admitted here still resolves through the normal machinery (policy kind, marks, overload grouping, the bindability gate) — admission only makes it visible. Emission needs no publicist and no generated wrapper: access control applies to names, and welder binds through spliced pointers-to-member (&[:mem:]), which P2996 exempts from access checking once the reflection was obtained (welder queries with access_context::unchecked() throughout).
| Resolution | the carriage's resolution. |
| mem | a reflection of the class member. |
| L | the target language. |
| bound_into | the entity whose binding receives the member. |
Definition at line 428 of file bind_traits.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_members(), welder::carriages::basic_carriage< carriages::marker_resolution >::bind_nested_types(), collect_accessors(), collect_member_operators(), method_overload_set(), nested_type_registered(), registered_by_member_alias(), sole_member_alias_of_target(), and validate_property_shadowing().
|
consteval |
Forward declaration: mentions_union() recurses like bindable() does.
Does T — stripped exactly as bindable() strips — name a union anywhere: itself, or as a value argument of a listed STL wrapper (std::vector<U>, std::optional<U>, …)?
Used only to pick the right diagnostic once bindable() has already said no: a failure caused by a union gets the union-specific message (whose remedy is std::variant, not "weld it" — welding a union is itself an error). The trust/native-caster short-circuits need no mirroring here: when they apply, bindable() is true and no assert consults this.
Definition at line 301 of file bindable.hpp.
References args_mention_union(), leading_args(), and wrapper_value_count().
Referenced by args_mention_union(), and welder::assert_bindable().
|
consteval |
The participating method overloads sharing fn's name and static-ness, from the class where fn is declared, in declaration order.
An accessor-marked overload (a getter/setter covering L) is not a method — it binds as a property — so it never joins the group (nor leads one: the carriage's method sweep skips it symmetrically).
| Resolution | the carriage's resolution. |
| fn | a reflection of one participating method (see is_method_candidate). |
| L | the target language. |
| bound_into | the entity whose binding receives the group (the welded type — not necessarily parent_of(fn) when flattening a base). |
Definition at line 727 of file bind_traits.hpp.
References welder::is_accessor_for(), is_method_candidate(), member_access_admitted(), and welder::policy_of().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_members().
|
consteval |
The greedy twin of namespace_has_bound: whether ns holds any bindable kind (ignoring the weld marker), directly or nested.
Used by the tack-welding resolution to decide whether an unmarked namespace is worth turning into a submodule. Same shape as namespace_has_bound but with the welded_for gate dropped — a member counts if it is a bindable kind resolving as bound under the (marker-less) policy.
| ns | a reflection of the namespace. |
| L | the target language. |
Definition at line 690 of file bind_traits.hpp.
References is_bindable_kind(), welder::member_bound(), namespace_has_bindable(), and welder::policy_of().
Referenced by namespace_has_bindable(), and welder::carriages::greedy_resolution< WeldProtected >::namespace_participates().
|
consteval |
Whether ns holds anything that would bind, directly or nested.
I.e. whether exposing it would yield a non-empty (sub)module. Each namespace contributes under its own policy; a nested namespace is recursed by the same rule as the dispatch (member_bound under the namespace's policy: automatic unless excluded, opt_in only if included).
| ns | a reflection of the namespace. |
| L | the target language. |
Definition at line 665 of file bind_traits.hpp.
References entity_bound(), welder::member_bound(), namespace_has_bound(), and welder::policy_of().
Referenced by namespace_has_bound(), and welder::carriages::marker_resolution::namespace_participates().
|
consteval |
The native bases of Type for L as a static array of type reflections.
Usable as a non-type template argument (spliced into the backend's class handle template). Same set as collect_native_bases().
| Type | the derived type reflection. |
| L | the target language. |
Definition at line 1374 of file bind_traits.hpp.
References collect_native_bases().
Referenced by welder::carriages::marker_resolution::native_bases().
|
consteval |
The GATE side of the nested-type sweep: does class-scoped type register with its enclosing class's binding under Resolution?
Mirrors basic_carriage::bind_nested_types' selection exactly — a nested type resolves like any other class member (the outer's policy plus the type's own exclude/include/only marks, with the usual access admission), never via its own weld — so the bindability gate promises a registration precisely when the sweep provides one. The enclosing class must itself count as registered (recursively, for deeper nesting). Unnameable (unnamed) and incomplete member types never register, and a member type alias is not a declaration the sweep visits — callers see false through the identifier/completeness checks and the alias never reaching here dealiased to a namespace-scope parent.
| Resolution | the resolution whose sweep is being promised for. |
| type | a class-scoped class/enum type (see welder::is_nested_type). |
| L | the target language. |
Definition at line 132 of file carriage.hpp.
References member_access_admitted(), welder::member_bound(), and welder::policy_of().
Referenced by welder::carriages::greedy_resolution< WeldProtected >::counts_as_registered(), welder::carriages::marker_resolution::counts_as_registered(), and welder::detail::scoped_registration< Resolution, Scope >::counts_as_registered().
|
consteval |
Every participating operator entry of type's binding — member operators (own + flattened bases') and the anchored free operators of the type's enclosing namespace — in one list, so the carriage can slot-group across all sources (a one-value-per-slot backend must receive each slot whole).
A free operator resolves like a member of its anchor: the type's policy plus the operator's own marks, through class_member_participates with the type as bound_into. The stringifier shape is excluded (see stringifier_entries); spaceship entries are included (the carriage routes them to comparison synthesis, never to a direct slot).
| Resolution | the carriage's resolution. |
| type | the welded type. |
| L | the target language. |
Definition at line 786 of file bind_traits.hpp.
References collect_member_operators(), enclosing_namespace(), free_operator_anchored(), and welder::policy_of().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_operators(), covered_comparison_slots(), and operator_slot_set().
|
consteval |
The participating operator entries sharing fn's target slot (same operator and arity — hence the same special-method name) on bound_into's binding, across every source operator_entries sweeps (member + free).
Matches the overload_selector shape so overload_group / is_overload_leader drive it like the other selectors.
| Resolution | the carriage's resolution. |
| fn | a reflection of one participating entry. |
| L | the target language. |
| bound_into | the welded type whose binding receives the group. |
Definition at line 810 of file bind_traits.hpp.
References is_unary_operator(), and operator_entries().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_operators().
|
consteval |
Select's overload set for Fn as a fixed-size, splice-ready static array.
| Select | the selector specialization (e.g. method_overload_set<R>). |
| Fn | the representative overload. |
| L | the target language. |
| BoundInto | the entity whose binding receives the group. |
Definition at line 916 of file bind_traits.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_members(), welder::carriages::basic_carriage< carriages::marker_resolution >::bind_namespace(), and welder::carriages::basic_carriage< carriages::marker_resolution >::bind_operators().
|
consteval |
A function's parameter names, in order.
| Fn | a reflection of the function. |
Definition at line 80 of file bind_traits.hpp.
Referenced by welder::rods::pybind11::rod< DocStyle >::_def_function(), welder::rods::pybind11::rod< DocStyle >::_def_init(), and welder::rods::pybind11::rod< DocStyle >::_def_truncated().
|
consteval |
A function's parameter types, as a static array of reflections.
Usable as a non-type template argument so it can be spliced back into a pack.
| Fn | a reflection of the function. |
Definition at line 42 of file bind_traits.hpp.
Referenced by welder::rods::nanobind::rod< DocStyle >::_def_init(), welder::rods::pybind11::rod< DocStyle >::_def_init(), welder::rods::nanobind::rod< DocStyle >::_def_truncated(), welder::rods::pybind11::rod< DocStyle >::_def_truncated(), assert_operands(), assert_params_bindable(), and welder::rods::luacats::param_lua_types().
|
consteval |
Split slot group Fns by free_operator_reflected — the entries whose reflectedness equals Reflected, in group order.
A rod whose framework registers by exact signature shape (LuaBridge3) uses this to route the direct (anchor-on-the-left) entries through its typed registration and the reflected ones through a raw fallback.
| Fns | the slot group (a static array of reflections). |
| Type | the anchor type's reflection. |
| Reflected | which partition to keep. |
Definition at line 287 of file bind_traits.hpp.
References free_operator_reflected().
Referenced by welder::rods::luabridge::rod::add_operator().
|
consteval |
The bound name of the property Getter defines, for language L under name style Style: the mark's explicit name verbatim when present (never styled — the accessor analogue of weld_as), else the getter's identifier styled through Style's field hook (a property is attribute-shaped) with the leading get/set word then stripped in the styled spelling's own convention (see welder::naming::strip_accessor_word).
| Getter | the property's getter reflection (the authoritative name source). |
| L | the target language. |
| Style | the name style. |
Definition at line 1316 of file bind_traits.hpp.
References welder::accessor_explicit_name(), welder::getter, and welder::naming::strip_accessor_word().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_properties().
|
consteval |
The resolved properties of type for language L: every participating accessor collected (own + flattened bases), shape-validated, and paired by property key — getters first (in declaration order, which fixes the emission order), then each setter matched to its getter.
Validation (each a designed constant-evaluation error, see <welder/diag.hpp>): a getter must be a const member function with no parameters and a non-void return; a setter takes exactly one parameter; one function cannot supply both halves for one language; static and virtual accessors are rejected (deferred / unsupported); weld_as on an accessor conflicts with the explicit accessor name; two getters (or setters) per property, or a setter with no getter, are errors; and no property may shadow a bound member's name (see validate_property_shadowing).
| Resolution | the carriage's resolution. |
| type | the welded type. |
| L | the target language. |
Definition at line 1245 of file bind_traits.hpp.
References welder::accessor_marked(), carries_weld_as(), collect_accessors(), welder::getter, property_key(), welder::setter, and validate_property_shadowing().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_properties().
|
consteval |
The pairing key of accessor mem's property for language L: the case-normalized word sequence of its explicit name (when the mark carries one) or of its identifier with the leading get/set word stripped.
| mem | a reflection of the accessor function. |
| role | which property half mem supplies. |
| L | the target language. |
Definition at line 1150 of file bind_traits.hpp.
References welder::accessor_explicit_name(), welder::naming::accessor_property_words(), and welder::naming::split_words().
Referenced by property_entries().
|
consteval |
The containers welder binds opaquely — exactly those the frameworks' bind_vector / bind_map support.
Add a row only when both Python frameworks ship a binder for it (a deque/set/list/multimap would need welder to synthesize the Python protocol — pybind11's bind_vector alone already rejects std::deque, which lacks .reserve()).
std::array<T, N> is the exception that welder does synthesize: neither framework ships a bind_array, but a fixed-size contiguous sequence is small and its protocol is the vector's minus the size-changing ops, so the rods hand-write it (container_kind::fixed_sequence). It binds by reference like a vector — element write-through, a zero-copy NumPy view for arithmetic/POD elements — with append/ resize absent and a length-changing whole assignment rejected.
Definition at line 73 of file containers.hpp.
References welder::fixed_sequence, welder::map, and welder::sequence.
Referenced by welder::container_kind_of(), and welder::is_reference_container().
|
consteval |
Does a participating member alias of scope name type — i.e.
would the sweep of scope register type under that alias?
The alias side of the scope-aware oracle (see scoped_registration). Deliberately no bindability re-check on the target: the oracle is consulted only where every other bindable() branch has already failed, which is exactly the sweep's register-vs-skip arbiter — so "an admitted, participating alias names it" is the whole remaining question.
| Resolution | the carriage's resolution policy. |
| scope | the class whose member aliases to scan. |
| type | the candidate target type. |
| L | the target language. |
Definition at line 187 of file carriage.hpp.
References member_access_admitted(), and welder::policy_of().
Referenced by welder::detail::scoped_registration< Resolution, Scope >::counts_as_registered().
|
consteval |
Definition at line 779 of file annotations.hpp.
References return_policy_kind().
The policy of a return_policy argument list: the trailing kind, reached by dropping the leading lang markers.
Definition at line 777 of file annotations.hpp.
Referenced by welder::return_policy(), and return_policy_kind().
|
consteval |
Definition at line 771 of file annotations.hpp.
References welder::lang_bit(), and return_policy_mask().
|
consteval |
The language mask of a return_policy argument list: the OR of its leading lang markers (the trailing kind contributes nothing; no markers → 0 = all).
Definition at line 769 of file annotations.hpp.
Referenced by welder::return_policy(), and return_policy_mask().
|
consteval |
Do a and b declare the same vtable slot?
Slot identity is the name plus everything overriding keys off: the parameter types and the cv / ref qualifiers. The return type is deliberately excluded — a covariant override (Derived* clone() over Base* clone()) redeclares the same slot with a narrower return, and comparing full type_of would count it as a second slot. noexcept is excluded for the same reason: an override may strengthen* the exception specification, and two overloads cannot differ by noexcept alone, so it can never distinguish genuine slots.
Definition at line 94 of file virtuals.hpp.
Referenced by collect_virtuals().
|
consteval |
Is Alias the only participating alias in Ns welding its specialization?
Two aliases naming the same instantiation would register it twice (a framework error at import time); the carriage diagnoses it at compile time instead. A non-participating duplicate (excluded, or not welded under this resolution) is fine — it simply doesn't bind.
| Resolution | the carriage's resolution policy. |
| Ns | the namespace being swept. |
| Alias | the alias under consideration. |
| L | the target language. |
| pol | the namespace's policy. |
Definition at line 55 of file carriage.hpp.
References welder::names_template_specialization().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_namespace().
|
consteval |
Is Alias the only member alias of Outer whose participation would register its target?
Two participating member aliases naming the same target would register it twice (a framework load error), diagnosed at compile time — the class-scope twin of sole_alias_of_target. The gate side of participation needs no re-check here: siblings share the target, so when the caller (an alias that IS registering) consults this, a marks/access-participating sibling registers too.
| Resolution | the carriage's resolution policy. |
| Outer | the class being bound. |
| Alias | the member alias under consideration. |
| L | the target language. |
| pol | the outer's policy. |
Definition at line 156 of file carriage.hpp.
References member_access_admitted().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_nested_types().
|
consteval |
The ELEMENT argument of the std::span type (its first).
| type | a reflection of the span specialization. |
Definition at line 189 of file bindable.hpp.
|
consteval |
The element-wise STL-wrapper table welder recurses into.
Definition at line 105 of file bindable.hpp.
Referenced by wrapper_value_count().
|
consteval |
The participating stringifier entries for type: free operator<<(std::ostream&, T) overloads of its enclosing namespace, resolved like the anchored operators.
At most one is bound (the target to-string protocols take no second operand — cv-variant duplicates would collide), so the carriage emits entry [0].
| Resolution | the carriage's resolution. |
| type | the welded type. |
| L | the target language. |
Definition at line 830 of file bind_traits.hpp.
References enclosing_namespace(), is_stringifier_for(), and welder::policy_of().
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_operators().
| std::string welder::detail::stringify | ( | const T & | self | ) |
The stringifier wrapper every runtime rod binds for a swept ostream inserter (see is_stringifier_for): run the specific participating overload Fn into a string stream and hand back the text — the body of Python's __str__ and Lua's __tostring.
| T | the welded type. |
| Fn | the inserter's reflection. |
| self | the object to stringify. |
Definition at line 384 of file bind_traits.hpp.
Referenced by welder::rods::luabridge::rod::add_stringifier(), welder::rods::nanobind::rod< DocStyle >::add_stringifier(), welder::rods::pybind11::rod< DocStyle >::add_stringifier(), and welder::rods::sol2::rod::add_stringifier().
|
consteval |
How many TRAILING parameters of Fn carry a C++ default argument.
The count is what a binding can act on: P2996 exposes that a default EXISTS (has_default_argument) but not the defaulting expression itself, so a rod cannot re-state the value — it can, however, bind one truncated overload per omissible arity that calls the function with fewer arguments and lets the LANGUAGE apply the real default at the call site. That keeps the bound default and the C++ default incapable of drifting apart.
| Fn | a reflection of the function (or constructor). |
Definition at line 62 of file bind_traits.hpp.
Referenced by welder::rods::nanobind::rod< DocStyle >::add_constructors(), welder::rods::pybind11::rod< DocStyle >::add_constructors(), welder::rods::nanobind::rod< DocStyle >::add_function(), welder::rods::pybind11::rod< DocStyle >::add_function(), welder::rods::nanobind::rod< DocStyle >::add_method(), welder::rods::pybind11::rod< DocStyle >::add_method(), welder::rods::nanobind::rod< DocStyle >::add_static_method(), and welder::rods::pybind11::rod< DocStyle >::add_static_method().
|
consteval |
Reject an include/only mark on a move constructor of Type.
Move construction never crosses a language boundary — no target language has move semantics — so a move constructor is skipped structurally everywhere (it is not a bindable-shape constructor, and the copy decision never consults it). An include or only mark on one is therefore an intent welder cannot honor: diagnosed as a hard error rather than silently dropped. mark::exclude stays a harmless no-op (excluding what never binds restricts nothing).
| Type | the class type reflection. |
| diag::marked_move_constructor | (a constant-evaluation error) on a marked move constructor. |
Definition at line 1099 of file bind_traits.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_class_interior().
|
consteval |
Guard the property surface against name shadowing: no property's key may equal a bound data member's or (non-accessor) method's identifier key on the same class surface (own + flattened bases).
Keys are case-normalized word sequences, so the comparison is deliberately convention-insensitive — a property and a member differing only in spelling convention collide under any styled binding. Nested types are exempt (a PascalCase nested type legitimately shares its words with a camel/snake property).
| Resolution | the carriage's resolution. |
| src | the class to scan (a base during recursion). |
| L | the target language. |
| bound_into | the welded type. |
| keys | the property keys to check against. |
| diag::property_name_collision | on a clash. |
Definition at line 1198 of file bind_traits.hpp.
References welder::is_accessor_for(), is_method_candidate(), member_access_admitted(), welder::policy_of(), welder::public_bases(), welder::naming::split_words(), and validate_property_shadowing().
Referenced by property_entries(), and validate_property_shadowing().
|
consteval |
The language mask of a weld_as argument list: the OR of its leading lang markers (the trailing name contributes nothing; no markers → 0 = all).
Definition at line 702 of file annotations.hpp.
Referenced by welder::weld_as(), and weld_as_mask().
|
consteval |
Definition at line 704 of file annotations.hpp.
|
consteval |
Definition at line 706 of file annotations.hpp.
References welder::lang_bit(), and weld_as_mask().
|
consteval |
The verbatim name of a weld_as argument list: the trailing string, reached by dropping the leading lang markers (its extent N preserved by reference).
Definition at line 713 of file annotations.hpp.
Referenced by welder::weld_as(), and weld_as_name().
|
consteval |
Definition at line 715 of file annotations.hpp.
References weld_as_name().
|
consteval |
How many leading arguments of type to recurse if it is a listed wrapper.
| type | a reflection of the (possibly wrapped) type. |
Definition at line 126 of file bindable.hpp.
References stl_wrappers().
Referenced by bindable(), and mentions_union().
|
inlineconstexpr |
The inline capacity of an accessor's explicit property name.
Unlike weld_as_spec, the accessor spec is not templated on the name length: the resolution machinery reads accessor marks off dynamic reflections (inside member_bound and the overload-set selectors, where the member is a plain std::meta::info value, not a template argument), and std::meta::extract needs the annotation's exact type spelled statically — which a length-templated spec cannot provide there. A fixed-capacity inline buffer keeps the spec one extractable type; the factory diagnoses an over-long name at the annotation site.
Definition at line 328 of file annotations.hpp.
Referenced by accessor_name(), accessor_name(), and accessor_name().