From 1f3514eaa1ab511b2db60a491438b29f6b558adb Mon Sep 17 00:00:00 2001 From: Stefan Eilemann Date: Thu, 8 Dec 2022 13:48:10 +0100 Subject: [PATCH] Compile fixes on latest Debian --- servus/uint128_t.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/servus/uint128_t.h b/servus/uint128_t.h index 8322923..71523b4 100644 --- a/servus/uint128_t.h +++ b/servus/uint128_t.h @@ -22,6 +22,7 @@ #define SERVUS_UINT128_H #include +#include #include #include @@ -45,14 +46,15 @@ std::ostream& operator<<(std::ostream& os, const uint128_t& id); * * Example: @include tests/uint128_t.cpp */ -class uint128_t +class uint128_t : public Serializable { public: /** * Construct a new 128 bit integer with a default value. */ explicit uint128_t(const unsigned long long low_ = 0) - : _high(0) + : Serializable() + , _high(0) , _low(low_) { } @@ -61,7 +63,8 @@ class uint128_t * Construct a new 128 bit integer with a default value. */ explicit uint128_t(const unsigned long low_) - : _high(0) + : Serializable() + , _high(0) , _low(low_) { } @@ -70,7 +73,8 @@ class uint128_t * Construct a new 128 bit integer with a default value. */ explicit uint128_t(const int low_) - : _high(0) + : Serializable() + , _high(0) , _low(low_) { } @@ -79,7 +83,8 @@ class uint128_t * Construct a new 128 bit integer with default values. */ uint128_t(const servus::uint128_t& rhs) - : _high(rhs._high) + : Serializable() + , _high(rhs._high) , _low(rhs._low) { } @@ -283,6 +288,8 @@ class uint128_t ar& high(); } + virtual std::string getTypeName() const { return "servus::uint128_t"; } + private: uint64_t _high; uint64_t _low; @@ -376,7 +383,7 @@ inline uint128_t make_uint128(const std::string& string) * identifier. */ SERVUS_API uint128_t make_UUID(); -} +} // namespace servus namespace std { @@ -396,6 +403,6 @@ inline string to_string(const servus::uint128_t& value) { return value.getString(); } -} +} // namespace std #endif // SERVUS_UINT128_H