Joel de Guzman
David Abrahams wrote:
"Neil Hunt"
writes: I guess the main thrust of the question is "Does the parameters library support runtime enumeration?"
Not directly, but it seems like something we (sh/c)ould support, probably by making ArgumentPacks conforming Fusion sequences so you could use boost/spirit/fusion/algorithm/for_each.hpp to enumerate them. The problem is that I don't have expertise with Fusion-1 and AFAIK it's not fully documented. Specifically, I don't know how to make a conforming Fusion sequence. Maybe Joel can help. Joel?
Sure. I'll look into it. Should be a good example for the docs in the making. I'm a bit hesitant to write this for Fusion-1, however, as it will be replaced by Fusion-2
I know; I was just thinking that Neil is probably not going to want to check out a branch.
--which, BTW, has a "map" that might be a good replacement for boost parameter's internals.
Might be. Boost.Parameter's internals have a bunch of stuff in them that isn't simply a map. And furthermore, that library works on broken compilers :(
If boost.parameter uses fusion::map, then you automatically have iteration support plus all the algorithms etc. I bet fusion::map will simplify boost.parameter significantly too.
Unless you make it "portable." The main motivation for making Boost.Parameter "portable" was that I wanted to use it in Boost.Python. But then again, maybe it will be possible to drop vc6/7 support from Boost.Python soon enough. -- Dave Abrahams Boost Consulting www.boost-consulting.com