|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
Tack-welding resolution: bind an unmarked library greedily. More...
#include <welder/carriage.hpp>
Static Public Member Functions | |
| static consteval bool | participates (std::meta::info, lang) |
| static consteval bool | is_native_base (std::meta::info, lang, std::meta::info) |
| template<std::meta::info, lang> | |
| static consteval auto | native_bases () |
| static consteval bool | member_participates (std::meta::info mem, lang L, policy_kind pol, std::meta::info) |
| static consteval bool | alias_participates (std::meta::info mem, lang L, policy_kind pol, std::meta::info) |
| Greedy: an alias-declared specialization binds like any other type — no weld needed on alias or template; marks (via the instantiation) still prune. | |
| static consteval bool | class_member_participates (std::meta::info mem, lang L, policy_kind pol, std::meta::info) |
| Same as stitch: greedy ignores the weld marker, not the marks — a mark on an individual overload/constructor still prunes it. | |
| static consteval bool | protected_participates (std::meta::info mem, lang L, std::meta::info) |
| Protected members: the WeldProtected knob (the whole-pass blanket for an unannotatable third-party library), or — knob off — the annotation, exactly like stitch. | |
| static consteval bool | namespace_participates (std::meta::info ns, lang L, policy_kind pol, std::meta::info) |
| static consteval bool | counts_as_registered (std::meta::info type, lang L) |
| The gate's registration oracle: a type the greedy pass itself registers — any complete class/enum whose marks don't exclude it for L — counts, so an unmarked library's own types may appear in its signatures without a trust_bindable hatch. | |
Tack-welding resolution: bind an unmarked library greedily.
Named for a tack weld — quick spot welds that hold un-prepped work together. It ignores welder's weld markers entirely: every reflectable type / free function / global participates, namespaces recurse greedily, and every public base is flattened in (no reliance on a base being separately registered). Bindability is still* enforced — a member whose type is not representable trips the same gate as under marker resolution — so a non-representable member reachable from a bound entity is a hard error (hatch it with mark::trust_bindable / the trust_bindable<T> variable template, or point the tack at a narrower namespace). Any mark::exclude that happens to be present is still honored (via member_bound), so a partially-annotated header can still prune.
| WeldProtected | admit every type's protected members (default false: public only, like the stitch default). The knob exists because a third-party library cannot carry a [[=welder::policy::weld_protected]] annotation — this is the tack analogue, blanket for the whole pass: welder::carriages::basic_carriage<welder::carriages::greedy_resolution<true>>. An annotation that is present (a partially-annotated header) is honored either way; for surgical per-member control, override protected_participates in a bespoke resolution. Private members stay out regardless — that boundary is not a knob. |
Definition at line 364 of file carriage.hpp.
|
inlinestaticconsteval |
Greedy: an alias-declared specialization binds like any other type — no weld needed on alias or template; marks (via the instantiation) still prune.
Definition at line 381 of file carriage.hpp.
References welder::member_bound().
|
inlinestaticconsteval |
Same as stitch: greedy ignores the weld marker, not the marks — a mark on an individual overload/constructor still prunes it.
Definition at line 388 of file carriage.hpp.
References welder::member_bound().
|
inlinestaticconsteval |
The gate's registration oracle: a type the greedy pass itself registers — any complete class/enum whose marks don't exclude it for L — counts, so an unmarked library's own types may appear in its signatures without a trust_bindable hatch.
Like the stitch oracle this is a pure predicate ("a tack weld of this type's namespace registers it"), never a visited-set: tack-welding several namespaces in separate passes and forward references within one namespace stay order-independent (the frameworks resolve signature types lazily, at call time, so registration order does not matter — only that the registration exists once the module finishes loading). The trust is exactly that: welder cannot know which namespaces you tack, so a signature naming a registrable type you never weld surfaces as the framework's unregistered-type error at call time, not at compile time.
A forward-declared (incomplete) type is deliberately rejected: the greedy walk cannot register what has no definition, so a signature naming one keeps failing the gate at compile time.
A class-scoped (nested) type registers with its enclosing class's binding — the greedy pass sweeps member types exactly like the stitch one (the outer's policy + the type's own marks, access admitted), so it counts via detail::nested_type_registered, recursing into the enclosing class.
Definition at line 432 of file carriage.hpp.
References welder::automatic, welder::is_nested_type(), welder::member_bound(), and welder::detail::nested_type_registered().
|
inlinestaticconsteval |
Definition at line 366 of file carriage.hpp.
|
inlinestaticconsteval |
Definition at line 374 of file carriage.hpp.
References welder::member_bound().
|
inlinestaticconsteval |
Definition at line 403 of file carriage.hpp.
References welder::member_bound(), and welder::detail::namespace_has_bindable().
|
inlinestaticconsteval |
Definition at line 371 of file carriage.hpp.
|
inlinestaticconsteval |
Definition at line 365 of file carriage.hpp.
|
inlinestaticconsteval |
Protected members: the WeldProtected knob (the whole-pass blanket for an unannotatable third-party library), or — knob off — the annotation, exactly like stitch.
Arbitrates protected only: public/private are decided before the hook (see detail::member_access_admitted, which also documents the trailing bound-into reflection).
Definition at line 398 of file carriage.hpp.
References welder::protected_welded().