Add any-type container to serialization streams

This commit is contained in:
Nikita Lisitsa 2023-05-29 16:38:28 +03:00
parent 1d35ed2abb
commit 1770a83bdc

View file

@ -1,6 +1,7 @@
#pragma once
#include <psemek/io/stream.hpp>
#include <psemek/util/any_set.hpp>
namespace psemek::sir
{
@ -58,9 +59,12 @@ namespace psemek::sir
std::size_t offset() const { return offset_; }
util::any_set & context() { return context_; }
private:
io::istream & s_;
std::size_t offset_ = 0;
util::any_set context_;
};
struct ostream
@ -81,9 +85,12 @@ namespace psemek::sir
std::size_t offset() const { return offset_; }
util::any_set & context() { return context_; }
private:
io::ostream & s_;
std::size_t offset_ = 0;
util::any_set context_;
};
struct null_istream