|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-03-01 16:46:32
I've implemented this scheme in boost/python/converter/from_python_data.hpp
now, and it works great! No more EDG-specific workarounds, and everything
compiles faster!
-Dave
----- Original Message -----
From: "David Abrahams" <david.abrahams_at_[hidden]>
> Thinking a little further, I think what we want is this:
>
> take the union of all types whose alignment is <= that of the target
> if the alignment is not a multiple of the target alignment,
> take the union of all types whose size is <= that of the target
> if the alignment is not a multiple of the target alignment,
> take the union of all the types and cross fingers
> assert success.
>
> The intent of this approach is to find a minimally-aligned type which
> ensures alignment of the target while maintaining compatibility with
brian's
> basic strategy.
>
> It seems like anything more simple-minded will either over- or under-align
> in more cases. Over-alignment is wasteful, and under-alignment is
dangerous.
>
> -Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk