Boost logo

Boost :

From: Phil Nash (phil.nash.lists_at_[hidden])
Date: 2003-02-20 14:39:36

> >Hmmm, unless you are thinking of null pointers I can't think of any
> >that don't refer to resources. Perhaps we have a different definition of
> >resource?
> Or of 'refer to resources'?
> char * ptr = new char [12]; // points to (ergo, refers to) resource
> char * ptr2 = ptr+4 ; // points _into_ resource

Hmmm... it could be argued that each char in the block pointed to by ptr is
an individual resource, with a common manager on the heap.
However, that may be stretching it a bit and I am prepared to accept your
example as demonstrating that (especially within the context of RAII) not
all (non-null) pointers refer to resources.

That said I don't see that it affects my original argument (just the wording
AFAICS it still stands that "smart pointer" is an incorrect and even
misleading (certainly confusing) term when applied to something that doesn't
have pointer semantics.



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