+
+/// because we need to pass ods_ to the base class
+struct otexstringstream_helper { odocstringstream ods_; };
+
+/// otexstringstream : a odocstringstream with tex/row correspondence
+class otexstringstream : otexstringstream_helper, public otexstream {
+public:
+ otexstringstream() : otexstringstream_helper(), otexstream(ods_) {}
+ ///
+ docstring str() const { return ods_.str(); }
+ ///
+ size_t length();
+ ///
+ bool empty() { return 0 == length(); }
+ /// move-returns the contents and reset the texstream
+ TexString release();
+};
+
+