summaryrefslogtreecommitdiffhomepage
path: root/serialize/binary-reader.inl
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-17 07:13:04 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-17 23:23:12 +0100
commitafac35cf60142266a3b1227284313e5e64f2bd45 (patch)
treef64ac0fd43cc330d15ce8062d9969c734a4275a5 /serialize/binary-reader.inl
parentd0efe8b98e2941028304d3f419197002e4ad2811 (diff)
serialize/reader: add peek function
Diffstat (limited to 'serialize/binary-reader.inl')
-rw-r--r--serialize/binary-reader.inl7
1 files changed, 7 insertions, 0 deletions
diff --git a/serialize/binary-reader.inl b/serialize/binary-reader.inl
index 4d52490f..73be97d9 100644
--- a/serialize/binary-reader.inl
+++ b/serialize/binary-reader.inl
@@ -87,4 +87,11 @@ constexpr auto binary_reader<It>::read_asciiz_string() noexcept(false)
fm_throw("can't find string terminator"_cf);
}
+template<string_input_iterator It>
+constexpr char binary_reader<It>::peek() const
+{
+ fm_soft_assert(it != end);
+ return *it;
+}
+
} // namespace floormat::Serialize