From ee720ed3bcc18fad43127d27e9d57781ecc91393 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 12 Nov 2018 13:47:44 +0100 Subject: prototest: json serialization --- src/os/object/outputstream.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/os') diff --git a/src/os/object/outputstream.cc b/src/os/object/outputstream.cc index 1ce260e..4359874 100644 --- a/src/os/object/outputstream.cc +++ b/src/os/object/outputstream.cc @@ -140,6 +140,16 @@ OutputStream & OutputStream::operator<<(OutputStream & (*fkt) (OutputStream &)) return fkt(*this); } +#ifdef WITH_OSTREAM +OutputStream & OutputStream::operator<<(std::string s) +{ + for (auto c : s) { + put(c); + } + return *this; +} +#endif + void OutputStream::setBase(uint8_t b) { if (b == 2 || b == 8 || b == 10 || b == 16) { -- cgit v1.2.3