Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2008-08-09 04:41:32


On Aug 5, 2008, at 2:22 AM, Phil Bouchard wrote:

[SNIP]
> Right now shifted_ptr_test2.cpp works perfectly fine with the slightly
> adapted STL container to smart pointers and using special
> allocators needed
> to define all internal characteristics used by the container. We
> see in
> shifted_allocator:
>
> template <typename T>
> class shifted_allocator
> {
> public:
> typedef shifted<T> value_type;
> typedef shifted_ptr<T> pointer;
> typedef const shifted_ptr<T> const_pointer;
> ...
> };
>
> - value_type: being the real concrete type expected by the smart
> pointer
> - pointer: defines the node pointer used internaly by the container
[TRUNCATE]

Isn't "const_pointer" supposed to be an analogue of "T const *"?
Right now, you have it represent "T * const", which definitely isn't
the same thing!

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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