|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
The one bindability fact a backend must provide: can it natively convert a type without welder registering it? More...
#include <welder/concepts.hpp>
The one bindability fact a backend must provide: can it natively convert a type without welder registering it?
has_native_caster<T> is true for a native scalar/string/STL type, or one the user gave a bespoke backend converter; false means T is a program-defined class/enum the backend can only handle once welder has registered it (so welder then requires T to be welded).
This concept is a shape guard, not a per-type correctness guarantee: it only checks that B exposes the has_native_caster member template and that it yields something bool-convertible, so a backend that forgot it fails here with a clear "not a `caster_oracle`" instead of a deep error inside bindable(). A concept cannot quantify over every T, so we probe with a single arbitrary type — welder::detail::any_type. Any complete type would do; the value it answers is never inspected.
| B | the rod type. |
Definition at line 86 of file concepts.hpp.