aboutsummaryrefslogtreecommitdiff
path: root/butl/standard-version.ixx
diff options
context:
space:
mode:
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));
+ }
}