Boost logo

Boost :

From: Phil Nash (phil.nash.lists_at_[hidden])
Date: 2003-02-20 15:31:12


> > Hmmm, unless you are thinking of null pointers I can't think of any
pointers
> > that don't refer to resources. Perhaps we have a different definition of
> > resource?
> > Could you elaborate?
>
> I think of resources as things which can be separately managed
> independent of other objects. Here are some examples of non-resource
> pointers:
>
> void f()
> {
> int x;
> int* p1 = x; // arguable
> std::pair<int,int> y;
> int* p2 = x.first;
                      ^
I presume you meant y here and not x.

> std::pair<int,int>* y2 = new std::pair<int,int>;
> int* p3 = y2.first;
> }

Yes, that is similar to the point that Allan has made too - and I am
inclined to agree now.
However, it doesn't change the original argument.

Regards,

[)o
IhIL..


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk