It's an ugly hack. It will make your visitors or your get calls extremely ugly and unreadable.
Try just increasing the limit instead - Boost.Variant defines it to be the same as BOOST_MPL_LIMIT_LIST_SIZE
, which you can override if you disable the pre-generated headers (which is a hit in compile time, though).
http://www.boost.org/doc/libs/1_53_0/libs/mpl/doc/refmanual/limit-list-size.html
Why do you need this crazy amount of different types anyway? This sounds like a potential design issue.