
21 May
2008
21 May
'08
1:38 p.m.
AMDG Igor R. wrote:
and there is the problem. I think the variant datatype can use only 10 different parameters. Isn't it?
The maximal number of types is limited by _BOOST_VARIANT_LIMIT_TYPES_ http://www.boost.org/doc/libs/1_35_0/doc/html/BOOST_VARIANT_LIMIT_TYPES.html macro, which is defined in 1.35 as follows:
#if !defined(BOOST_MPL_LIMIT_LIST_SIZE) # define BOOST_MPL_LIMIT_LIST_SIZE 20 #endif
#define BOOST_VARIANT_LIMIT_TYPES BOOST_MPL_LIMIT_LIST_SIZE
So it's default is 20, but IIUC you can set it to anything (>=10)
In Addition, you can bypass this limitation by using make_variant_over, which takes an MPL sequence. In Christ, Steven Watanabe