Subject: [boost] [variant] Breaking change introduced by variadic support
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2014-01-18 11:45:46
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
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.
Is this the preferred path to take? I would suggest instead to keep the
macros as documented at all times, and let the user handle the variadic
case manually. This would allow users to support both variadic and
non-variadic `variant`s up to a certain limit with a single code case
(without breaking the documented interface), and result in cleaner code
for those cases that only target compilers with variadic support.
There's no point in using a macro if it won't work for both cases.
-- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk