|
Boost : |
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-04-29 02:36:28
>
>
> After some thinking I agree now with original Loki::SmartPtr support for
> auto_ptr. So consider my comments invalid.
>
> Gennadiy.
>
I propose to use traits here:
template<typename OwnershipPolicy>
struct has_destructive_copy
{
BOOST_STATIC_ASSERT( bool, value = false );
};
template<>
struct has_destructive_copy<transferable>
{
BOOST_STATIC_ASSERT( bool, value = true );
};
This way all other ownership policies no need to bother about notifying
framework about that.
has_destructive_copy could be made smart and try to deduce it's value from
the fact of present of appropriate constructor in argument type
Gennadiy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk