Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2006-01-11 20:02:58


Hi Felipe,

The reason the code should never reach the point you indicate is because
the which_ index of the variant should always be valid, and so it should
always be the case that the other specialization of visitation_impl
finds a match. If this is not happening, which appears to be the case,
it may be due to memory corruption that is overwriting the which_ field
of the variant, or it may be due to a bug in the variant code. Without
more detail from you about your problem though, I won't be able to help
more.

Regards,

Eric

Felipe Magno de Almeida wrote:
> Hi!
>
> I'm having an assertion failure at visition_impl.hpp:201
> But the assertion doesnt state what could be wrong, there's only a
> comment saying: // should never be here at runtime:
>
> Here is the function that is being called, that shouldnt...
>
> template <
> typename W, typename S
> , typename Visitor, typename VPCV
> , typename NBF
> >
> inline
> BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
> visitation_impl(
> int, int, Visitor&, VPCV
> , mpl::true_ // is_apply_visitor_unrolled
> , NBF, W* = 0, S* = 0
> )
> {
> // should never be here at runtime:
> BOOST_ASSERT(false);
> typedef typename Visitor::result_type result_type;
> return ::boost::detail::variant::forced_return< result_type >();
> }
>
>
> Could anyone help me?
> Thanks in advance,
>
> --
> Felipe Magno de Almeida
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk