Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-01-08 19:21:25


"Dan W." <danw_at_[hidden]> writes:

> Anatoli Tubman wrote:
>
>> The right (i.e. compile-time-fast) way do do this is not with mpl::list but
>> with mpl::map. To my knowledge, such a beast does not currently exist, but it
>> can be done. See e.g. here:
>> http://216.239.41.104/search?q=cache:1WM4rEuWG1kJ:lists.boost.org/MailArchives/boost/msg26646.php+%3C200310011506.43968.anatoli%40ptc.com%3E&hl=en&ie=UTF-8
>
> mpl::hash_map might be easier to come up with, having mpl::list already...

The maps in the prototype already have O(1) lookups (only one template
instantiation per unique lookup). mpl::list won't be of any help
here, and hashing types is not possible anyway.

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