|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-09-05 09:41:58
"Andy Little" <andy_at_[hidden]> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk