From 03da7399a08553e349034bde8b276e7ae1146498 Mon Sep 17 00:00:00 2001 From: Calle Wilund Date: Wed, 29 Apr 2015 10:13:46 +0200 Subject: [PATCH] sstring: add iostream input (>>) Signed-off-by: Calle Wilund --- core/sstring.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/sstring.hh b/core/sstring.hh index 98f27e3b3cb9..c50006ab7d1a 100644 --- a/core/sstring.hh +++ b/core/sstring.hh @@ -513,6 +513,17 @@ operator<<(std::basic_ostream& os, return os.write(s.begin(), s.size()); } +template +inline +std::basic_istream& +operator>>(std::basic_istream& is, + basic_sstring& s) { + std::string tmp; + is >> tmp; + s = tmp; + return is; +} + namespace std { template