
There's this:
http://svn.boost.org/svn/boost/sandbox/variadic_templates/boost/composite_st...
which uses variadic templates; hence, doesn't have the limitations you mentioned about the number of bounded types. [snip] OOPS. I failed to remember that container_one_of_maybe does use the proposed switch library, which includes:
http://svn.boost.org/svn/boost/sandbox/switch/boost/control/switch.hpp
which does have these code lines:
#ifndef BOOST_SWITCH_LIMIT #define BOOST_SWITCH_LIMIT 50 #endif
#if BOOST_SWITCH_LIMIT > BOOST_PP_LIMIT_REPEAT #error BOOST_SWITCH_LIMIT exceeds Boost.Preprocessor limit #endif #if BOOST_SWITCH_LIMIT > BOOST_PP_LIMIT_ITERATION #error BOOST_SWITCH_LIMIT exceeds Boost.Preprocessor limit #endif
which means container_one_of_maybe *does* have the limitations you were trying to avoid.
Sorry for noise.
I believe container_one_of_maybe could be modified to use the "static array of function pointers" method mentioned in another post to this thread, which was written by Paul Fultz:
This is written by Jarryd Beck, not by me.
http://article.gmane.org/gmane.comp.lib.boost.devel/230073
The only reason that method was not tried in container_one_of_maybe was for reasons cited in my reply to Paul's post.