|
Boost : |
Subject: Re: [boost] Interest check: memoization
From: James Porter (porterj_at_[hidden])
Date: 2009-01-25 02:00:17
Steven Watanabe wrote:
> You might want to look at Boost.Intrusive, which allows you to avoid
> the extra copies without adding indirection.
> http://www.boost.org/doc/html/intrusive/advanced_lookups_insertions.html
Unless I'm reading the documentation wrong, I'd still need some kind of
indirection to perform the lookups. That is, I'd have to create a tuple
of references to pass to find().
Besides that, creating a pair<const key_type,data_type> would also
require a copy if key_type were an ordinary tuple. (Using the
my_map[key] = value syntax does this under the hood, too).
I'm not very familiar with Boost.Intrusive, so correct me if I'm wrong.
- Jim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk