Boost logo

Boost :

From: Dan Gohman (dgohman_at_[hidden])
Date: 2002-10-13 23:55:31


On Sun, Oct 13, 2002 at 10:48:12AM +0800, Joel de Guzman wrote:
> Perhaps what you really wanted was:
>
> r = previous_definition_of_r | a;

You're right. I was confusing the cases where the value of a
rule<> instance is used and where the identity is used.

On Sun, Oct 13, 2002 at 05:42:40PM +0800, Joel de Guzman wrote:
> Another solution that I seem to like would be to simply revert to
> v1.3 behavior while still using smart pointers. Then, an auxilliary
> class rule_holder<RuleT> can be used to hold rules for storage
> in containers. The rule_holder manages the lifetime of the held
> rule. You can get, set or reset the held rule.
>
> I think I prefer this solution. Thoughts?

I think I prefer this solution as well.

I like the approach of using a separate object to handle the container
requirements. I think the 1.3 operator= behavior is reasonable behavior,
and I think the otherwise unusual use of operator= is not out of place
in Spirit.

Dan

-- 
Dan Gohman
dgohman_at_[hidden]

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