Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2006-05-19 05:36:43

David Abrahams wrote:
> I find myself creating this class member:
> compressed_pair<
> storage
> , compressed_pair<
> Lookup
> , compressed_pair<
> GetUnstored
> , SetUnstored
> >
> >
> > members;

Just one comment here: shouldn't the storage member be in the innermost
compressed_pair? Currently the innermost item compressed_pair<GetUnsorted,
SetUnsorted> has two empty members and so isn't actually "compressed".


            storage> > >

ensures that each compressed pair has one non-empty member and one empty
member, so the final object should be just sizeof(storage).

All of which suggests that a compressed-tuple would be a good idea, although
ordering the items within the tuple to ensure compression is actually a
larger challenge than folks may have realised.

In the mean time if additional template constructors can be added, I see no
problem with that.


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