welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
welder::detail::trust_bindable_spec Struct Reference

The stored form of a trust_bindable member mark. More...

#include <welder/annotations.hpp>

Public Member Functions

template<class... Ls>
consteval trust_bindable_spec operator() (Ls... ls) const
 Scope the vouch to specific languages.

Public Attributes

unsigned mask = 0
 The languages to trust for; 0 == all languages.

Detailed Description

The stored form of a trust_bindable member mark.

welder's bindability gate (see <welder/bindable.hpp>) rejects a program-defined type that is not welded, because it cannot see a registration made outside welder — a hand-written pybind11 class_, a third-party library's bindings. trust_bindable is the user's vouch that such a registration exists (or that the backend can otherwise convert the type), suppressing the gate. The user then owns that registration; welder emits the binding trusting it is there.

This is the member granularity — it trusts this member's type(s): the data member's type, or a function's whole signature. For the type granularity see the welder::trust_bindable variable template. Usable bare (all languages) or scoped, like exclude_spec.

Definition at line 232 of file annotations.hpp.

Member Function Documentation

◆ operator()()

template<class... Ls>
trust_bindable_spec welder::detail::trust_bindable_spec::operator() ( Ls... ls) const
inlineconsteval

Scope the vouch to specific languages.

Template Parameters
Lsthe language enum types (deduced).
Parameters
lsthe languages to trust for.
Returns
a scoped trust_bindable_spec.

Definition at line 240 of file annotations.hpp.

References welder::lang_mask().

Member Data Documentation

◆ mask

unsigned welder::detail::trust_bindable_spec::mask = 0

The languages to trust for; 0 == all languages.

Definition at line 233 of file annotations.hpp.


The documentation for this struct was generated from the following file: