|
Boost : |
Subject: Re: [boost] [forward_declare] Interest Inquiry toward Faster Compile Times
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2012-08-01 21:18:14
Julien,
An extra 'byte' was just left over from me testing. It works with 8 bytes (2 ints) and it asserts on 7 bytes. I was trying to find a way to 'warn' if you reserved too much. It looks like BOOST_STATIC_WARN() has been removed.
I thought about alignment issues (I am no expert here), but my understanding is that structs/classes are always 'aligned' in the same manner regardless of what is stored. Therefore, if my fwd<> class only has one data member (an array) it should be aligned appropriately for any type.
Dan
On Aug 1, 2012, at 9:01 PM, Julien Nitard <julien.nitard_at_[hidden]> wrote:
> Hi,
>
> Agreed on the general idea, quite interesting indeed, thanks for sharing.
>
> Isn't there a space cost as well ? First the way you did you require
> one more byte for each object (why by the way?) which means that each
> "fwd" in a sequence will have something like 7 bytes of padding after
> it when compiling for 64 bit systems.
> Hopefully there aren't any alignment problems when using "fwd" but I
> am not expert enough to be sure, have you considered it ?
>
> Regards,
>
> Julien
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk