summaryrefslogtreecommitdiff
path: root/binparse/types.hpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-06-22 16:18:02 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-06-22 16:41:11 +0200
commit0f2d7c9ed9dfa3716840fc112bd53e5ec6b6315b (patch)
treea90760b1780d187028475bcb4080794f88ddc858 /binparse/types.hpp
parent22231518b9c2c0b7f73c72a6ca834df659c63c7f (diff)
downloadopenwar-0f2d7c9ed9dfa3716840fc112bd53e5ec6b6315b.tar.gz
openwar-0f2d7c9ed9dfa3716840fc112bd53e5ec6b6315b.tar.bz2
openwar-0f2d7c9ed9dfa3716840fc112bd53e5ec6b6315b.zip
adds a tree format printer for "binparse" types.
Diffstat (limited to 'binparse/types.hpp')
-rw-r--r--binparse/types.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/binparse/types.hpp b/binparse/types.hpp
index e92a7a6..9b6c4a6 100644
--- a/binparse/types.hpp
+++ b/binparse/types.hpp
@@ -17,4 +17,9 @@ BOOST_STRONG_TYPEDEF(uint16_t, Value16)
BOOST_STRONG_TYPEDEF(uint32_t, Offset32)
BOOST_STRONG_TYPEDEF(uint32_t, Value32)
+template <typename T>
+T operator+(T const lh, T const rh) {
+ return T(0 + lh + rh);
+}
+
} \ No newline at end of file