summaryrefslogtreecommitdiff
path: root/lib/helpers.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-08-10 18:14:30 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-08-10 18:14:30 +0100
commitee2e68f44f7b9ee099f98b668257b5d57a86a695 (patch)
treed7593729cdb2dcad097c7a801f0c39c8d59381c0 /lib/helpers.cpp
parentTests, fixes, improvements to WritePqCopyStream (diff)
downloadmygrate-ee2e68f44f7b9ee099f98b668257b5d57a86a695.tar.bz2
mygrate-ee2e68f44f7b9ee099f98b668257b5d57a86a695.tar.xz
mygrate-ee2e68f44f7b9ee099f98b668257b5d57a86a695.zip
Enable numeric conversion warning and fix the fallout
Diffstat (limited to 'lib/helpers.cpp')
-rw-r--r--lib/helpers.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/helpers.cpp b/lib/helpers.cpp
new file mode 100644
index 0000000..23cec2a
--- /dev/null
+++ b/lib/helpers.cpp
@@ -0,0 +1,11 @@
+#include "helpers.h"
+
+namespace MyGrate {
+ static_assert(std::is_same_v<SmallestUInt<1>, uint8_t>);
+ static_assert(std::is_same_v<SmallestUInt<8>, uint8_t>);
+ static_assert(std::is_same_v<SmallestUInt<9>, uint16_t>);
+ static_assert(std::is_same_v<SmallestUInt<16>, uint16_t>);
+ static_assert(std::is_same_v<SmallestUInt<17>, uint32_t>);
+ static_assert(std::is_same_v<SmallestUInt<32>, uint32_t>);
+ static_assert(std::is_same_v<SmallestUInt<33>, uint64_t>);
+}