Aria
2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
Toggle main menu visibility
Loading...
Searching...
No Matches
version.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
aria/abi/export.hpp
"
4
5
#define ARIA_VERSION_MAJOR 2
6
#define ARIA_VERSION_MINOR 0
7
#define ARIA_VERSION_PATCH 0
8
9
#define ARIA_VERSION_STRING "2.0.0"
10
11
#define ARIA_ABI_VERSION 2
12
13
namespace
aria::abi
{
14
15
constexpr
int
version_major
=
ARIA_VERSION_MAJOR
;
16
constexpr
int
version_minor
=
ARIA_VERSION_MINOR
;
17
constexpr
int
version_patch
=
ARIA_VERSION_PATCH
;
18
constexpr
int
abi_version
=
ARIA_ABI_VERSION
;
19
constexpr
const
char
*
version_string
=
ARIA_VERSION_STRING
;
20
21
// ---------------------------------------------------------------------------
22
//Runtime ABI interrogation
23
//
24
// The constants above are compile-time: they bake into the consumer, so they
25
// describe the headers the consumer was BUILT against and can never reveal a
26
// mismatch with the library it is actually LINKED to. That made
27
// `ARIA_ABI_VERSION` decorative — nothing in the project read it.
28
//
29
// These two functions are compiled into the shared library, so comparing
30
// them against the constants detects exactly that mismatch.
31
// ---------------------------------------------------------------------------
32
35
[[nodiscard]]
ARIA_ABI_API
int
runtime_abi_version
() noexcept;
36
38
[[nodiscard]]
ARIA_ABI_API
const
char
*
runtime_version_string
() noexcept;
39
51
[[nodiscard]] inline
bool
abi_matches_headers
() noexcept {
52
return
runtime_abi_version
() ==
abi_version
;
53
}
54
55
}
// namespace aria::abi
export.hpp
ARIA_ABI_API
#define ARIA_ABI_API
Definition
export.hpp:21
aria::abi
Definition
signal.hpp:12
aria::abi::version_minor
constexpr int version_minor
Definition
version.hpp:16
aria::abi::version_major
constexpr int version_major
Definition
version.hpp:15
aria::abi::abi_matches_headers
bool abi_matches_headers() noexcept
True iff the loaded library's ABI version matches the headers this translation unit was compiled agai...
Definition
version.hpp:51
aria::abi::version_patch
constexpr int version_patch
Definition
version.hpp:17
aria::abi::runtime_abi_version
int runtime_abi_version() noexcept
ABI version of the loaded aria library.
aria::abi::runtime_version_string
const char * runtime_version_string() noexcept
Release version string of the loaded aria library ("2.0.0").
aria::abi::version_string
constexpr const char * version_string
Definition
version.hpp:19
aria::abi::abi_version
constexpr int abi_version
Definition
version.hpp:18
ARIA_VERSION_PATCH
#define ARIA_VERSION_PATCH
Definition
version.hpp:7
ARIA_VERSION_STRING
#define ARIA_VERSION_STRING
Definition
version.hpp:9
ARIA_VERSION_MINOR
#define ARIA_VERSION_MINOR
Definition
version.hpp:6
ARIA_ABI_VERSION
#define ARIA_ABI_VERSION
Definition
version.hpp:11
ARIA_VERSION_MAJOR
#define ARIA_VERSION_MAJOR
Definition
version.hpp:5
modules
abi
include
aria
abi
version.hpp
Generated by
1.18.0