diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-01 16:33:18 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-01 16:33:18 +0100 |
commit | daa16769f087b60cc67517171d942db967b2949e (patch) | |
tree | 1a5f6bce4b6a569e00ea44ac6e56c04c4e422b26 /serialize/binary-reader.inl | |
parent | 5d3cf6f42e991af7de220a1f2b6b530e8f06cc31 (diff) |
serialize: add binary_reader::operator<<
Diffstat (limited to 'serialize/binary-reader.inl')
-rw-r--r-- | serialize/binary-reader.inl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/serialize/binary-reader.inl b/serialize/binary-reader.inl index 2230dff6..bb1f8cf7 100644 --- a/serialize/binary-reader.inl +++ b/serialize/binary-reader.inl @@ -55,6 +55,12 @@ binary_reader<It>& operator>>(binary_reader<It>& reader, T& x) noexcept return reader; } +template<string_input_iterator It, serializable T> +void operator<<(T& x, binary_reader<It>& reader) noexcept +{ + x = reader.template read<T>(); +} + template<string_input_iterator It> template<std::size_t MAX> constexpr auto binary_reader<It>::read_asciiz_string() noexcept |