I am trying to modify a stringbuffer of a stringstream object without having to copy a string, using the method pubsetbuf, but it is not working. I am following the document
Not should set contents. pubsetbuf
calls virtual setbuf
basic_streambuf<charT,traits>* setbuf(charT* s, streamsize n);
15 Effects: implementation-defined, except that setbuf(0,0) has no effect.
16 Returns: this.
VS 2010. There is no overload of virtual method setbuf
in basic_stringbuf
, it uses default from basic_streambuf
virtual _Myt *__CLR_OR_THIS_CALL setbuf(_Elem *, streamsize)
{ // offer buffer to external agent (do nothing)
return (this);
}