Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-28 15:53:06


----- Original Message -----
From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>

> My solution is not based on knowing the types in advance. It just uses
that
> information to optimize the storage size. The TypesOfAllAlignments type in
> the paper can be arguably quite a portable storage for any type. The code
is
> not 100% portable, but in practice it's hard to imagine a system that's as
> perverse as to break its assumptions.

I've been thinking that it might be OK to write some technically nonportable
low-level boost facilities like this one in some cases (i.e. where nobody
can imagine a real implementation for which it breaks). I think type_traits
may already have started down that path. For example, we could use this
back-door to make a compressed_pair/compressed_tuple which optimizes away
all storage in more cases. That example is particularly good because if we
ever ran into a platform where it didn't work, we could just disable the
optimization.

-Dave


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