Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-04-29 19:16:08


"Gennadiy Rozental" <rogeeff_at_[hidden]> wrote in message
news:aait5t$ia4$1_at_main.gmane.org...
> 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

I think that's a good idea, barring the potential ODR violation mentioned in
my other post.

Andrei


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