Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
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
13namespace aria::abi {
14
19constexpr 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 {
53}
54
55} // namespace aria::abi
#define ARIA_ABI_API
Definition export.hpp:21
Definition signal.hpp:12
constexpr int version_minor
Definition version.hpp:16
constexpr int version_major
Definition version.hpp:15
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
constexpr int version_patch
Definition version.hpp:17
int runtime_abi_version() noexcept
ABI version of the loaded aria library.
const char * runtime_version_string() noexcept
Release version string of the loaded aria library ("2.0.0").
constexpr const char * version_string
Definition version.hpp:19
constexpr int abi_version
Definition version.hpp:18
#define ARIA_VERSION_PATCH
Definition version.hpp:7
#define ARIA_VERSION_STRING
Definition version.hpp:9
#define ARIA_VERSION_MINOR
Definition version.hpp:6
#define ARIA_ABI_VERSION
Definition version.hpp:11
#define ARIA_VERSION_MAJOR
Definition version.hpp:5