Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2006-10-18 03:17:51


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_at_[hidden]]
Sent: Tuesday, October 17, 2006 21:57
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Sequence of Types, What For?

> What if such a variant<types 1...n> 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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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