
5 Sep
2006
5 Sep
'06
1:41 p.m.
"Andy Little" <andy@servocomm.freeserve.co.uk> writes:
The code below uses boost::tuple, but presumably fusion could do this stuff better?
I should note that one of the main reasons fusion tuples (which are "vector-like") are better for random access than boost::tuple (which is "slist-like") is that, even taking into account the memoizing nature of template instantiation, the latter generates O(N^2) instantiations to access N elements of a tuple with at<>, whereas the former takes only O(N). Cheers, -- Dave Abrahams Boost Consulting www.boost-consulting.com