Skip to content

Commit 1f3514e

Browse files
author
Stefan Eilemann
committed
Compile fixes on latest Debian
1 parent 53bf825 commit 1f3514e

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

servus/uint128_t.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#define SERVUS_UINT128_H
2323

2424
#include <servus/api.h>
25+
#include <servus/serializable.h>
2526
#include <servus/types.h>
2627

2728
#include <sstream>
@@ -45,14 +46,15 @@ std::ostream& operator<<(std::ostream& os, const uint128_t& id);
4546
*
4647
* Example: @include tests/uint128_t.cpp
4748
*/
48-
class uint128_t
49+
class uint128_t : public Serializable
4950
{
5051
public:
5152
/**
5253
* Construct a new 128 bit integer with a default value.
5354
*/
5455
explicit uint128_t(const unsigned long long low_ = 0)
55-
: _high(0)
56+
: Serializable()
57+
, _high(0)
5658
, _low(low_)
5759
{
5860
}
@@ -61,7 +63,8 @@ class uint128_t
6163
* Construct a new 128 bit integer with a default value.
6264
*/
6365
explicit uint128_t(const unsigned long low_)
64-
: _high(0)
66+
: Serializable()
67+
, _high(0)
6568
, _low(low_)
6669
{
6770
}
@@ -70,7 +73,8 @@ class uint128_t
7073
* Construct a new 128 bit integer with a default value.
7174
*/
7275
explicit uint128_t(const int low_)
73-
: _high(0)
76+
: Serializable()
77+
, _high(0)
7478
, _low(low_)
7579
{
7680
}
@@ -79,7 +83,8 @@ class uint128_t
7983
* Construct a new 128 bit integer with default values.
8084
*/
8185
uint128_t(const servus::uint128_t& rhs)
82-
: _high(rhs._high)
86+
: Serializable()
87+
, _high(rhs._high)
8388
, _low(rhs._low)
8489
{
8590
}
@@ -283,6 +288,8 @@ class uint128_t
283288
ar& high();
284289
}
285290

291+
virtual std::string getTypeName() const { return "servus::uint128_t"; }
292+
286293
private:
287294
uint64_t _high;
288295
uint64_t _low;
@@ -376,7 +383,7 @@ inline uint128_t make_uint128(const std::string& string)
376383
* identifier.
377384
*/
378385
SERVUS_API uint128_t make_UUID();
379-
}
386+
} // namespace servus
380387

381388
namespace std
382389
{
@@ -396,6 +403,6 @@ inline string to_string(const servus::uint128_t& value)
396403
{
397404
return value.getString();
398405
}
399-
}
406+
} // namespace std
400407

401408
#endif // SERVUS_UINT128_H

0 commit comments

Comments
 (0)