dasmig-core 1.2.0
Shared random engine, distributions and data tiers for the dasmig generator libraries
Loading...
Searching...
No Matches
version.hpp File Reference

dasmig-core version and the compatibility check used by libraries. More...

Go to the source code of this file.

Classes

struct  dasmig::core::version_t
 A semantic version. More...
 

Macros

#define DASMIG_CORE_VERSION_MAJOR   1
 Major version. Changes when generated output or the API changes incompatibly.
 
#define DASMIG_CORE_VERSION_MINOR   2
 Minor version. Changes when features are added compatibly.
 
#define DASMIG_CORE_VERSION_PATCH   0
 Patch version. Changes for fixes that keep output identical.
 
#define DASMIG_CORE_REQUIRE(major, minor)
 Fails compilation unless the core in use is compatible with the version a library was built against.
 

Variables

constexpr version_t dasmig::core::version
 The version of the core in use.
 

Detailed Description

dasmig-core version and the compatibility check used by libraries.

Author
Diego Dasso Migotto (diegomigotto at hotmail dot com)

Definition in file version.hpp.

Macro Definition Documentation

◆ DASMIG_CORE_REQUIRE

#define DASMIG_CORE_REQUIRE (   major,
  minor 
)
Value:
static_assert(DASMIG_CORE_VERSION_MAJOR == (major) && \
"dasmig-core version mismatch: the libraries included in " \
"this translation unit vendor incompatible core versions")
#define DASMIG_CORE_VERSION_MINOR
Minor version. Changes when features are added compatibly.
Definition version.hpp:19
#define DASMIG_CORE_VERSION_MAJOR
Major version. Changes when generated output or the API changes incompatibly.
Definition version.hpp:17

Fails compilation unless the core in use is compatible with the version a library was built against.

Every library vendors its own copy of the core. When two libraries are included in one translation unit, the include guards keep only the first copy, so a library must check that the copy actually in use is compatible: same major version, and at least the minor version it needs.

#include "core.hpp"
dasmig-core: the shared foundation of the dasmig generator libraries (random engine,...
#define DASMIG_CORE_REQUIRE(major, minor)
Fails compilation unless the core in use is compatible with the version a library was built against.
Definition version.hpp:35

Definition at line 35 of file version.hpp.

◆ DASMIG_CORE_VERSION_MAJOR

#define DASMIG_CORE_VERSION_MAJOR   1

Major version. Changes when generated output or the API changes incompatibly.

Definition at line 17 of file version.hpp.

◆ DASMIG_CORE_VERSION_MINOR

#define DASMIG_CORE_VERSION_MINOR   2

Minor version. Changes when features are added compatibly.

Definition at line 19 of file version.hpp.

◆ DASMIG_CORE_VERSION_PATCH

#define DASMIG_CORE_VERSION_PATCH   0

Patch version. Changes for fixes that keep output identical.

Definition at line 21 of file version.hpp.

Variable Documentation

◆ version

constexpr version_t dasmig::core::version
inlineconstexpr
Initial value:
{.major = 1 ,
.minor = 2 ,
.patch = 0 }

The version of the core in use.

Definition at line 54 of file version.hpp.