MPL design question

I have a class that is getting a huge number of template parameters (mostly
a bunch of size_t used for vector sizes). They have a natural organization
into groups, but almost all of them have a default as 0.
How do you suggest that I design the template parameter for this? Is there
any way to use some kind of associative container so I could look these up
by "name" and default to 0 if they aren't there? I can't see how to use
mpl::map to do this kind of stuff.
Simplified Pseudocode:
--------------------
What I have:
template

AMDG Jesse Perla wrote:
I have a class that is getting a huge number of template parameters (mostly a bunch of size_t used for vector sizes). They have a natural organization into groups, but almost all of them have a default as 0.
How do you suggest that I design the template parameter for this? Is there any way to use some kind of associative container so I could look these up by "name" and default to 0 if they aren't there? I can't see how to use mpl::map to do this kind of stuff.
Boost.Parameter support this kind of usage. In any case, you probably need to use mpl::int_ instead of an integral constant. In Christ, Steven Watanabe
participants (2)
-
Jesse Perla
-
Steven Watanabe