aboutsummaryrefslogtreecommitdiff
path: root/build2/utility
diff options
context:
space:
mode:
Diffstat (limited to 'build2/utility')
-rw-r--r--build2/utility28
1 files changed, 26 insertions, 2 deletions
diff --git a/build2/utility b/build2/utility
index 5240e4d..9245d86 100644
--- a/build2/utility
+++ b/build2/utility
@@ -24,8 +24,32 @@ namespace build2
extern const dir_path empty_dir_path;
// Parse version string in the X.Y.Z[-{a|b}N] to a version integer in the
- // AABBCCDD form as describe in <build2/version>. Throw invalid_argument
- // if the passed string is not a valid version.
+ // AABBCCDD form, where:
+ //
+ // AA - major version number
+ // BB - minor version number
+ // CC - bugfix version number
+ // DD - alpha / beta (DD + 50) version number
+ //
+ // When DD is not 00, 1 is subtracted from AABBCC. For example:
+ //
+ // Version AABBCCDD
+ // 2.0.0 02000000
+ // 2.1.0 02010000
+ // 2.1.1 02010100
+ // 2.2.0-a1 02019901
+ // 3.0.0-b2 02999952
+ //
+ // For a version in the 1.2.3- form, it returns (AABBCC-1)01, which is the
+ // lowest possible version in the 1.2.3 release set. For example:
+ //
+ // Version AABBCCDD
+ // 2.2.0- 02019901
+ // 1.2.3- 01020201
+ //
+ // In fact versions 1.2.3- and 1.2.3-a1 are equivalent.
+ //
+ // Throw invalid_argument if the passed string is not a valid version.
//
unsigned int
to_version (const string&);