Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-10-13 19:59:01


----- Original Message -----
From: "Thomas Wenisch" <twenisch_at_[hidden]>

> I think it is rather ugly to have the meaning of operator =() to change
> based on a template parameter. If I followed correctly, this is what your
> suggestion here implies.

I think so too.

> I think the suggestion of having a rule_holder<> which you give in a later
> post is much stronger, operator=() does not have two different meanings
> for a rule<>.

Yes.

> If it is still felt that rule<> should be copyable so it can go into
> containers directly, then I think that the STL meaning for operator
> =() should be the only meaning, and the EBNF meaning should be moved to
> some other assignment operator (|= <<=, or whatever). The real ideal
> operator would be := in my opinion, but, unfortunately, that's not
> available.

Now this is a clear proof that substantiates my point *against* the
|= operator. The previous discusion was not about using |= as
"some other assignment operator". I was afraid that it would
cause more confusion than its worth.

My opinion stands: *keep it simple*:

problem: r.alias() is confusing
solution: revert to v1.3 behavior that does not require alias()
    have another class rule_holder<RuleT> that allows holding rules
    for storage in containers as required by dynamic parsing.

--Joel


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