On 18/01/2014 02:32 p.m., Antony Polukhin wrote:
2014/1/18 Agustín K-ballo Bergé
The recent changes to introduce variadic support to `variant` introduce breaking changes in the documented macros. When variadic support is detected, `BOOST_VARIANT_LIMIT_TYPES` is not defined and `BOOST_VARIANT_ENUM_[SHIFTED_]PARAMS` uses variadic templates instead of enumerating parameters.
This is a breaking change in the documented interface, and one that requires all but the simplest use cases to be rewritten. For instance, this breaks _Boost.Spirit_ support of `variant` (https://svn.boost.org/trac/ boost/ticket/9238), requiring two different implementations to be provided.
While trying to make _Boost.Spirit_ work after the breaking changes, I
found a problem with the following snippet:
#include
main.cpp(13): error C2976: 'boost::variant' : too few template arguments
The code works fine for GCC4.8.2 (both for C++03 and C++11), and it works with Clang 3.3 too although it does not use the variadic version (why?). Is this a bug with MSVC, or did I do something wrong? If the former, I would suggest sticking with the non-variadic approach for MSVC, since this seems to be a pretty basic use case. Also, feel free to use the previous code as a base for a regression test. Regards, -- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com