Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-29 15:05:31


"E. Gladyshev" <egladysh_at_[hidden]> writes:

> --- Gregory Colvin <gregory.colvin_at_[hidden]> wrote:
>
>> The C++ standard requires that a copy of an allocator is equivalent
>> to the original.
>
>> Right. If your allocators can't be copied safely then you have a
>> problem. Peter's approach is one way to fix the problem. But I
>> don't see that shared_ptr has a problem.
>
> All I am trying to say is that shared_ptr doesn't specify
> any requirements on its Deleter parameter.

Not so:

       "Requirements: p must be convertible to T *. D must be
       CopyConstructible. The copy constructor and destructor of D
       must not throw. The expression d(p) must be well-formed, must
       not invoke undefined behavior, and must not throw exceptions."

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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