Fix compile error with ambiguous ctor, close #11766.

When a) first elem is sequence b) second (and third) elem is(are) void*,
both of conversion ctor and forwarding ctor are candidate since SFINAE
expression has void* type.
This commit is contained in:
Kohei Takahashi
2015-12-01 01:14:52 +09:00
parent e9d489c07c
commit 12792a6c11
9 changed files with 30 additions and 22 deletions

View File

@ -9,6 +9,7 @@
#define FUSION_CONS_07172005_0843
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/void.hpp>
#include <boost/fusion/container/list/cons_fwd.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
@ -34,7 +35,6 @@
namespace boost { namespace fusion
{
struct void_;
struct cons_tag;
struct forward_traversal_tag;
struct fusion_sequence_tag;
@ -82,7 +82,8 @@ namespace boost { namespace fusion
traits::is_sequence<Sequence>
, mpl::not_<is_base_of<cons, Sequence> >
, mpl::not_<is_convertible<Sequence, Car> > > // use copy to car instead
>::type* /*dummy*/ = 0
, void_
>::type = void_()
)
: car(*fusion::begin(seq))
, cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}