File indexing completed on 2026-09-13 08:39:18
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011
0012
0013
0014
0015
0016 #include <iosfwd>
0017 #include <optional>
0018 #include <string_view>
0019
0020 namespace Acts {
0021
0022
0023
0024 constexpr unsigned int VersionMajor = 46u;
0025 constexpr unsigned int VersionMinor = 8u;
0026 constexpr unsigned int VersionPatch = 1u;
0027
0028 constexpr unsigned int Version =
0029 10000u * VersionMajor + 100u * VersionMinor + VersionPatch;
0030 constexpr std::optional<std::string_view> CommitHash = "3ded307e142c6ce9e6c1fa205604582ff6aef920-dirty";
0031 constexpr std::optional<std::string_view> CommitHashShort = "3ded307-dirty";
0032
0033 struct VersionInfo {
0034 unsigned int versionMajor;
0035 unsigned int versionMinor;
0036 unsigned int versionPatch;
0037 std::optional<std::string_view> commitHash;
0038
0039 VersionInfo() = delete;
0040
0041 static VersionInfo fromHeader() {
0042 return VersionInfo(VersionMajor, VersionMinor, VersionPatch, CommitHash);
0043 }
0044
0045 static VersionInfo fromLibrary();
0046
0047 VersionInfo withoutCommit() const;
0048
0049 bool operator==(const VersionInfo& other) const;
0050
0051 friend std::ostream& operator<<(std::ostream& os, const VersionInfo& vi);
0052
0053 private:
0054 VersionInfo(unsigned int majorIn, unsigned int minorIn, unsigned int patchIn,
0055 std::optional<std::string_view> commitHashIn);
0056 };
0057
0058 }