Skip to content

Commit

Permalink
Compile fixes on latest Debian
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Eilemann committed Dec 8, 2022
1 parent 53bf825 commit 1f3514e
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions servus/uint128_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define SERVUS_UINT128_H

#include <servus/api.h>
#include <servus/serializable.h>
#include <servus/types.h>

#include <sstream>
Expand All @@ -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_)
{
}
Expand All @@ -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_)
{
}
Expand All @@ -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_)
{
}
Expand All @@ -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)
{
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -376,7 +383,7 @@ inline uint128_t make_uint128(const std::string& string)
* identifier.
*/
SERVUS_API uint128_t make_UUID();
}
} // namespace servus

namespace std
{
Expand All @@ -396,6 +403,6 @@ inline string to_string(const servus::uint128_t& value)
{
return value.getString();
}
}
} // namespace std

#endif // SERVUS_UINT128_H

0 comments on commit 1f3514e

Please sign in to comment.