Boost logo

Boost :

Subject: [boost] [proto] Recent (rvalue support) changes in proto causes a whole bunch of regressions in Spirit
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-10-09 23:32:16


Hi,

This code:

  #include <boost/spirit/include/qi.hpp>

  int main()
  {
      namespace qi = boost::spirit::qi;

      qi::rule<char const*> r;
      r %= (+qi::char_);

      return 0;
  }

no longer works as expected. r %= (+qi::char_) becomes a no-op.
Before it calls either:

  template <typename Expr>
  friend rule& operator%=(rule& r, Expr const& expr);

  // non-const version needed to suppress proto's %= kicking in
  template <typename Expr>
  friend rule& operator%=(rule& r, Expr& expr);

Both defined in the rule class.

Correct me if I'm wrong, but it seems the changes in proto forces
us to support rvalue refs, but we are not ready for that yet and
it's too late in the release cycle.

Thoughts?

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com

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