Boost logo

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).


Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at