-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
ens_version.hpp
58 lines (47 loc) · 1.76 KB
/
ens_version.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* @file ens_version.hpp
* @author Conrad Sanderson
* @author Ryan Curtin
*
* ensmallen is free software; you may redistribute it and/or modify it under
* the terms of the 3-clause BSD license. You should have received a copy of
* the 3-clause BSD license along with ensmallen. If not, see
* http://www.opensource.org/licenses/BSD-3-Clause for more information.
*/
// This follows the Semantic Versioning pattern defined in https://semver.org/.
#define ENS_VERSION_MAJOR 2
// The minor version is two digits so regular numerical comparisons of versions
// work right. The first minor version of a release is always 10.
#define ENS_VERSION_MINOR 20
#define ENS_VERSION_PATCH 0
// If this is a release candidate, it will be reflected in the version name
// (i.e. the version name will be "RC1", "RC2", etc.). Otherwise the version
// name will typically be a seemingly arbitrary set of words that does not
// contain the capitalized string "RC".
#define ENS_VERSION_NAME "Stripped Bolt Head"
// Incorporate the date the version was released.
#define ENS_VERSION_YEAR "2023"
#define ENS_VERSION_MONTH "10"
#define ENS_VERSION_DAY "02"
namespace ens {
struct version
{
static const unsigned int major = ENS_VERSION_MAJOR;
static const unsigned int minor = ENS_VERSION_MINOR;
static const unsigned int patch = ENS_VERSION_PATCH;
static inline std::string as_string()
{
const char* nickname = ENS_VERSION_NAME;
std::stringstream ss;
ss << version::major << '.' << version::minor << '.' << version::patch
<< " (" << nickname << ')';
return ss.str();
}
static inline std::string date()
{
std::stringstream ss;
ss << ENS_VERSION_YEAR << '-' << ENS_VERSION_MONTH << '-' << ENS_VERSION_DAY;
return ss.str();
}
};
} // namespace ens