This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: STL problem


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]