This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: STL problem
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: "Timothy J. Wood" <tjw at omnigroup dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 18 May 2002 00:00:47 +0200
- Subject: Re: STL problem
- Organization: CodeSourcery, LLC
- References: <F9A21799-69DF-11D6-BFA0-0003938E4E3C@omnigroup.com>
"Timothy J. Wood" <tjw@omnigroup.com> writes:
| The STL that is in the gcc repository has (I'm looking at Apple's gcc3
| project, but I assume this is the case in the real repository too since
| it isn't marked 'APPLE LOCAL') ...
|
| const charT* c_str () const
| { if (length () == 0) return ""; terminate (); return data (); }
Well, in FSF sources (GCC-3.1), the definition of
basic_string<>::c_str() reads
// String operations:
const _CharT*
c_str() const
{
// MT: This assumes concurrent writes are OK.
size_type __n = this->size();
traits_type::assign(_M_data()[__n], _Rep::_S_terminal);
return _M_data();
}
So, I think you're talking of something that is Apple source specific.
-- Gaby