Re: [Stlport-devel] string, operator [] const
Brought to you by:
complement
From: Petr O. <pt...@is...> - 2006-02-12 09:43:10
|
On Saturday 11 February 2006 00:08, François Dumont wrote: > Petr, could you explain why you roll back this code ? > > As I told you there is no reallocation in c_str so the issue you are > describing below cannot occur. > > In addition to being more complicated, the current implementation is > returning a const reference to a temporary data which is bad, Borland > complains about it. François, See here: I recheck string implementation and found that in all cases allocated at least n + 1 bytes (n == string length). So (default!) mode !_STLP_FORCE_STRING_TERMINATION lost any sense. - Petr |