That sounds like a much better way to manage the object
creation.
Nice!
/kristofer
Thanks for this bug report and patch! I believe this will affect the
ABI, so I'm waiting for Warren's comments.
I think a better way to handle this would be to use the protected
init() member. Regular streams like fstream and stringstream need to
behave the same way as our Query, since they need to controll their
own buf objects.
For example, they do (from g++ headers):
basic_ifstream()
: __istream_type(NULL), _M_filebuf()
{ this->init(&_M_filebuf); }
This would prevent a change in the ABI.