Boost logo

Boost :

From: Thomas Wenisch (twenisch_at_[hidden])
Date: 2002-10-13 19:21:57

Hi all,

On Sun, 13 Oct 2002, Joel de Guzman wrote:

> A solution I have in mind is make the rule class accept a
> bool template parameter ... bool copyable = false>. When one
> needs to deal with dynamic parsing which will involve the
> manipulation of rules, placing them in stacks, maps, vectors etc.,
> then she can set it to true. All the rest will be happy with this
> set to false as default.
> Thoughts?

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 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<>.

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

-Tom Wenisch
Computer Architecture Lab
Carnegie Mellon University

Boost list run by bdawes at, gregod at, cpdaniel at, john at