
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@m4tp.org> 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