
If I understand you right, you would like to be able to hold more types (more then 20). There are some macros which allow you bigger type lists. In the MPL book is described, that you need to redefine the limit for your sequence. Take a look at the MPL configuration macros at: http://www.boost.org/libs/mpl/doc/refmanual/refmanual_toc.html # Configuration * BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS * BOOST_MPL_CFG_NO_HAS_XXX * BOOST_MPL_LIMIT_METAFUNCTION_ARITY * BOOST_MPL_LIMIT_VECTOR_SIZE * BOOST_MPL_LIMIT_LIST_SIZE * BOOST_MPL_LIMIT_SET_SIZE * BOOST_MPL_LIMIT_MAP_SIZE * BOOST_MPL_LIMIT_UNROLLING In the variant interface a template class is available which name is: make_variant_over< MPL_Seq_Type > There is also a macro which limits the number of types for a variant. I assume it must be icreased as well. Good Luck, Ovanes -----Original Message----- From: Terry G [mailto:tjgolubi@netins.net] Sent: Tuesday, October 17, 2006 21:57 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Sequence of Types, What For?
What if such a variant
represents a communication protocol which can contain one of enumerated message type instance. In this case the sender can not put there a message (per-compiler) which should not be there (not allowed). And a receiver can be 100% sure that it will not receive a message which should not be handled.
Yeah, sounds cool, until I actually tried as you suggested. Unfortunately, variants can only hold a few types, e.g. 20. For most interfaces I program, there are far more than 20 messages. But this concept is still intriguing. Since variant doesn't cut it for 100 messages, how could one use the typelist concept in this case? terry _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users