
Joel de Guzman wrote:
I'm not sure how to deal with this. Do you have a hint? I place the original test code here. Tracing the code, the first %= works as expected while the second and third becomes no-ops calling proto operator %=.
I checked and you just need to define an operator%= that takes a
non-const RHS. Patch attached. Karma might need a similar patch.
--
Eric Niebler
BoostPro Computing
http://www.boostpro.com
Index: rule.hpp
===================================================================
--- rule.hpp (revision 49819)
+++ rule.hpp (working copy)
@@ -90,6 +90,23 @@
}
template <typename Expr>
+ friend rule& operator%=(rule& r, Expr& xpr)
+ {
+ typedef spirit::traits::is_component