Hi Igor,
You can get around this by increasing the maximum size a variant can
handle, define the following symbols (or higher if you need):
#define BOOST_MPL_LIMIT_LIST_SIZE 30
#define BOOST_MPL_LIMIT_VECTOR_SIZE 30
#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
And it should work again.
Regards
Dan
2012/2/22 Igor R
Hello,
It appears that since 1.47 Boost.Variant has a bug that can be reproduced as follows (MSVC10, Debug mode):
#include
#include struct struct1{}; struct struct2{}; struct struct3{}; struct struct4{}; struct struct5{}; struct struct6{}; struct struct7{}; struct struct8{}; struct struct9{}; struct struct10{}; struct struct11{}; struct struct12{}; struct struct13{}; struct struct14{}; struct struct15{}; struct struct16{}; struct struct17{}; struct struct18{}; struct struct19{}; struct struct20{}; struct struct21{};
typedef boost::mpl::vector21< struct1, struct2, struct3, struct4, struct5, struct6, struct7, struct8, struct9, struct10, struct11, struct12, struct13, struct14, struct15, struct16, struct17, struct18, struct19, struct20, struct21
::type vec_type; typedef boost::make_variant_over
::type var_type; int main() { var_type v; v = struct21(); }
The last line generates assertion in variant_impl.hpp, line 264, visitation_impl() function: "Boost.Variant internal error: 'which' out of range."
According to the release notes, variant wasn't changed in 1.47, but I recalled teh following discussion:
http://boost.2283326.n4.nabble.com/large-variant-performance-compared-50-ele... It seems that the above issue is somehow related to this change.
Igor'. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users