From: Gregory Colvin (gregory.colvin_at_[hidden])
Date: 2003-09-02 11:06:24
On Tuesday, Sep 2, 2003, at 09:22 America/Denver, David Abrahams wrote:
> Gregory Colvin <gregory.colvin_at_[hidden]> writes:
>>> I think part of my point was that *nobody* needs what they offer, if
>>> you include construct/destroy.
>> Or rather that some implementations have failed to use what they
>> offer, and our standard unfortunately doesn't insist that they do.
> It's not unfortunate if it adds nothing, which is what I believe.
>> Another reason construct is needed is that Allocator::pointer might
>> be a proxy, with operator* and operator-> but not necessarily a
>> conversion to void* or even T*.
> Doesn't matter; you can always get the address of an object. See
So you would rather use this than use construct?
template <typename T> T* addressof(T& v)
&const_cast<char&>(reinterpret_cast<const volatile char
>>> In fact, construct requires undefined behavior for non-POD T
>>> because you can't copy its T* argument which points into raw
>> I don't understand what you mean by this. Are you claiming that
>> it is undefined to copy just a pointer to raw storage?
> Unless the pointer has the right type, yes.
In which case the A::pointer return from A::allocate() is already
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk