|
Boost : |
Subject: Re: [boost] [Fusion] port to c++0x
From: Christopher Schmidt (mr.chr.schmidt_at_[hidden])
Date: 2009-09-23 15:47:50
Larry Evans schrieb:
> Thanks for all the work.
>
> However, I was wondering why you couldn't eliminate some of the
> extensive BOOST_PP magic in:
>
> https://svn.boost.org/trac/boost/browser/sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector.hpp
>
>
> by using the "tagged multiple inheritance"(TMI) method shown
> around here:
>
> https://svn.boost.org/trac/boost/browser/sandbox/variadic_templates/libs/mpl/sandbox/tuple_non_recur.package_range_c.cpp#L53
>
...
>
> The only other objection might be to limit the number of instantiations
> because the more template instantiations, the slower the compile
> time; however, Doug Gregor suggested he wasn't too worried
> about that at the bottom of:
>
> http://groups.google.com/group/comp.std.c++/msg/6449d909fd3d5cdc
>
> -regards,
> Larry
Thank you very much for your feedback.
I did consider that specific method. I decided against using it due to
the enormous amount of template instantiations and the expensive
type_at. The current implementation is 4-unrolled recursive. I am pretty
certain that it is faster - there are about 4 to 8 times less template
instantiations.
Besides, this is the only place in the native variadic template code in
which I use heavy preprocessor repetition. All other container (besides
fusion::cons) have a clean implementation based on fusion::vector.
-Christopher
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk