TITLE: terminology clarification for placement new (Source: comp.lang.c++.moderated, 21 Dec 2000) SUTTER: "Herb Sutter" Hmm. In writing my March column, I think I've just realized that both Matt and I were wrong when we repeated the following oft-repeated folklore: >> It's also worth pointing out again that "placement new" is an >> unfortunately misleading term. The term is used to refer to any new >> taking additional parameters. It just so happens that the first (and >> only standardized) use of this facility happens to be a "place it >> _there_ and don't actually bother allocating anything" operation which >> can naturally be described as "placement" -- most other uses of this >> facility wouldn't as naturally be described as "placement." AUSTERN: Matthew Austern >Almost true. Placement was indeed the first use for "placement new", >but it's not the only standardized use. The other use in the standard >library is nothrow new. SUTTER: I've just realized two things: 1. Matt and I were both wrong to say that the standard uses the term loosely; it doesn't. In 18.4.1.3, the standard is clear that only the "put-it-there" version is called "placement," and these "placement" versions are further distinguished from all other forms in that they may not be replaced by users. OTOH, the other forms, including nothrow new, are just overloads described in the main section, and all can be replaced by the user as long as the semantics are preserved. 2. Unfortunately, as a community I do think we have traditionally used the term more loosely. Somewhere we've accumulated an urban legend (which I believed) that "placement new" means any overloaded new taking additional parameters. I've seen this looser usage on newsgroups and, I think, within the committee itself, so it could be viewed as part of the C++ community's "language." Given this state of affairs, I'm (slightly) undecided whether to best write this up by ignoring the standard and documenting the colloquial status quo: Option A paraphrase: "in addition to true placement, 'placement new' has also commonly come to mean any overloaded new taking additional parameters, so that's the way I'm going to use the term" or by bucking the colloquial status quo and asserting the standard (and also promoting more precise and correct terminology): Option B paraphrase: "although a lot of people use 'placement new' to mean any overloaded new taking additional parameters, the standard is much stricter and more precise -- the only 'placement new' is the one that truly places an object in an existing location without performing an actual allocation, so that's the way I'm going to use the term; the other forms of new are simply extended overloads" Since this affects our shared terminology and may buck tradition, a Question: Does the committee/community have a strong preference for which form I should publish? I'm leaning toward Option B because it avoids some confusion (already exemplified in this thread), conforms to the standard, and makes the term "placement" more precise and consistent with the spirit of its original and intuitive meaning. _______________________________________________ cpptips mailing list http://cpptips.hyperformix.com