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

The core interface concepts welder's static polymorphism rests on, gathered in one catalogue: the customization-point contracts a rod (or a user) plugs into. More...

#include <array>
#include <concepts>
#include <meta>
#include <ranges>
#include <string>
#include <type_traits>
#include <utility>
Include dependency graph for concepts.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  welder::detail::any_type
 A placeholder class type for shape-probing a member template inside a concept. More...

Namespaces

namespace  welder
namespace  welder::detail
 The stored forms of the annotation vocabulary.
namespace  welder::naming

Concepts

concept  welder::caster_oracle
 The one bindability fact a backend must provide: can it natively convert a type without welder registering it?
concept  welder::rod
 The contract a rod (a welder backend, welder::rods::…::rod) must satisfy to plug into the generic driver.
concept  welder::resolution
 The contract a resolution — the carriage's which-participates policy — must satisfy to be injected as welder::carriages::basic_carriage's Resolution argument.
concept  welder::doc_style
 A style folds a welder::detail::function_doc into one docstring.
concept  welder::naming::name_style
 A name style names every kind of entity welder can bind, through one hook per kind.

Enumerations

enum class  welder::detail::any_enum
 A placeholder enum type for shape-probing the enum hooks against a rod's enum_handle_type<E>any_type is a class, so it cannot stand in for an enum. More...

Detailed Description

The core interface concepts welder's static polymorphism rests on, gathered in one catalogue: the customization-point contracts a rod (or a user) plugs into.

Five concepts live here, each the compile-time shape guard for one seam:

  • welder::rod — the emission contract a rod (a welding rod: the backend that lays a framework's bindings down) satisfies to plug into the carriage.
  • welder::caster_oracle — the one bindability fact a rod must expose: can it represent a type natively, without welder registering a class/enum for it?
  • welder::resolution — the which-participates contract a resolution (the carriage's other injected policy) satisfies: it reads welder's markers to decide what the carriage binds, kept apart from the rod's how.
  • welder::naming::name_style — the per-kind name-styling hooks a naming style supplies (transform_class, transform_method, …).
  • welder::doc_style — how a documentation style folds a welder::detail::function_doc into one docstring.

The concepts are pooled here — rather than each sitting inside the header of the machinery it constrains — so the interface surface reads as one place; the machinery itself stays in its own header (bindable.hpp, naming.hpp, doc.hpp, the carriage), each of which includes this one.

Note
Like the rest of the reflection layer (reflect.hpp, naming.hpp, …), this names* the welder vocabulary (lang) but deliberately does NOT include <welder/annotations.hpp>/<welder/lang.hpp>. Provide the vocabulary first — #include <welder/vocabulary.hpp> — then any header that pulls this in.

Definition in file concepts.hpp.