diff options
| author | Fuwn <[email protected]> | 2022-06-24 20:33:48 -1000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-06-24 20:33:48 -1000 |
| commit | cfa6b082eaa4a02f34576cbd5a55e3c46f04acdd (patch) | |
| tree | 01fc32af55077dcf7093b904a9208125bb197874 /src/help.hh | |
| parent | fix(node): stringable explicit copy constructor (diff) | |
| download | cait-cfa6b082eaa4a02f34576cbd5a55e3c46f04acdd.tar.xz cait-cfa6b082eaa4a02f34576cbd5a55e3c46f04acdd.zip | |
refactor(help): move version to constexpr
Diffstat (limited to 'src/help.hh')
| -rw-r--r-- | src/help.hh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/help.hh b/src/help.hh index 37afb58..88517da 100644 --- a/src/help.hh +++ b/src/help.hh @@ -21,13 +21,22 @@ #include <sstream> -#define VERSION_MAJOR "0" -#define VERSION_MINOR "1" -#define VERSION_PATCH "0" -#define VERSION VERSION_MAJOR "." VERSION_MINOR "." VERSION_PATCH +#define CAIT_TO_STRING(x) #x +#define CAIT_STR(x) CAIT_TO_STRING(x) namespace cait { +namespace version { + +constexpr unsigned int major = 0; +constexpr unsigned int minor = 1; +constexpr unsigned int patch = 0; +constexpr auto whole() -> std::string { + return CAIT_STR(major) "." CAIT_STR(minor) "." CAIT_STR(patch); +} + +} // namespace version + auto help_message() -> std::string; } // namespace cait |