aboutsummaryrefslogtreecommitdiff
path: root/butl/standard-version.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-29 08:01:41 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-29 14:46:13 +0300
commit332c4e09b11b010a6ad50468230758d0874dbd60 (patch)
tree40b4b8a07269a1e4733f7c94242752c8c00a275d /butl/standard-version.ixx
parentdb275fa010229b26086f75f0dd533fdfce8751b4 (diff)
Add support for stub standard version
Diffstat (limited to 'butl/standard-version.ixx')
-rw-r--r--butl/standard-version.ixx32
1 files changed, 30 insertions, 2 deletions
diff --git a/butl/standard-version.ixx b/butl/standard-version.ixx
index a2de26c..c732c20 100644
--- a/butl/standard-version.ixx
+++ b/butl/standard-version.ixx
@@ -9,8 +9,8 @@ namespace butl
std::uint64_t v,
const std::string& s,
std::uint16_t r,
- bool allow_earliest)
- : standard_version (v, s, allow_earliest)
+ flags f)
+ : standard_version (v, s, f)
{
// Can't initialize above due to ctor delegating.
//
@@ -83,4 +83,32 @@ namespace butl
{
return version % 10000 == 1 && !snapshot ();
}
+
+ inline standard_version::flags
+ operator& (standard_version::flags x, standard_version::flags y)
+ {
+ return x &= y;
+ }
+
+ inline standard_version::flags
+ operator| (standard_version::flags x, standard_version::flags y)
+ {
+ return x |= y;
+ }
+
+ inline standard_version::flags
+ operator&= (standard_version::flags& x, standard_version::flags y)
+ {
+ return x = static_cast<standard_version::flags> (
+ static_cast<std::uint16_t> (x) &
+ static_cast<std::uint16_t> (y));
+ }
+
+ inline standard_version::flags
+ operator|= (standard_version::flags& x, standard_version::flags y)
+ {
+ return x = static_cast<standard_version::flags> (
+ static_cast<std::uint16_t> (x) |
+ static_cast<std::uint16_t> (y));
+ }
}