Boost logo

Boost :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-05-16 18:22:06


Hi,

Both implementation of futures used at least two call to new, one for T and
one for the common class between the future and the promise.
Le me kno if I have missed something, do we really need the shared_ptr<T>?
can't we use the future_object/future_impl class to store directly T.

On the Anthony implementation we see already the intent to use allocators
for the promise construction

    // template <class Allocator> explicit promise(Allocator a);

but not for the new T in
    template<typename T>
    struct future_traits
    {
    typedef boost::scoped_ptr<T> storage_type;
    // ...
    static void init(storage_type& storage,source_reference_type
t){storage.reset(new T(t));}
    //...
    }

Anthony, do you plan to use the same allocator for T?

Braddock, do you plan to use allocators?

Best
_____________________
Vicente Juan Botet Escriba


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