summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-03-26 00:04:03 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-03-26 00:04:03 +0100
commit36dc6c23a0faa1441f616f4347992bdce9a33035 (patch)
tree815fc3d3d9c79170bdb1107bff02d3d560ec7ac7 /src
parentd02133d382dac3aa8460e9e03f28ba144acd8366 (diff)
add default zero construction to units
Diffstat (limited to 'src')
-rw-r--r--src/units.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/units.hh b/src/units.hh
index 568d8b12..8f749b9f 100644
--- a/src/units.hh
+++ b/src/units.hh
@@ -84,6 +84,7 @@ private:
struct LineCount : public StronglyTypedNumber<LineCount, int>
{
+ LineCount() : LineCount(0) {}
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>
{
+ ByteCount() : ByteCount(0) {}
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>
{
+ CharCount() : CharCount(0) {}
constexpr CharCount(int value) : StronglyTypedNumber<CharCount>(value) {}
};