Re: [Libxmlplusplus-general] const std::string& return types.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Lundi 9 Décembre 2002 21:51, Murray Cumming wrote:
> Here's another reason to use e.g.
> std::string get_content() const;
> instead of
> const std::string& content() const;
>
>
> It makes it difficult to change the API's implementation. For instance,
> you can't return a local "".

I was about to accept this suggestion (really).
Let's say we change all just after the bugfix release.

BTW I had the confirmation that gcc 3.x implements the COW in the std::string 
type.


Cheers,

Christophe

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE99Ql1B+sU3TyOQjARAsL1AKDTA00fI1QsHaIwDObOoKM1MIybQgCfRrNW
Y9dLLMLDCtgQUGu8bs2pxqQ=
=WSzV
-----END PGP SIGNATURE-----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]