|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
welder's version identity and ABI namespace. More...
Go to the source code of this file.
Namespaces | |
| namespace | WELDER_ABI_NAMESPACE |
Macros | |
| #define | WELDER_VERSION_MAJOR 0 |
| welder's major version component. | |
| #define | WELDER_VERSION_MINOR 1 |
| welder's minor version component. | |
| #define | WELDER_VERSION_PATCH 0 |
| welder's patch version component. | |
| #define | WELDER_VERSION |
| One monotonically comparable number: major * 1'000'000 + minor * 1'000 +
patch — #if WELDER_VERSION >= 1000 reads "at least 0.1.0". | |
| #define | WELDER_DETAIL_VERSION_STR2(x) |
| #define | WELDER_DETAIL_VERSION_STR(x) |
| #define | WELDER_VERSION_STRING |
| The version as a string literal, "major.minor.patch". | |
| #define | WELDER_ABI_NAMESPACE v0 |
| The ABI namespace: every welder:: name actually lives in this inline namespace (namespace welder { … } throughout the headers). | |
Variables | |
| constexpr int | WELDER_ABI_NAMESPACE::version_major {WELDER_VERSION_MAJOR} |
| welder's version as constexpr integers, for C++-level dispatch (the macros above serve the preprocessor). | |
| constexpr int | WELDER_ABI_NAMESPACE::version_minor {WELDER_VERSION_MINOR} |
| constexpr int | WELDER_ABI_NAMESPACE::version_patch {WELDER_VERSION_PATCH} |
welder's version identity and ABI namespace.
The three version components below are the single source of truth: the top-level CMakeLists.txt parses them for project(welder VERSION …) and conanfile.py reads them the same way — bump them here only.
Definition in file version.hpp.
| #define WELDER_ABI_NAMESPACE v0 |
The ABI namespace: every welder:: name actually lives in this inline namespace (namespace welder { … } throughout the headers).
Inline, so it is invisible in source — you spell welder::weld, welder::welder<Rod> as ever — but it is part of the mangled symbol names. welder is header-only: every TU instantiates its own copy of the templates it uses, and when two libraries built against different welder versions are linked into one binary, the linker would otherwise silently merge those (weak) symbols across versions — an ODR violation with undefined behavior. Versioned, the two sets of symbols stay distinct: each library runs the welder it was built with, and mixing welder types across the two fails loudly (different types) instead of corrupting silently.
Bumped only on ABI-breaking releases, not on every version. The headers spell the namespace literally (v0); this macro is for code that needs to name* the ABI namespace programmatically, and the guard below keeps the two in sync.
Definition at line 52 of file version.hpp.
| #define WELDER_DETAIL_VERSION_STR | ( | x | ) |
Definition at line 26 of file version.hpp.
| #define WELDER_DETAIL_VERSION_STR2 | ( | x | ) |
Definition at line 25 of file version.hpp.
| #define WELDER_VERSION |
One monotonically comparable number: major * 1'000'000 + minor * 1'000 + patch — #if WELDER_VERSION >= 1000 reads "at least 0.1.0".
Definition at line 21 of file version.hpp.
| #define WELDER_VERSION_MAJOR 0 |
welder's major version component.
Definition at line 15 of file version.hpp.
| #define WELDER_VERSION_MINOR 1 |
welder's minor version component.
Definition at line 16 of file version.hpp.
| #define WELDER_VERSION_PATCH 0 |
welder's patch version component.
Definition at line 17 of file version.hpp.
| #define WELDER_VERSION_STRING |
The version as a string literal, "major.minor.patch".
Definition at line 29 of file version.hpp.