Boost logo

Boost :

Subject: Re: [boost] TMP runtime access problem
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-02-09 05:51:54


Willy Liu a écrit :
> Hi, I wonder that how to access metadata in runtime.
> If I pre-compute something and save them into a template ARRAY<int N>,
> how can I random access the metadatas in runtime?
> What I can only do is binary searching. Is it possible to do in
> constant time, or there exist some functions in MPL doing this?

Just copy the data to an array, for example using mpl::for_each.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk