|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2001-05-31 05:13:03
Joel de Guzman wrote:
>Aggregates need not store subjects by value. A reference is fine since we
>know that the subject has a lifetime equal to or greater than the aggregate.
>Rules<> are composed by reference in Spirit. I such cases, the aggregate
>does not own the subject(s).
There are only two choices without BNF class.
1) Store everything by value. Problem -- duplicated information makes it hard
to change a rule, which is desirable sometimes.
2) Store everying by reference (or pointer). Problem -- garbage collection
needeed.
As for "lifetime equal or greater than ..." --- it is the case with Spirit,
but in general objects will be newd and user should not care for their
deletion.
-- Regards, Vladimir
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk