1#ifndef PODIO_PODIOVERSION_H
2#define PODIO_PODIOVERSION_H
8#if __cplusplus >= 202002L
16#define PODIO_VERSION(major, minor, patch) \
17 ((UINT64_C(major) << 32) | (UINT64_C(minor) << 16) | UINT64_C(patch))
19#define PODIO_MAJOR_VERSION(v) (((v) & (-1UL >> 16)) >> 32)
21#define PODIO_MINOR_VERSION(v) (((v) & (-1UL >> 32)) >> 16)
23#define PODIO_PATCH_VERSION(v) ((v) & (-1UL >> 48))
26#define podio_VERSION_MAJOR @podio_VERSION_MAJOR@
27#define podio_VERSION_MINOR @podio_VERSION_MINOR@
28#define podio_VERSION_PATCH @podio_VERSION_PATCH@
29#define podio_VERSION PODIO_VERSION(podio_VERSION_MAJOR, podio_VERSION_MINOR, podio_VERSION_PATCH)
32#define PODIO_BUILD_VERSION PODIO_VERSION(podio_VERSION_MAJOR, podio_VERSION_MINOR, podio_VERSION_PATCH)
46#if __cplusplus >= 202002L
47 auto operator<=>(
const Version&)
const =
default;
50 #define DEFINE_COMP_OPERATOR(OP) \
51 constexpr bool operator OP(const Version& o) const noexcept { \
52 return std::tie(major, minor, patch) OP std::tie(o.major, o.minor, o.patch); \
62 #undef DEFINE_COMP_OPERATOR
65 explicit operator std::string()
const {
86static constexpr Version decode_version(
unsigned long version)
noexcept {
std::ostream & operator<<(std::ostream &os, const Version &v)
#define podio_VERSION_MAJOR
#define podio_VERSION_MINOR
#define DEFINE_COMP_OPERATOR(OP)
#define PODIO_MAJOR_VERSION(v)
Get the major version from a preprocessor defined version.
#define podio_VERSION_PATCH
#define PODIO_PATCH_VERSION(v)
Get the patch version from a preprocessor defined version.
#define PODIO_MINOR_VERSION(v)
Get the minor version from a preprocessor defined version.
friend std::ostream & operator<<(std::ostream &, const Version &v)