welder
0.1.0
Bindings for annotated C++ types, from C++26 reflection
Toggle main menu visibility
Loading...
Searching...
No Matches
version.hpp
Go to the documentation of this file.
1
#pragma once
2
14
15
#define WELDER_VERSION_MAJOR 0
16
#define WELDER_VERSION_MINOR 1
17
#define WELDER_VERSION_PATCH 0
18
21
#define WELDER_VERSION (WELDER_VERSION_MAJOR * 1000000 \
22
+ WELDER_VERSION_MINOR * 1000 \
23
+ WELDER_VERSION_PATCH)
24
25
#define WELDER_DETAIL_VERSION_STR2(x) #x
26
#define WELDER_DETAIL_VERSION_STR(x) WELDER_DETAIL_VERSION_STR2(x)
27
29
#define WELDER_VERSION_STRING \
30
WELDER_DETAIL_VERSION_STR(WELDER_VERSION_MAJOR) "." \
31
WELDER_DETAIL_VERSION_STR(WELDER_VERSION_MINOR) "." \
32
WELDER_DETAIL_VERSION_STR(WELDER_VERSION_PATCH)
33
52
#define WELDER_ABI_NAMESPACE v0
53
54
namespace
welder::inline
WELDER_ABI_NAMESPACE
{
55
58
inline
constexpr
int
version_major
{
WELDER_VERSION_MAJOR
};
59
inline
constexpr
int
version_minor
{
WELDER_VERSION_MINOR
};
60
inline
constexpr
int
version_patch
{
WELDER_VERSION_PATCH
};
61
62
}
// namespace welder
63
64
// Drift guard: the headers spell the ABI namespace literally (`v0`); if
65
// WELDER_ABI_NAMESPACE ever diverges from them, the constant above lands in a
66
// different inline namespace and this name fails to resolve.
67
static_assert
(::welder::v0::version_major ==
WELDER_VERSION_MAJOR
,
68
"WELDER_ABI_NAMESPACE is out of sync with the `v0` the headers spell"
);
WELDER_ABI_NAMESPACE
Definition
version.hpp:54
WELDER_ABI_NAMESPACE::version_major
constexpr int version_major
welder's version as constexpr integers, for C++-level dispatch (the macros above serve the preprocess...
Definition
version.hpp:58
WELDER_ABI_NAMESPACE::version_patch
constexpr int version_patch
Definition
version.hpp:60
WELDER_ABI_NAMESPACE::version_minor
constexpr int version_minor
Definition
version.hpp:59
WELDER_VERSION_MINOR
#define WELDER_VERSION_MINOR
welder's minor version component.
Definition
version.hpp:16
WELDER_VERSION_MAJOR
#define WELDER_VERSION_MAJOR
welder's major version component.
Definition
version.hpp:15
WELDER_VERSION_PATCH
#define WELDER_VERSION_PATCH
welder's patch version component.
Definition
version.hpp:17
src
welder
version.hpp
Generated by
1.17.0