Re: Dynamically choosing what to "new"
On Jun 12, 1:29 am, "JohnQ" <johnqREMOVETHISprogram...@yahoo.com>
wrote:
"Gianni Mariani" <gi3nos...@mariani.ws> wrote in message
news:466d1096$0$22407$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
JohnQ wrote:
"Gianni Mariani" <gi3nos...@mariani.ws> wrote in message
news:466ca01f$0$22432$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
JohnQ wrote:
...
Note that "copy-on-write" _is_ an optimization.
Yah - but it's an optimization made by the compiler not be me.
No, no, it's coded into the string class (user-level stuff).
I lumped the STL as part of the "compiler" in the statement above.
I know, that's why I posted: it's incorrect.
In what sense? As far as the standard is concerned, the
standard library is part of the language. You get it with the
compiler, and use it as if it were part of the compiler. The
compiler is aware of certain parts of it, at least (e.g.
type_info, or operator new()). Most implementations do allow
replacing a significant part, at least if it is done as a block,
but that's an extension, and you normally think of the standard
library (plus a number of system libraries, such as the Posix
interface) as being part of the "implementation", in other
words, the compiler. You don't worry about how
std::basic_string is implemented, you just use it.
--
James Kanze (GABI Software, from CAI) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34