Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-22 07:44:52

----- Original Message -----
From: "John Maddock" <John_Maddock_at_[hidden]>

> >Is this a good idea? Shouldn't we return true for all references? The
> reason
> >to ask whether a type has a trivial destructor (it seems to me) is to
> decide
> >when you can skip calling it, or more importantly, when you can avoid
> >destroying an array since that's less likely to optimize away. At the
> >least, this behavior should be documented.
> No idea, but is it even relevent? Can you new a reference type, I don't
> think so...

Yes, it's relevant:

template <class T1, class T2>
struct has_trivial_destructor<tuple<T1,T2> >
        = has_trivial_destructor<T1>::value &&

Shouldn't that work, even if T1/T2 are references?


Boost list run by bdawes at, gregod at, cpdaniel at, john at