Stefan Teleman <[EMAIL PROTECTED]> wrote:

> On Friday 20 April 2007 11:19, Joerg Schilling wrote:
>
> > In the Solaris STL lib, std::string.clear() and std::string.erase()
> > do the same: delete on the allocated space.
> >
> > In the GCC STL lib, std::string.clear() only resets pointers and
> > keeps the allocated memory while std::string.erase() deletes the
> > allocated space.
> >
> > People wo develop with GCC rely on this fact and having two
> > different STL libs could be a bit difficult.....
>
> Could you please explain what you mean by "People who develop with GCC 
> rely on this fact" and could you please also clarify which particular 
> instance of std::basic_string::erase() you are referring to, since 
> there are 3 of them, and each one of them does different things.

I did not have the problem myself but I had to debug an application that 
did become extremely slow with Sun Studio because it did force a lot of
malloc()/free() sequences.


Anyway, GCC does use different include files for stl than Sun Studio uses
and it is more than just creating a possibility to have compatible libs
in theory.

Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to