Ticket #1035: dynamic.hpp.patch

File dynamic.hpp.patch, 1.4 KB (added by Eric Niebler, 15 years ago)

patch for xpressive/detail/dynamic/dynamic.hpp

  • dynamic.hpp

    RCS file: /cvsroot/boost/boost/boost/xpressive/detail/dynamic/dynamic.hpp,v
    retrieving revision 1.4
    diff -b -d -u -r1.4 dynamic.hpp
     
    130130
    131131    bool is_quantifiable() const
    132132    {
    133         return quant_type<Matcher>::value != (int)quant_none;
     133        return quant_type<Matcher>::value != (int)quant_none || this->next_ != get_invalid_xpression<BidiIter>();
    134134    }
    135135
    136136private:
     
    316316template<typename Matcher, typename BidiIter>
    317317inline sequence<BidiIter> dynamic_xpression<Matcher, BidiIter>::quantify_
    318318(
    319     quant_spec const &
    320   , std::size_t &
    321   , sequence<BidiIter>
     319    quant_spec const &spec
     320  , std::size_t &hidden_mark_count
     321  , sequence<BidiIter> seq
    322322  , mpl::int_<quant_none>
    323   , alternates_factory<BidiIter> const &
     323  , alternates_factory<BidiIter> const &factory
    324324  , void const *
    325325) const
    326326{
    327     BOOST_ASSERT(false); // should never get here
    328     throw regex_error(regex_constants::error_badrepeat, "expression cannot be quantified");
     327    BOOST_ASSERT(this->next_ != get_invalid_xpression<BidiIter>());
     328    return this->quantify_(spec, hidden_mark_count, seq, mpl::int_<quant_variable_width>(), factory, this);
    329329}
    330330
    331331//   fixed-width matchers