[Boost-users] [Variant]Maximum Limit of types in variant and fusion vector

345 views
Skip to first unread message

Elizabeta

unread,
Jun 18, 2015, 11:36:26 AM6/18/15
to boost...@lists.boost.org
Hi

I want to use boost::variant with types more than 50. Until now I was using
boost::variant with types up to 50 like this :

#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#define BOOST_MPL_LIMIT_LIST_SIZE 50
#define BOOST_MPL_LIMIT_VECTOR_SIZE 50
#include <boost/variant.hpp>

However , now if I change BOOST_MPL_LIMIT_LIST_SIZE and
BOOST_MPL_LIMIT_VECTOR_SIZE to 100 it gives me compiler errors: Cannot open
include file: 'boost/mpl/list/list100.hpp': No such file or directory

So is 50 the maximum limit of types that can be put in the variant ?

Also it seems that the maximum limit of types for vector fusion is 50, and
can't increase that, and I want to have fusion vector for more than 50. Is
this possible.

Any suggestion



--
View this message in context: http://boost.2283326.n4.nabble.com/Variant-Maximum-Limit-of-types-in-variant-and-fusion-vector-tp4677275.html
Sent from the Boost - Users mailing list archive at Nabble.com.
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Edward Diener

unread,
Jun 18, 2015, 11:57:37 AM6/18/15
to boost...@lists.boost.org
On 6/18/2015 11:15 AM, Elizabeta wrote:
> Hi
>
> I want to use boost::variant with types more than 50. Until now I was using
> boost::variant with types up to 50 like this :
>
> #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
> #define BOOST_MPL_LIMIT_LIST_SIZE 50
> #define BOOST_MPL_LIMIT_VECTOR_SIZE 50
> #include <boost/variant.hpp>
>
> However , now if I change BOOST_MPL_LIMIT_LIST_SIZE and
> BOOST_MPL_LIMIT_VECTOR_SIZE to 100 it gives me compiler errors: Cannot open
> include file: 'boost/mpl/list/list100.hpp': No such file or directory
>
> So is 50 the maximum limit of types that can be put in the variant ?
>
> Also it seems that the maximum limit of types for vector fusion is 50, and
> can't increase that, and I want to have fusion vector for more than 50. Is
> this possible.
>
> Any suggestion

The latest version of MPL on the 'develop' branch provides the ability
for increasing MPL sizes for the maximum number of types to 100 or
beyond. Look at the readme.txt file in the 'preprocessed' sub-directory.

Elizabeta

unread,
Jun 18, 2015, 12:29:28 PM6/18/15
to boost...@lists.boost.org
Can you provide me a link. I tried with the following link
http://svn.boost.org/svn/boost/trunk/boost/mpl/ and can't find it.

Also this means that this feature will be included in the next release of
boost, right?



--
View this message in context: http://boost.2283326.n4.nabble.com/Variant-Maximum-Limit-of-types-in-variant-and-fusion-vector-tp4677275p4677277.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Bjorn Reese

unread,
Jun 18, 2015, 12:44:46 PM6/18/15
to boost...@lists.boost.org
On 06/18/2015 06:08 PM, Elizabeta wrote:
> Can you provide me a link. I tried with the following link
> http://svn.boost.org/svn/boost/trunk/boost/mpl/ and can't find it.

https://github.com/boostorg/mpl/tree/develop

Edward Diener

unread,
Jun 18, 2015, 1:09:16 PM6/18/15
to boost...@lists.boost.org
On 6/18/2015 12:08 PM, Elizabeta wrote:
> Can you provide me a link. I tried with the following link
> http://svn.boost.org/svn/boost/trunk/boost/mpl/ and can't find it.
>
> Also this means that this feature will be included in the next release of
> boost, right?

Yes.

The feature was working in the past but was broken when Boost moved from
subversion to git as its SCCS. It has been fixed in 'develop' and will
make its way into the next release of Boost.

The correct link was given in another reply.

Kohei Takahashi

unread,
Jun 21, 2015, 11:43:57 AM6/21/15
to boost...@lists.boost.org
Hi Elizabeta,

> Also it seems that the maximum limit of types for vector fusion is 50, and
> can't increase that, and I want to have fusion vector for more than 50. Is
> this possible.
Could you file a feature request on trac[1] ?

[1] https://svn.boost.org/trac/boost/newticket

Regards,
Kohei Takahashi


signature.asc
Reply all
Reply to author
Forward
0 new messages