From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-29 00:31:40
----- Original Message -----
From: "Douglas Gregor" <gregod_at_[hidden]>
> On Sunday 28 October 2001 07:59, you wrote:
> > That's good news, but alignof will be quite useless without a
> > corresponding #pragma align.
> > In any case, having a boost library solution would still be useful,
> > both as an interim measure and to gauge the need for the language
> > extension.
> > (actually, something like the Microsoft declspec(align(N)) syntax
> > would probably be better than the #pragma I suggested above.)
> A pragma would help all that much, because the condition is determined too
> early (preprocessing time).
Not so. The implementation is free to define the meaning of any pragma. The
real problem with pragma in this case is that the implementation is free to
define the meaning ;-) Brian's declspec() suggestion above is more
> To construct a stack-based variant class we need
> to be able to determine the alignment when we instantiate.
> I personally don't see much of a reason to add this capability into the
> language. It is clearly possible from the library standpoint once we have
> accurate alignof().
So given alignof(T) == x how would you arrange for sizeof(T) bytes of
properly aligned memory on the stack?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk