Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tools/Versions.hpp
diff options
context:
space:
mode:
authorLeitwolf2026-11-15 13:53:40 +0300
committerGitHub2026-11-15 13:53:40 +0300
commit9ea8d3a88334d62711f3e9aa429c7fe4905f2ef0 (patch)
tree7a4c0aa03d636bea6a359cd6fe9501bb5c8db28e /tools/Versions.hpp
parent13ecce487c3075e4ccc2f62b9c08597459d1a268 (diff)
parent8979c1caf2eee321cf497671805d2177980c421e (diff)
downloadcatch3-docs/no-former-language.tar.gz
Merge branch 'devel' into docs/no-former-languagedocs/no-former-language
Diffstat (limited to 'tools/Versions.hpp')
-rw-r--r--tools/Versions.hpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/Versions.hpp b/tools/Versions.hpp
index 3a601a50..a1fdf4a6 100644
--- a/tools/Versions.hpp
+++ b/tools/Versions.hpp
@@ -12,19 +12,22 @@
namespace Progmasoft::Catch3::Tools
{
- /// A.B.C.D. A version of three numbers has D = 0.
- using Version = std::array<unsigned, 4>;
+ /// MAJOR.MINOR.PATCH, as Semantic Versioning numbers a release.
+ using Version = std::array<unsigned, 3>;
+ /// A version of exactly three numbers, none with a leading zero.
[[nodiscard]] std::optional<Version>
ParseVersion(std::string_view text);
[[nodiscard]] std::string
FormatVersion(const Version &version);
- /// The version after `version`, which counts releases: D up to 9, then C
- /// up to 9, then B up to 19, then A.
- [[nodiscard]] Version
- NextVersion(Version version);
+ /// The next patch release after `current`. `current` may also be one of
+ /// the four-number versions Catch3 had before Semantic Versioning: the
+ /// fourth number is dropped and the patch goes up, so 0.3.0.2 is followed
+ /// by 0.3.1.
+ [[nodiscard]] std::optional<Version>
+ NextPatch(std::string_view current);
/// A place that states the version: the file, and the text around it.
struct VersionSite final