welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
reflect.hpp File Reference

Language-agnostic resolution: given a reflected type/member and a target language, decide what participates in binding. More...

#include <meta>
#include <string>
#include <welder/diag.hpp>
Include dependency graph for reflect.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  welder

Functions

consteval bool welder::weld_mask_admits (unsigned mask, lang L)
 Does a weld mask admit language L?
consteval bool welder::welded_for (std::meta::info type, lang L)
 Is type welded for language L — i.e.
consteval bool welder::names_template_specialization (std::meta::info mem)
 Is mem a namespace-scope alias naming a class-template specialization — the one way an instantiation can enter a namespace sweep?
consteval bool welder::alias_welded_for (std::meta::info mem, lang L)
 Is the specialization named by alias mem welded for language L — reading the alias's own weld first, the instantiation's (via its template) second?
consteval bool welder::alias_marks_admissible (std::meta::info mem)
 May the annotations on alias-declaration mem appear there?
consteval bool welder::member_alias_marks_admissible (std::meta::info mem)
 May the annotations on member type-alias mem appear there?
consteval policy_kind welder::policy_of (std::meta::info type)
 The reflection policy declared on type, defaulting to automatic.
consteval bool welder::protected_welded (std::meta::info type, lang L)
 Does type admit its protected members for language L — i.e.
consteval bool welder::excluded_for (std::meta::info member, lang L)
 Does member carry an exclude mark covering language L?
consteval bool welder::included_for (std::meta::info member, lang L)
 Does member carry an include mark covering language L?
consteval bool welder::trusted_for (std::meta::info member, lang L)
 Does member carry a trust_bindable mark covering language L?
consteval bool welder::member_no_reassign (std::meta::info member, lang L)
 Is data member member bound read-only for L by a no_reassign mark?
consteval bool welder::has_no_reassign_mark (std::meta::info entity)
 Does entity carry any no_reassign mark at all (any language)?
consteval bool welder::accessor_marked (std::meta::info member, accessor_role role, lang L)
 Does member carry a getter/setter mark of role covering L?
consteval bool welder::is_accessor_for (std::meta::info member, lang L)
 Does member supply either property half for language L — i.e.
consteval bool welder::has_accessor_mark (std::meta::info member)
 Does member carry any getter/setter mark at all (any role, any language)?
consteval std::string welder::accessor_explicit_name (std::meta::info member, accessor_role role, lang L)
 The explicit property name an accessor mark of role forces for L, or "" when the name derives from the function's identifier.
consteval rv_kind welder::return_policy_of (std::meta::info fn, lang L)
 The return-value policy declared on callable fn for language L.
template<std::meta::info Fn, lang L>
consteval void welder::validate_return_policy ()
 Reject a return_policy on Fn (for language L) that contradicts Fn's return type.
consteval bool welder::member_bound (std::meta::info member, lang L, policy_kind pol)
 The core decision a backend asks for each member: does member bind for language L under policy pol?
consteval std::vector< std::meta::info > welder::public_bases (std::meta::info type)
 The types of the public base classes of type.

Detailed Description

Language-agnostic resolution: given a reflected type/member and a target language, decide what participates in binding.

Backends consume these predicates and never re-implement the annotation semantics.

Note
This header depends on the welder vocabulary (welder::detail::weld_spec, lang, …) but deliberately does NOT include <welder/annotations.hpp>. Provide the vocabulary first — #include <welder/vocabulary.hpp> — then include this header.

Definition in file reflect.hpp.