add default zero construction to units
This commit is contained in:
parent
d02133d382
commit
36dc6c23a0
|
@ -84,6 +84,7 @@ private:
|
||||||
|
|
||||||
struct LineCount : public StronglyTypedNumber<LineCount, int>
|
struct LineCount : public StronglyTypedNumber<LineCount, int>
|
||||||
{
|
{
|
||||||
|
LineCount() : LineCount(0) {}
|
||||||
constexpr LineCount(int value) : StronglyTypedNumber<LineCount>(value) {}
|
constexpr LineCount(int value) : StronglyTypedNumber<LineCount>(value) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,6 +95,7 @@ inline constexpr LineCount operator"" _line(unsigned long long int value)
|
||||||
|
|
||||||
struct ByteCount : public StronglyTypedNumber<ByteCount, int>
|
struct ByteCount : public StronglyTypedNumber<ByteCount, int>
|
||||||
{
|
{
|
||||||
|
ByteCount() : ByteCount(0) {}
|
||||||
constexpr ByteCount(int value) : StronglyTypedNumber<ByteCount>(value) {}
|
constexpr ByteCount(int value) : StronglyTypedNumber<ByteCount>(value) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,6 +106,7 @@ inline constexpr ByteCount operator"" _byte(unsigned long long int value)
|
||||||
|
|
||||||
struct CharCount : public StronglyTypedNumber<CharCount, int>
|
struct CharCount : public StronglyTypedNumber<CharCount, int>
|
||||||
{
|
{
|
||||||
|
CharCount() : CharCount(0) {}
|
||||||
constexpr CharCount(int value) : StronglyTypedNumber<CharCount>(value) {}
|
constexpr CharCount(int value) : StronglyTypedNumber<CharCount>(value) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user