aboutsummaryrefslogtreecommitdiff
path: root/butl/standard-version.ixx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-29 17:39:33 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-29 17:39:33 +0300
commite23a88afad10600ffcafb359b43c31e20791dcf9 (patch)
tree29955f3a6c3483549030b093860c1a73106fbbd3 /butl/standard-version.ixx
parent332c4e09b11b010a6ad50468230758d0874dbd60 (diff)
Fix standard version stub to differ from empty version
Diffstat (limited to 'butl/standard-version.ixx')
-rw-r--r--butl/standard-version.ixx20
1 files changed, 3 insertions, 17 deletions
diff --git a/butl/standard-version.ixx b/butl/standard-version.ixx
index c732c20..6908ed5 100644
--- a/butl/standard-version.ixx
+++ b/butl/standard-version.ixx
@@ -4,20 +4,6 @@
namespace butl
{
- inline standard_version::
- standard_version ( std::uint16_t e,
- std::uint64_t v,
- const std::string& s,
- std::uint16_t r,
- flags f)
- : standard_version (v, s, f)
- {
- // Can't initialize above due to ctor delegating.
- //
- epoch = e;
- revision = r;
- }
-
inline std::uint16_t standard_version::
major () const noexcept
{
@@ -68,20 +54,20 @@ namespace butl
alpha () const noexcept
{
std::uint64_t abe (version % 10000);
- return abe > 0 && abe < 5000;
+ return abe > 0 && abe < 5000 && !stub ();
}
inline bool standard_version::
beta () const noexcept
{
std::uint64_t abe (version % 10000);
- return abe > 5000;
+ return abe > 5000 && !stub ();
}
inline bool standard_version::
earliest () const noexcept
{
- return version % 10000 == 1 && !snapshot ();
+ return version % 10000 == 1 && !snapshot () && !stub ();
}
inline standard_version::flags