|
Boost : |
Subject: Re: [boost] [proto] small breaking change
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-06-14 02:10:24
Eric Niebler wrote:
> Heck, it's simple enough. I just checked in the fix on trunk. Let me
> know how that works for you.
>
OK the base case is working now. I just got a last small problem.
If I try to evaluate :
m = l+k,
x = x + y;
with the former code given earlier and the latest trunk, the display of
the evaluation is:
assign(
terminal(St6vectorIiSaIiEE)
, plus(
terminal(St6vectorIiSaIiEE)
, terminal(St6vectorIiSaIiEE)
)
)
assign(
terminal(St6vectorIiSaIiEE)
, plus(
terminal(St6vectorIiSaIiEE)
, terminal(St6vectorIiSaIiEE)
)
)
comma(
assign(
terminal(St6vectorIiSaIiEE)
, plus(
terminal(St6vectorIiSaIiEE)
, terminal(St6vectorIiSaIiEE)
)
)
, assign(
terminal(St6vectorIiSaIiEE)
, plus(
terminal(St6vectorIiSaIiEE)
, terminal(St6vectorIiSaIiEE)
)
)
)
assign(
terminal(St6vectorIiSaIiEE)
, plus(
terminal(St6vectorIiSaIiEE)
, terminal(St6vectorIiSaIiEE)
)
)
assign(
terminal(St6vectorIiSaIiEE)
, plus(
terminal(St6vectorIiSaIiEE)
, terminal(St6vectorIiSaIiEE)
)
)
where it should have been only :
comma(
assign(
terminal(St6vectorIiSaIiEE)
, plus(
terminal(St6vectorIiSaIiEE)
, terminal(St6vectorIiSaIiEE)
)
)
, assign(
terminal(St6vectorIiSaIiEE)
, plus(
terminal(St6vectorIiSaIiEE)
, terminal(St6vectorIiSaIiEE)
)
)
)
Which means that the x = x+y expression is copied and destroyed four
time despite my "no-eval" policy in the constructor of expr. I assume
some temporary copy are made which are not captured by my no-eval code
in nt2::containers::expr.
Did I missed some customization to make subdomain/domain expression be
captured by reference or should I had some new copy
constructor/operator= in my expression class in which I have to toggle
the "no-eval" switch ?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk