Right,
Please excuse me for a) not including patch directly into mail b) not
waiting for the message from the list to reply to, and posting new
message instead.
Here is the patch:
Index: sqlstream.cpp
===================================================================
--- sqlstream.cpp (revision 2698)
+++ sqlstream.cpp (working copy)
@@ -33,17 +33,17 @@
namespace mysqlpp {
SQLStream::SQLStream(Connection* c, const char* pstr) :
-std::ostringstream(),
+ostream_(std::ostringstream()),
conn_(c)
{
if (pstr != 0) {
- str(pstr);
+ ostream_.str(pstr);
}
}
SQLStream::SQLStream(const SQLStream& s) :
-std::ostringstream(s.str()),
+ostream_(s.ostream_.str()),
conn_(s.conn_)
{
}
@@ -85,7 +85,7 @@
SQLStream::operator=(const SQLStream& rhs)
{
conn_ = rhs.conn_;
- str(rhs.str());
+ ostream_.str(rhs.ostream_.str());
return *this;
}
Index: sqlstream.h
===================================================================
--- sqlstream.h (revision 2698)
+++ sqlstream.h (working copy)
@@ -42,10 +42,10 @@
///
/// See the user manual for more details about these options.
-class MYSQLPP_EXPORT SQLStream :
-public std::ostringstream
+class MYSQLPP_EXPORT SQLStream
{
public:
+ std::ostringstream ostream_;
/// \brief Create a new stream object attached to a connection.
///
/// \param c connection used for escaping text
@@ -111,7 +111,7 @@
/// This is just syntactic sugar for SQLStream::str(void)
inline std::ostream& operator <<(std::ostream& os, SQLStream& s)
{
- return os << s.str();
+ return os << s.ostream_.str();
}