This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: std_sstream.h - patch
>>>>> Benjamin Kosnik <bkoz@cygnus.com> writes:
>> The attached patch contains two optimizations for basic_stringbuf<>:
>>
>> 1. In the default constructor I changed _M_str(__string_type()) to
>> _M_str().
>>
>> 2. In setbuf I changed the return value type and I removed the
>> temporary __string_type object. Now if the new buffer length is smaller
>> than the old one no reallocation is necessary.
> I checked this in, thanks. I saved the dynamic_cast: it does not harm the
> generated code, is legal c++, and clarifies that a conversion from derived
> to base is happening.
I would think that should be a static_cast, then.
Jason