|
Boost : |
Subject: Re: [boost] [GSoC][MPL11] Post C++Now update
From: Larry Evans (cppljevans_at_[hidden])
Date: 2014-05-19 17:27:34
On 05/19/14 12:42, Louis Dionne wrote:
> Hartmut Kaiser <hartmut.kaiser <at> gmail.com> writes:
[snip]
>> Moreover, Christopher Schmidt finished a full C++11 rewrite of Fusion during
>> GSoC 2009. It might be a good idea to go back and look what he came up with.
>
> Thanks for the heads up. Is there a link to that code, or is it already
> in the Boost distribution?
[snip]
Unfortunately not. There is this:
http://svn.boost.org/svn/boost/sandbox/SOC/2009/fusion/README
however, the link mentioned there no longer works.
I did work some with Christopher in comparing implementations
of tuple. The mailing list thread starts here:
http://article.gmane.org/gmane.comp.lib.boost.devel/194327
I do have some downloads of the slim code he mentioned in the README
link; however, IIRC the code here:
https://svn.boost.org/svn/boost/sandbox/variadic_templates/sandbox/slim/test/
contains a simplified version of the slim code which may give you
some idea of how it was implemented. IIRC, the boost pp was used
somewhat like the current fusion uses it; however, Christopher
used inheritance to provide the tail of the tuple. Also,
just like fusion, Christopher divided the tuple into "chunks"
of a given size, which, IIRC, was 10. Each chunk, like
fusion, had variables m1...m10 declared with
T1...T10 which were the head template arguments.
Have a look at:
https://svn.boost.org/svn/boost/sandbox/variadic_templates/sandbox/slim/test/tuple_impl.vertical.hpp
for a more concrete idea (I'd suggest running through the
preprocessor then indent, to make things clearer).
I think the chunk size is given by the UNROLL_MAX macro in that file.
However, I've just briefly glanced over the code again; so, this
explanation may be a bit flawed.
HTH.
-regards,
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk