summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/OutputUtil.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/OutputUtil.h')
-rw-r--r--cpp/src/Slice/OutputUtil.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/Slice/OutputUtil.h b/cpp/src/Slice/OutputUtil.h
index c88b469eb14..8811af826d5 100644
--- a/cpp/src/Slice/OutputUtil.h
+++ b/cpp/src/Slice/OutputUtil.h
@@ -75,6 +75,15 @@ Output& operator<<(Output& out, const T& val)
return out;
}
+template<typename T>
+Output& operator<<(Output& out, T val)
+{
+ std::ostringstream s;
+ s << val;
+ out.print(s.str().c_str());
+ return out;
+}
+
ICE_API Output& operator<<(Output&, const NextLine&);
ICE_API Output& operator<<(Output&, const StartBlock&);
ICE_API Output& operator<<(Output&, const EndBlock&);