From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-01-28 14:43:09
On Monday 28 January 2002 02:12 pm, you wrote:
> > But how would function<> ensure the proper
> > alignment for the function object type?
> That shouldn't be hard if we wanted it. After all, we have
> 'boost::alignment_of', Fernando Cacciola's "aligned_storage.hpp" (somewhere
> in the vault, I believe), and Andrei's paper -
> http://www.oonumerics.org/tmpw01/alexandrescu.pdf - seems to provide a
> solution as well.
All solutions require knowing all of the types that storage must be aligned
with in advance. It works quite well for, e.g., a bounded variant class (such
as those written by Brian Parker and Andrei Alexandrescu), but any unbounded
variant (such as boost::any or boost::function) won't benefit because they
don't haven't anything to align with.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk