From 40435a6da8392c86fd120ec6b4fbda0bd1c89ab3 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Tue, 4 Aug 2015 20:19:45 +0200 Subject: Implement stream_reader --- include/io/stream_reader.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/io/stream_reader.h b/include/io/stream_reader.h index ab07f83ad9..5d10e021ed 100644 --- a/include/io/stream_reader.h +++ b/include/io/stream_reader.h @@ -65,8 +65,7 @@ public: /** * @brief Reads a binary number from the stream - * - * Does not check if the reading actually succeeds + * @throw input_error on failure */ template void read_num(T& x); @@ -85,6 +84,12 @@ private: const endian::endian endian; }; +template +void stream_reader::read_num(T& x) +{ + endian::read(is, x, endian); +} + } } -- cgit 0.0.5-2-1-g0f52