Metall  v0.28
A persistent memory allocator for data-centric analytics
version.hpp
Go to the documentation of this file.
1 // Copyright 2020 Lawrence Livermore National Security, LLC and other Metall
2 // Project Developers. See the top-level COPYRIGHT file for details.
3 //
4 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
5 
6 #ifndef METALL_VERSION_HPP
7 #define METALL_VERSION_HPP
8 
17 #define METALL_VERSION 2800
18 
19 namespace metall {
21 using version_type = uint32_t;
22 static_assert(std::numeric_limits<version_type>::max() >= METALL_VERSION,
23  "version_type cannot handle the current version");
24 
25 #ifndef DOXYGEN_SKIP
28 namespace ver_detail {
29 static constexpr version_type k_error_version = 0;
30 static_assert(k_error_version != METALL_VERSION,
31  "The current version is equal to a error number");
32 } // namespace ver_detail
33 #endif // DOXYGEN_SKIP
34 
43  return std::to_string(version / 100000) + "." +
44  std::to_string(version / 100 % 1000) + "." +
45  std::to_string(version % 100);
46 }
47 } // namespace metall
48 
49 #endif // METALL_VERSION_HPP
basic_string< char > string
A string container that uses char as its character type and Metall as its default allocator.
Definition: string.hpp:23
The top level of namespace of Metall.
Definition: basic_manager.hpp:22
uint32_t version_type
Variable type to handle a version data.
Definition: version.hpp:21
std::string to_version_string(const version_type version)
Converts a raw version number to a std::string with format 'MAJOR.MINOR.PATCH'.
Definition: version.hpp:42
#define METALL_VERSION
Metall version. Metall follows the Semantic Versioning 2.0.0.
Definition: version.hpp:17