Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2003-11-24 22:35:47

"Larry Evans" <cppljevans_at_[hidden]> wrote in message
> [...]
> So, the return value should be P* not a P.
> In addition, get_impl(rhs), which is storage_policy::get_impl(rhs),
> returns a P* instead of the (P const&) which is declared as the
> argument to clone.
> Please let me know if I'm wrong.

Well, it's a little tricky here. In the policies, 'P' means 'pointer
type'. We really should have put a typedef in there to make it
explicit, but if you read the book, you would have known that,
and I only made changes that I had to. ;> You could argue
that if P means 'pointer type', then it should really be spelled
T*, but then, that would force the pointer type to be a real
pointer type (rather than, say, a nested smart pointer or some
other gizmo). Unfortunately, the policy adaptor makes it almost
impossible to see that P is getting passed
stored_type::pointer_type, but that is indeed the case.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.538 / Virus Database: 333 - Release Date: 11/10/2003

Boost list run by bdawes at, gregod at, cpdaniel at, john at