9 #include "Acts/ActsVersion.hpp"
12 #include <string_view>
16 VersionInfo::VersionInfo(
unsigned int majorIn,
unsigned int minorIn,
17 unsigned int patchIn,
const char*
const commitHashIn)
18 : versionMajor(majorIn),
19 versionMinor(minorIn),
20 versionPatch(patchIn),
21 commitHash(commitHashIn) {}
23 VersionInfo VersionInfo::fromLibrary() {
26 return VersionInfo{VersionMajor, VersionMinor, VersionPatch, CommitHash};
30 return versionMajor == other.versionMajor &&
31 versionMinor == other.versionMinor &&
32 versionPatch == other.versionPatch &&
33 std::string_view{commitHash} == std::string_view{other.commitHash};
36 std::ostream&
operator<<(std::ostream&
os,
const VersionInfo& vi) {
37 os << vi.versionMajor <<
"." << vi.versionMinor <<
"." << vi.versionPatch
38 <<
" (commit " << vi.commitHash <<
")";