|
Boost Users : |
From: Paul Baxter (pauljbaxter_at_[hidden])
Date: 2005-12-10 18:45:40
Dave Abrahams wrote
> Some facts:
>
> You can't use a string literal as a template parameter in C++, so
> there is *no way* to use a string literal as a key in a compile-time
> lookup.
This is the piece of the puzzle I was needing and is the crux of the matter.
I can't do what I want with strings directly on the interface.
I was hopeful of some compile-time map or hashing function to convert the
constant
string to a constant index and work from there.
> Sounds like the parameter library to me... provided you give up using
> strings as indices.
> I'm pretty sure the parameter library is a good -- if not perfect --
> match for your problem. Since I've pointed at it twice now, if you're
> not embarrassed yet, I'll stop pushing ;-)
I've already acknowledged my embarrassment in my previous post!
Though parameter cannot solve my problem directly, I'll try to find another
way without strings.
Many thanks for your help.
Paul
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net