welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
welder::policy Namespace Reference

The policy annotation values. More...

Variables

constexpr detail::policy_spec automatic {policy_kind::automatic}
constexpr detail::policy_spec opt_in {policy_kind::opt_in}
constexpr detail::weld_protected_spec weld_protected {}
 Admit the type's protected members into resolution — bare (all languages) or called with languages to scope it.

Detailed Description

The policy annotation values.

Usage: [[=welder::policy::opt_in]] (auto is reserved, hence automatic).

Variable Documentation

◆ automatic

detail::policy_spec welder::policy::automatic {policy_kind::automatic}
inlineconstexpr
See also
policy_kind::automatic

Definition at line 400 of file annotations.hpp.

◆ opt_in

detail::policy_spec welder::policy::opt_in {policy_kind::opt_in}
inlineconstexpr
See also
policy_kind::opt_in

Definition at line 401 of file annotations.hpp.

◆ weld_protected

detail::weld_protected_spec welder::policy::weld_protected {}
inlineconstexpr

Admit the type's protected members into resolution — bare (all languages) or called with languages to scope it.

Combinable with automatic / opt_in (it is a separate annotation, not a third policy kind): weld_protected decides that protected members are visible to the resolution; the policy kind and the member marks then resolve them exactly like public ones. Constructors are exempt for now (a protected constructor stays unbound — construction goes through a trampoline where one exists); private members are never admitted.

See also
detail::weld_protected_spec

Definition at line 411 of file annotations.hpp.